Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

two comments, no functional changes #55

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion papers/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ def check_legacy_config(configfile):


def get_biblio(config):
"""
Given a config, get the Biblio object associated with this run. If there's no Biblio object, will make a new one, silently.
boyanpenkov marked this conversation as resolved.
Show resolved Hide resolved
"""
if config.bibtex is None:
raise ValueError('bibtex is not initialized')
relative_to = os.path.sep if config.absolute_paths else (os.path.dirname(config.bibtex) if config.bibtex else None)
Expand Down Expand Up @@ -1105,4 +1108,4 @@ class PapersExit(Exception):
try:
main()
except PapersExit:
sys.exit(1)
sys.exit(1)
4 changes: 2 additions & 2 deletions papers/bib.py
boyanpenkov marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class DuplicateKeyError(ValueError):

class Biblio:
"""
main config
The bibtex object that we operate on, which is mainly used to read and write to dynamically, and can then send the changes to be stored in a specified bibtex file on disk.
"""
def __init__(self, db=None, filesdir=None, key_field='ID', nameformat=NAMEFORMAT, keyformat=KEYFORMAT, similarity=DEFAULT_SIMILARITY, relative_to=None):
"""
Expand Down Expand Up @@ -786,4 +786,4 @@ def entry_filecheck(e, delete_broken=False, fix_mendeley=False,

newfiles.append(file)

e['file'] = format_file(newfiles, relative_to=relative_to)
e['file'] = format_file(newfiles, relative_to=relative_to)
Loading