Book management 2014/Technical notes
Jump to navigation Jump to search
- A comparison of various array lookup methods in php.
- Best implementation:
- Initially flip the array so that the keys become values and values the keys.
- Look-up for current page title to get its index from the flipped array.
- Retrieve the previous and next page titles from the original array using the index of current page.
- Implementation of above method using array_flip().
Migration of existing books to JSON structure
- Currently chapters in wikibooks are stored as subpages of book top page.
- For example, this book.
- 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.
- 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