da-h / AirLatex.vim

Overleaf / ShareLatex in Vim
MIT License
83 stars 8 forks source link

Set Cookies Automatically from Firefox Cookie store #48

Open dmadisetti opened 1 year ago

dmadisetti commented 1 year ago

This is something that I am using (it's particular to firefox, chromium based browsers encrypt their cookies on disk):

let g:AirLatexCookieDB="/home/dylan/.mozilla/firefox/*.default/cookies.sqlite"                                                                                                                                                                
let g:AirLatexSecret = trim(system("sqlite3 " . g:AirLatexCookieDB . " 'select value from main.moz_cookies where name=\"overleaf_session2\" and host=\".overleaf.com\";'"))                                                                   
let g:AirLatexLB = trim(system("sqlite3 " . g:AirLatexCookieDB . " 'select value from main.moz_cookies where name=\"GCLB\" and host=\".overleaf.com\";'"))                                                                                    
let g:AirLatexUsername = "cookies:GCLB=" . g:AirLatexLB . ";overleaf_session2=" . g:AirLatexSecret

Just thought I would share!