perrette / papers

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

Import papers.duplicate.entry_diff for fix_entry() #24

Closed elonhub closed 2 years ago

elonhub commented 2 years ago

Running ~> papers list --key BIBKEY --fetch in an interactive shell results in an exception because the relevant function is not imported:

*** UPDATE ***                                                                                                                                      
Traceback (most recent call last):                                                                                                                   
  File "/usr/bin/papers", line 5, in <module>                                                                                                        
    papers.bib.main()                                                                                                                                
  File "/usr/lib/python3.9/site-packages/papers/bib.py", line 1356, in main                                                                          
    check_install() and listcmd(o)                                                                                                                   
  File "/usr/lib/python3.9/site-packages/papers/bib.py", line 1233, in listcmd                                                                       
    my.fix_entry(e, fix_doi=True, fix_key=True, fetch_all=True, interactive=True)                                                                    
  File "/usr/lib/python3.9/site-packages/papers/bib.py", line 619, in fix_entry                                                                      
    print(entry_diff(e_old, e))                                                                                                                      
NameError: name 'entry_diff' is not defined

Importing entry_diff from papers.duplicate fixes this.

perrette commented 2 years ago

Thanks very much. Apologies for the long reaction time.