perrette / papers

Command-line tool to manage bibliography (pdfs + bibtex)
MIT License
142 stars 22 forks source link

Is it any opportunity to get new full path of moved&renamed pdf file. #23

Closed VolkovIlia closed 1 year ago

VolkovIlia commented 2 years ago

I use zathura for pdf viewing and added some bindings for using papers inside zathura. When I add some paper it change the location and I should manually re-open it. Is it any way to get new location after adding papers for automation it re-opening?

P.S. my bind is: map <C-b> feedkeys ":exec papers add -r $FILE<Return>"

perrette commented 1 year ago

Hi @VolkovIlia. That was a long time ago... I'll reply nevertheless in case it is still relevant. As a quick hack, you may add the --info flag and parse INFO:papers:mv {oldfile} {newfile} Otherwise in the latest version v2 on pypi the Biblio class has a nameformat method that takes a BibtexParser entry and returns the new file name. Not sure if that could be any useful... I'm closing for now, please feel free to re-open.