Changes between Version 5 and Version 6 of WikiStart
- Timestamp:
- 09/08/10 14:38:00 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart
v5 v6 13 13 == Howto: import BibTeX file == 14 14 15 BibTeX files ( .bib) can be imported using the parsebib.py script16 which is available in django/mysite/papers/. This script makes17 heavy use of the parse_file and parse_string from zs.bibtex.parser.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 18 19 19 The bibfile must be prepared for importing. First make sure only 20 ASCII characters are used. Every \ must be replaced by \\\(note:20 ASCII characters are used. Every `\` must be replaced by `\\\` (note: 21 21 three backslashes). Remove all empty lines at the end of the file. 22 22 23 Copy all pdf files that must be attached to the /var/www/media/papers23 Copy all pdf files that must be attached to the `/var/www/media/papers/` 24 24 directory. Check if all filenames match the citekeys in the bibfile 25 (be aware of Capitals). Also make sure all files have .pdfas extension26 and not .PDF25 (be aware of Capitals). Also make sure all files have `.pdf` as extension 26 and not `.PDF`. 27 27 28 After that check the bibfile in python with the parse_file routine: 28 After that check the bibfile in python with the `parse_file` routine: 29 30 {{{ 29 31 $ python manage.py shell 30 32 >>> from zs.bibtex.parser import parse_file 31 33 >>> a = parse_file("bladiebla.bib") 34 }}} 32 35 33 If no errors are reported you can use the parsebib.py script: 36 37 If no errors are reported you can use the `parsebib.py` script: 38 39 {{{ 34 40 $ python manage.py shell 35 41 >>> from papers import parsebib 36 42 >>> parsebib.parse("bladiebla.bib") 43 }}} 44 37 45 38 46 In case of duplicate citekeys this will be reported. Also the number