13 | | BibTeX webapplication is tested on: |
14 | | || ||Windows||MacOS|| |
15 | | ||chrome||OK||OK|| |
16 | | ||firefox||OK||OK|| |
17 | | ||ie||OK||:-)|| |
18 | | ||safari||OK||OK|| |
19 | | ||opera||OK||?|| |
| 13 | == Howto: import BibTeX file == |
| 14 | |
| 15 | BibTeX files (.bib) can be imported using the parsebib.py script |
| 16 | which is available in django/mysite/papers/. This script makes |
| 17 | heavy use of the parse_file and parse_string from zs.bibtex.parser. |
| 18 | |
| 19 | The bibfile must be prepared for importing. First make sure only |
| 20 | ASCII characters are used. Every \ must be replaced by \\\ (note: |
| 21 | three backslashes). Remove all empty lines at the end of the file. |
| 22 | |
| 23 | Copy all pdf files that must be attached to the /var/www/media/papers |
| 24 | directory. Check if all filenames match the citekeys in the bibfile |
| 25 | (be aware of Capitals). Also make sure all files have .pdf as extension |
| 26 | and not .PDF |
| 27 | |
| 28 | After that check the bibfile in python with the parse_file routine: |
| 29 | $ python manage.py shell |
| 30 | >>> from zs.bibtex.parser import parse_file |
| 31 | >>> a = parse_file("bladiebla.bib") |
| 32 | |
| 33 | If no errors are reported you can use the parsebib.py script: |
| 34 | $ python manage.py shell |
| 35 | >>> from papers import parsebib |
| 36 | >>> parsebib.parse("bladiebla.bib") |
| 37 | |
| 38 | In case of duplicate citekeys this will be reported. Also the number |
| 39 | of new entries are given. |