pjheslin / diogenes

Diogenes: an environment for reading Latin and Greek
https://d.iogen.es/d
Other
56 stars 10 forks source link

two feature suggestions #65

Closed jiang-qian closed 4 years ago

jiang-qian commented 4 years ago

First I'd like to thank the developer for this very useful program with clean-lined and elegant interface. To make it even more useful, I'd venture to make two suggestions for new features:

  1. In the search result, it would be nice to be able to sort by the date of the authors.

    This data is already available (e.g. one can set the range of work by filter). A chronological order of the instances of an obscure word would be extremely helpful for getting a sense of the progression of its meanings across time, and to locate the
    most likely sense in a particular work.

  2. An option to export an entire work (e.g. a poem, a play, or a book) to user friendly and searchable format like PDF or epub. This will make it easier to consult a work or check its text on a mobile device (e.g. phone or tablet), or simply have a paper copy. Right now, one can print out the text, (at most) 100 lines at a time, which makes printing a longer work laborious.

    If exporting to PDF or epub require too much work, perhaps an option can be added to display a work by section (e.g. a book of Homer or Aristotle, or the entire play) rather than by fixed number of lines. One can then print out text from that view.

pjheslin commented 4 years ago

Thanks for the feedback! You are not the first person to suggest these two features, so let me explain the background.

  1. The current search functionality was implemented 20 years ago when computers were much slower and could not fit the databases in memory. I made the choice to read in the files from disk as quickly as possible (by using the default Perl ordering, which translates directly to optimized C). But it is probably true that today that no longer matters. So I should probably re-implement this to search the authors in chronological order.

But this requires sitting down and looking at the information in the TLG database and coming up with a chronological ordering. A lot of the information there is quite vague, giving a wide span of dates, so it will not be trivial to come up with a sensible ordering. Furthermore, the PHI database does not have any chronological information, so that would mean coming up with a chronological ordering based on some other authority (Wikipedia?). So it's a fair bit of work to do, and it's not my top priority.

If, on the other hand, someone would like to volunteer to put together a chronological list of authors for the TLG and the PHI, I would be happy to implement it!

  1. I like the idea of exporting a work to read on a portable device (without a connection to the Internet and resources like e.g. DiogenesWeb). The easiest way to implement this would be to update the existing code that exports to LaTeX (which I have not used or tested for many years). But that would require the user to have latex installed to convert to PDF, which is not the case for most Diogenes users.

Your idea of epub is interesting. I don't know anything about the format, but a quick look on the web suggests it is just a subset of XHTML. It would not be too hard to write a tool that takes a work exported from Diogenes to XML and converts it to epub XHTML. In fact most of that code already exists in DiogenesWeb (though in Javascript). I'll think a bit more about that.

pjheslin commented 4 years ago

We've taken the discussion offline, so closing this issue.