From 8476b829518881789cfaf1b365c747c0696df0c8 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 20 May 2003 19:14:14 +0000 Subject: Preserve strings while reconciling svn:r18 --- reconcile.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'reconcile.py') diff --git a/reconcile.py b/reconcile.py index e580b48..23e3963 100644 --- a/reconcile.py +++ b/reconcile.py @@ -208,12 +208,12 @@ def emit(f,ent): for e in errs: print >>f, "%%%%", e - print >>f, ent.format(77, 4, v=1) + print >>f, ent.format(77, 4, v=1, invStrings=invStrings) def emitKnown(f, ent, matches): print >>f, "%% Candidates are:", ", ".join([e.key for g,e in matches]) print >>f, "%%" - print >>f, "%"+(ent.format(77).replace("\n", "\n%")) + print >>f, "%"+(ent.format(77,4,1,invStrings).replace("\n", "\n%")) if len(sys.argv) != 2: print "reconcile.py expects 1 argument" @@ -233,6 +233,14 @@ except BibTex.ParseError, e: sys.exit(1) f = open('tmp.bib', 'w') +keys = input.newStrings.keys() +keys.sort() +for k in keys: + v = input.newStrings[k] + print >>f, "@string{%s = {%s}}"%(k,v) + +invStrings = input.invStrings + for e in input.entries: if not (e.get('title') and e.get('author')): print >>f, "%%\n%%%% Not enough information to search for a match: need title and author.\n%%" -- cgit v1.2.3-70-g09d2