mdepub is a tool that allows you to compose a book in Markdown format and use Pandoc and Calibre to compile an Epub package including all of the book's source material. In effect, you can keep the source and product in the same file in your library; if you ever want to revise the product, you merely need to extract the source, make edits, and recompile.
Generic Pager is a class that can be used to browse listings of entries split into multiple pages. It takes as parameters the total number of list entries, the limit of entries to display per page, and the number of the current page. The class can generate an HTML list with links to browse the listing pages, optionally with links to the previous, next, first, and last pages. The text labels and the CSS classes of the links are configurable.