From 469c795a89c15defe3a6ef2075275cf13ceb90c5 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Sun, 25 Mar 2018 23:57:59 +0200 Subject: [PATCH] Add example usage, link to datacite --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bc7beac..bbfb8af 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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)))