Skip to content

Commit

Permalink
Add example usage, link to datacite
Browse files Browse the repository at this point in the history
  • Loading branch information
plebln committed Mar 25, 2018
1 parent aa673b0 commit 469c795
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ Begun by Peter L. Evans in Berlin, Germany, March 2018.

Bibliographic chaos may ensue if it is not used correctly.

Use under Gnu Public License (GPL) Version 3.0. See LICENCE.
This software comes with absolutely no warranty.
Use under Gnu Public License (GPL) Version 3.0. http://www.gnu.org/licenses/

xml2bib is Copyright (C) 2018 Peter L. Evans.
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see `LICENSE` for details.

BibTeX is a widely-used format for references, introduced by Oren
Patashnik in the late 20th century. Despite its age, it is still
Expand All @@ -18,6 +21,7 @@ http://www.bibtex.org/Format/

DataCite is ... the provider and maintainer of DataCite XML,
a schema for metadata about digital objects.
http://datacite.org


Using xml2bib
Expand All @@ -29,6 +33,11 @@ Using xml2bib

e.g. python xml2bib.py xmlfiles/* runs xml2bib on all the files listed on the command line.

2. As a Python module. Load your XML, then call xml2dict, and the str() method of BibTeXWriter. [add example]
2. As a Python module. Load your XML, then call xml2dict, and the str() method of BibTeXWriter.

import xml2bib

x = xml2bib.XMLReader('mydatacitefile.xml')
d = xml2bib.xml2dict(x)
print(str(BibTeXWriter('mytagname', d)))

0 comments on commit 469c795

Please sign in to comment.