pothi.love/README.md

4.2 KiB

In progress. Browse a directory of articles like Kragen Sitaker's dercuano.

My tentative goal is to be able to post comments on articles, send updates around using git, and browse comments from all commenters in line with articles. It's unclear whether it will be economical to support editing articles. My priority is a commenting experience rather than a CMS for the author(s) of articles.

Status: you can read articles. There's a 'comment' button, but it doesn't do anything yet.

The name: 'pothi' is Sanskrit for 'book', often a loose-bound collection of palm leaf manuscripts.

pothi.love is a "freewheeling" app that you can read and modify the source code for as it runs. Designed above all to be easy to modify and give you early warning if your modifications break something.

Getting started

Install LÖVE. It's just a 5MB download, open-source and extremely well-behaved. I'll assume below that you can invoke it using the love command, but that might vary depending on your OS.

Run this app from the terminal, passing its directory to LÖVE. pothi.love will print the path where it expects to find articles. Quit, create a folder called data/ under this path, put text files there. Restart.

For example, I created the data/ dir using these commands on my machine:

cd ~/.local/share/love/pothi
git clone http://canonical.org/~kragen/sw/pavnotes2.git data

And now I can see the files when I restart:

love ~/pothi

The app will open to a directory view by default (though there's no scrolling or filtering yet, sorry..). Click on any filename to read it.

Hacking

To modify it live without restarting the app each time, download the driver app. Here's an example session using a different app:

making changes without restarting the app

Some reference documentation on how to create your own apps.

To publish your changes:

  • delete all files with a numeric prefix from the repo, and then
  • move all files with a numeric prefix from the save directory to the repo.

Keyboard shortcuts

While reading a single file:

  • ctrl+o to switch to a different file

  • ctrl+f to search for strings

  • ctrl+= to zoom in, ctrl+- to zoom out, ctrl+0 to reset zoom

  • mouse drag or shift + movement to select text, ctrl+a to select all

  • mouse drag and arrow keys pan the surface

  • shift+arrow keys pan faster

    • pagedown and pageup are aliases for shift+down and shift+up respectively

Exclusively tested so far with a US keyboard layout. If you use a different layout, please let me know if things worked, or if you found anything amiss: http://akkartik.name/contact

Known issues

  • Both freewheeling apps and the driver for them currently benefit from being launched in terminal windows rather than by being clicked on in a desktop OS. See the driver app for details.

  • No support yet for Unicode graphemes spanning multiple codepoints.

  • No support yet for right-to-left languages.

  • Undo/redo may be sluggish in editor windows containing large files. Large files may grow sluggish in other ways.

  • If you kill the process, say by force-quitting because things things get sluggish, you can lose data.

  • Can't scroll while selecting text with mouse.

  • No scrollbars yet. That stuff is hard.

Mirrors and Forks

This repo is a fork of lines.love, an editor for plain text where you can also seamlessly insert line drawings. Its immediate upstream is text.love, a version without support for line drawings. Updates to it can be downloaded from the following mirrors:

Further forks are encouraged. If you show me your fork, I'll link to it here.

Feedback

Most appreciated.