~akkartik/pothi.love

In-progress browser for a directory of text files
51436376 — Kartik K. Agaram 7 days ago
Merge driver.love
b9af90ae — Kartik K. Agaram 7 days ago
bugfix
0a532168 — Kartik K. Agaram 13 days ago
Merge driver.love

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~akkartik/pothi.love
read/write
git@git.sr.ht:~akkartik/pothi.love

You can also use your local clone with git send-email.

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

0 dependencies!

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 edit articles and reply to them. There isn't any metadata for author or timestamp yet, so it's up to you to add them in the comment body. You're also on your own to commit the changes to git and publish them somewhere others can get to them.

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

This repo is an example of a Freewheeling App, designed above all to be easy to run, easy to modify and easy to share.

#Getting started

Install LÖVE. It's just a 5MB download, open-source and extremely well-behaved.

To run from the terminal, pass this directory to LÖVE, optionally with a directory to browse.

#Terminal invocation

You can run this app from the terminal just like any other LÖVE app. This ability is particularly useful if you would like to maintain multiple directories of articles and switch between them.

To load any other directories besides data/, run the app from a terminal and provide the name of the directory in the command.

As a concrete example, suppose you've set things up so you can run the app from the terminal by running:

love pothi.love

Further suppose you loaded some articles as follows:

cd ~/.local/share/love/pothi
git clone http://canonical.org/~kragen/sw/pavnotes2.git   # no directory name provided
# articles now saved to a directory called pavnotes2
mkdir pavnotes2/comments

To now browse these articles, you'd run:

love pothi.love pavnotes2

#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.

If the app being modified by the driver lives in a .love file, your changes will go into the save directory. If it lives in a directory (like this repo), your changes will go straight into the same directory.

#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

  • No support yet for Unicode graphemes spanning multiple codepoints.

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

  • 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. Messages, PRs, patches, forks, it's all good.