Re: isi capital letters
"Frédéric Gobry" <[email protected]> Wed, 8 Nov 2006 06:39:06 +0000
| Newsgroups | gmane.comp.gnome.apps.pybliographer |
|---|---|
| Message-ID | <[email protected]> |
> I would like to change all the faulty entries that have accumulated in my database > back. Has there been a solution yet? You can write a small pyblio script. A sample is enclosed, you can run it as: pybliographer fix.py input.bib output.bib Let me know if you have problems with this, and if you write sth more complete, I'm sure people on the list might be interested :-) -- Frédéric ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Pybliographer-general mailing list Pybliographer-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/pybliographer-general
fix.py
(text/x-python, 326 B)
from Pyblio import Open, Fields
database = Open.bibopen(sys.argv[2], "bibtex")
for entry in database.iterator():
title = entry['title'].text
# do some transforms...
title = title.lower()
entry['title'] = Fields.Text(title)
Open.bibwrite(database.iterator (), how='bibtex', out=open(sys.argv[3], 'w'))