Last modified: 2014-02-21 00:06:40 UTC
Djvu files, the main image+text multipage file used by wikisiurce projects, has a very interesting txt layer but mediawiki can't access to it (but rough extraction of puure text). Some new API actions, added both to Commons and to Wikisource projects API, would allow to retrieve most interesting data from the whole file or for selected pages. While reading functions are safe, writing functions can be destructive, even if they could be very useful to advanced users; so I think that first step would be to implement only read-only functions. djvutext (to read structured text in lisp-like syntax) and djvutoxml (to extract structured text in xml) would be IMHO the first two routines to implement.
It would be best if possible to have a common interface for multiple file types; PDF also can embed text for instance. What sort of data format are you envisioning, and what sort of uses?