= Dit is de Wiki van het DJANGO project = == De projectgegevens van dit project zijn: == ||Project identifier||'''IST:QI:DJANGO'''|| ||Korte beschrijving||Django scripts|| ||Subversion URL||https://svn.tnw.tudelft.nl/IST-QI/DJANGO/|| ||Trac URL||https://svn/trac/IST-QI/DJANGO/|| ||ViewVC URL||https://svn.tnw.tudelft.nl/viewvc/IST-QI-DJANGO/|| ---- == Howto: import BibTeX file == BibTeX files (`.bib`) can be imported using the parsebib.py script which is available in `django/mysite/papers/`. This script makes heavy use of the `parse_file` and `parse_string` from `zs.bibtex.parser`. The bibfile must be prepared for importing. First make sure only ASCII characters are used. Every `\` must be replaced by `\\\` (note: three backslashes). Remove all empty lines at the end of the file. Copy all pdf files that must be attached to the `/var/www/media/papers/` directory. Check if all filenames match the citekeys in the bibfile (be aware of Capitals). Also make sure all files have `.pdf` as extension and not `.PDF`. After that check the bibfile in python with the `parse_file` routine: {{{ $ python manage.py shell >>> from zs.bibtex.parser import parse_file >>> a = parse_file("bladiebla.bib") }}} If no errors are reported you can use the `parsebib.py` script: {{{ $ python manage.py shell >>> from papers import parsebib >>> parsebib.parse("bladiebla.bib") }}} In case of duplicate citekeys this will be reported. Also the number of new entries are given.