Book management 2014/Technical notes

From Meta, a Wikimedia project coordination wiki

Efficient Navigation[edit]

Migration of existing books to JSON structure[edit]

  • Currently chapters in wikibooks are stored as subpages of book top page.
  • We need to store them in a JSON format to be used by the BookManagerv2 extension.
  • We can use MediaWiki web service API to extract the list of pages in a book.
    • For example: this request will list all the pages belonging to the book, Muggles' Guide to Harry Potter in JSON format.
  • The JSON data obtained above may then be decoded into a php array and copied to JSON book structure for BookManagerv2 using Edit action of Mediawiki API.
  • [[Category:Book:Book title]]
    can be added to the pages of a particular book through Edit action so as to allow display of navigation bar on the page.

Reading Interface[edit]

  • Javascript based Epub reader library
    • It provides various modes of reading. Check them out here.
    • We can use it as a reference while creating a full screen reading environment for our books.
    • This library is for epub documents. We will make neccessary modifications so that it works with html as well.
  • Book specific search can be implemented by using a search query with book title prefix. See this for example. Here 'pointer' keyword is being search in book 'C Programming' - uses CirrusSearch