1# TODO 2 3Things that need to/should be done, as of May 2023 4 5 6## Refactor plugin code 7 8The code is not in very good shape and should be refactored and properly documented. 9 10Some references how to properly format the code (including PHP style guides): 11 12* https://pear.php.net/manual/en/standards.php 13 14Nowadays, it seems that the PHP-FIG guys are the most accepted, with PSR-1, PSR-12, and PER: 15 16* https://www.php-fig.org/psr/psr-1/ 17* https://www.php-fig.org/psr/psr-12/ 18* https://www.php-fig.org/per/coding-style/ 19 20Another thing missing is a proper documentation (at least of the code as such). Coming from Python/Sphinx, documentation integrating both, API and user documentation, seems still in its infancies in PHP. However, phpDocumentor seems to be the *de facto* standard: 21 22* https://phpdoc.org/ 23* https://docs.phpdoc.org/ 24 25 26## Better error handling 27 28Currently, most errors in BibTeX files (and it is damn easy to have typos and alike in BibTeX files) get ignored silently, *i.e.* some things might not work due to not obvious reasons. 29 30DokuWiki seems to have good messaging capabilities, hence make use of these to display problems to the user. 31 32 33## Replace BibTeX backend code 34 35Currently, the BibTeX parsing relies on rather old and badly changed code. Perhaps exchanging with newer code from the "PHP BibTeX Parser 2.x" project would be an option: 36 37* https://github.com/renanbr/bibtex-parser 38 39That would be available via composer and seems actively developed. 40 41First speed tests with a larger bibliography (>2500 entries) shows reasonable speed (< 1 sec). 42 43 44## Add proper handling of citation styles 45 46Nowadays there is things such as the "Citation Style Language (CSL)", and PHP processors for this thing, such as 47 48* https://github.com/seboettg/citeproc-php/ 49 50Perhaps that would be a (long-term) option to have proper handling of citation styles from within the DokuWiki BibTeX plugin. 51 52 53## Some GUI for managing bibliographies? 54 55Probably not sensible in times of Mendeley, JabRef, and other much more powerful tools. But eventually... 56 57However, the main focus of the plugin remains allowing to reference literature from within the DokuWiki, much the same as BibTeX allows authors to reference literature in their writings. Managing a bibliographic database is an entirely different issue. 58