Menu

dokuwiki plugin for wikindx

2008-05-24
2013-01-28
  • Andreas Wagner

    Andreas Wagner - 2008-05-24

    Hi all,
    I have made a first attempt at writing a dokuwiki-plugin for wikindx. It adds a new tag that queries a configurable wikindx site and puts references back.

    I'd be happy to get some feedback and ideas for improvement. (Unfortunately I won't be able to create new user accounts on the wiki below for you for testing, so you'd have to copy the plugin to some dokuwiki site where you can edit stuff.)

    It can be seen in action here: http://www.frankfurterarbeitskreis.de/wikindx-test

    and it is just one file (to be placed in dokuwiki-root/lib/plugins/wikindx/syntax.php, can be seen/studied here: http://wikindx.1t2.us/4387

    Cheers,
    Andreas

     
    • Andreas Wagner

      Andreas Wagner - 2008-05-26

      Actually, what should we be expecting from wiki/wikindx interaction?
      What comes to my mind is that wikindx should be able to respond

      - to a query containing one or several resource Id/s (including specific passage/s and perhaps even a leading "see also" or sth. similar) with a formatted html string putting the full reference in whatever format is configured. (i.e. in parentheses, a footnote, with italics and dots as requiered by the style). Perhaps the query could include a style to use, but configuring it in wikindx is fine for now, I think.

      - to another type of query containing several references with a html string containing a bibliography-type listing formatted according to the configured style.

      - perhaps also to another type of query returning only the title, shorttitle or author of the specified work (as plaintext).

      The wiki on the other hand should keep track of which resources have been queried on the current page and use those if a call for a bibiography is to be made...
      Probably div/span classes would have to be insterted by wikindx tho, no?

      Other needs?

      PS. I admit that most of the reasoning above is just a reflection of LaTeX's \cite[][]{}, \citetitle{}, \bibliography{} and similar commands, so it is not very unlikely that I have missed important ways of working with those resources.

       
    • Mark Grimshaw

      Mark Grimshaw - 2008-05-26

      Hi Andreas,

      I don't have/use docuwiki so can't test this.  Thanks for your work anyway and I'm sure lots of people will find this useful.  In terms of the wiki/wikindx interoperability, have you had a look at the way wikindx interacts with moodle.  There is a separate plug-in/moodle filter for it but, previously, I also added core wikindx code for inserting wkindx resources into moodle and for handling citations in a block of moodle text.  See wikindx3/README_CMS.

      Mark

       
    • Andreas Wagner

      Andreas Wagner - 2008-05-27

      new version at http://wikindx.1t2.us/4754
      Now there's also a tag {{wikindxbib}} that delivers the whole list of used resources. (See the wikindx-test page from the original posting for how it looks like.)
      Next will be examination of wikindx's cmsprint.php

       
    • Mark Grimshaw

      Mark Grimshaw - 2008-05-28

      Hi Andreas,

      Looking good.

      Let me know if you need any advice.

      Mark

       
    • Mark Grimshaw

      Mark Grimshaw - 2008-05-28

      BTW -- I'm sure I set up cmsprint etc. to use wikindex's citation engine to parse a block of text for in-text citations rather than you needing to handle it yourself.  You can see it working via the Moodle wikindx filter:
      http://moodledev.yeovil.ac.uk/moodle/course/view.php?id=2

      Mark

       
    • Andreas Wagner

      Andreas Wagner - 2008-05-28

      Yep. I noticed this. In fact I've spent quite some time last evening trying to get CMS.php's queryDb function to accept an additional parameter $mode which could be "cite" or "bib", where "bib" would be the default and do what it does now (using bibstyle/bibformat) and "cite" would return an in-text reference depening on the selected style. But I got lost in the citestyle/citeformat jungle. I gave up for now.

      I suppose this really needs to be a jungle after all, because it has to take care of disambiguation and modify keys accordingly. In your opinion, does it make sense at all to have an externally-callable function to return such a short reference (in footnote or parentheses etc. html) for just a single queried resourceId, and thus, context-unaware as it would be, not able to cope with disambiguation at all?

      Other than that, I find creating a tempfile having that parsed by wikindx and read the results back into the cms/wiki site a somewhat cumbersome procedure. I have not yet thought about how I could do this in a plugin (probably the plugin would need to sort itself in very late in the page rendering; there are mechanisms for that but I'd have to tinker a lot, probably). Do you have any idea how this (having wikindx parse a passage of text) could be realized differently?

      Thanks,
      Andreas

       
    • Mark Grimshaw

      Mark Grimshaw - 2008-05-29

      Yes, it's certainly a jungle and could be tidied up a fair bit.  For a single quote, no disambiguation is required obviously yet the reader may require that the citation be presented in the preferred style (APA, Harvard etc.) so citation parsing is required.

      The answer to your last question presumably would be to have the bibformat/citeformat functions included in your dokuwiki plug-in.  Those functions have been extracted (an older version so not as up-to-date as found in wikindx) as OSBiB on the sourceforge bibliophile site.

      Mark

       
    • Andreas Wagner

      Andreas Wagner - 2008-11-27

      I have updated the plugin so that it can also display the notes that go along with some resource. I had to hack cmsprint.php and core/cms/CMS.php to achieve this and obviously the way to go would be now to also enable quotations, musings and the different listings that are already present in cmsprint.php. But to be honest, I don't have the time right now. And possibly will wait for v4 with further development. I only wanted this for our dokuwiki/wikindx installation...

      The plugin code and description, along with the diffs for the two wikindx files can be seen here: http://www.dokuwiki.org/plugin:wikindx

      And our own deployment here: http://www.commontology.de/polphil/literatur/einbindung_der_literaturdatenbank (in german)

      CU,
      Andreas

       
    • Mark Grimshaw

      Mark Grimshaw - 2008-11-28

      Thanks Andreas,

      Probably a good idea to wait for v4 until further development.

      Mark

       

Log in to post a comment.

Auth0 Logo