Skip to content

Commit

Permalink
Merge pull request #45 from syrte/patch-1
Browse files Browse the repository at this point in the history
bugfix for merge-other
  • Loading branch information
yymao authored Aug 19, 2024
2 parents 4ff1373 + c287a3e commit 5a001a8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions adstex.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
except ImportError:
from urllib import unquote

__version__ = "0.5.2"
__version__ = "0.5.3"

_this_year = date.today().year % 100
_this_cent = date.today().year // 100
Expand Down Expand Up @@ -454,8 +454,7 @@ def update(key):
return

if key_exists_in_others and args.merge_other:
bib.entries_dict[key] = bib_other.entries_dict[key]
bib.entries = list(bib.entries_dict.values())
bib.entries.append(bib_other.entries_dict[key])
print("{}: FOUND IN OTHER BIB SOURCE, MERGED".format(key))
return

Expand Down Expand Up @@ -519,6 +518,8 @@ def update(key):
copyfile(args.output, args.output + ".bak")
with open(args.output, "wb") as fp:
fp.write(bib_dump_str)
else:
print('Nothing to write/update.')

print(_headerize("Done!"))

Expand Down

0 comments on commit 5a001a8

Please sign in to comment.