In-progress browser for a directory of text files
Go to file
Kartik K. Agaram 2c62076108 Merge driver.love 2024-06-16 06:47:45 -07:00
assets Merge driver.love 2023-12-13 20:14:39 -08:00
0000-freewheeling-start Merge template-live-editor 2023-04-16 11:30:56 -07:00
0001-on Merge luaML.love 2023-12-26 09:36:41 -08:00
0002-Debug_animations_in_progress debug animations 2023-11-11 10:00:54 -08:00
0002-vx undo 2 most recent commits 2023-10-25 09:29:22 -07:00
0003-refresh_debug_animations debug animations 2023-11-11 10:00:54 -08:00
0003-scale undo 2 most recent commits 2023-10-25 09:29:22 -07:00
0004-on.update debug animations 2023-11-11 10:00:54 -08:00
0004-vy undo 2 most recent commits 2023-10-25 09:29:22 -07:00
0005-Cursor_node make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0005-animate debug animations 2023-11-11 10:00:54 -08:00
0006-loiter debug animations 2023-11-11 10:00:54 -08:00
0006-on.mouse_press better experience of moving a node around 2023-12-21 08:10:05 -08:00
0007-on_text mock-up of reply buttons 2023-06-22 18:17:01 -07:00
0007-save_callstack debug animations 2023-11-11 10:00:54 -08:00
0008-Debug_animation_period debug animations 2023-11-11 10:00:54 -08:00
0008-Viewport Merge driver.love 2024-06-16 06:47:45 -07:00
0009-on.code_change start rendering file picker on the surface as well 2023-06-21 22:28:56 -07:00
0010-initialize_editor Merge luaML.love 2024-01-15 03:51:16 -08:00
0011-box_height snapshot: commit 0ca5bb0e8d, take 2 2023-10-25 09:30:50 -07:00
0012-on.initialize bugfix: keep Viewport dimensions more up to date 2023-12-17 13:16:08 -08:00
0013-font make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0014-y_of_schema1 bugfix: pin down schema1->y behavior 2023-10-25 00:11:58 -07:00
0015-line_height make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0016-schema1_of_y make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0017-on.mouse_release better experience of moving a node around 2023-12-21 08:10:05 -08:00
0018-on.update better experience of moving a node around 2023-12-21 08:10:05 -08:00
0019-B Merge luaML.love 2023-10-27 18:23:24 -07:00
0021-compute_layout Merge driver.love 2023-10-27 18:35:54 -07:00
0022-on.text_input Merge driver.love 2023-10-28 01:26:13 -07:00
0023-on.keychord_press make space if needed when adding lines to a definition 2023-12-21 20:50:31 -08:00
0024-copy_shape make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0025-add_thick_line make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0026-on.draw don't show padding when collisions won't happen 2023-12-22 18:48:40 -08:00
0027-Surface undo 2 most recent commits 2023-10-25 09:29:22 -07:00
0028-A Merge driver.love 2023-10-27 18:35:54 -07:00
0030-update_editor_box Merge luaML.love 2024-01-15 03:51:16 -08:00
0031-cols some helpers 2023-06-20 17:34:03 -07:00
0032-rows some helpers 2023-06-20 17:34:03 -07:00
0033-test_y_of_schema1 bugfix: pin down schema1->y behavior 2023-10-25 00:11:58 -07:00
0034-dump_state snapshot: insight 2023-10-25 16:14:08 -07:00
0035-mouse_cursor make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0035-pan_viewport_to_contain_cursor clean up debug prints 2023-10-27 18:26:29 -07:00
0036-Mouse_cursor make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0037-set_mouse_cursor make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0040-Menu_background_color make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0041-Menu_border_color make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0042-Menu_command_color make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0043-Menu_highlight_color make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0044-add_hotkey_to_menu make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0052-draw_cursor make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0061-on.key_release get rid of animation and editor movement 2023-06-18 13:04:18 -07:00
0062-on.save_settings remember directory to browse across restart 2023-10-20 00:10:07 -07:00
0081-draw_menu_bar load in-memory data for a thread 2023-06-18 20:10:20 -07:00
0096-iscale make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0097-sy make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0098-sx make order of files consistent with upstream 2023-04-22 18:50:18 -07:00
0106-on.load_settings remember directory to browse across restart 2023-10-20 00:10:07 -07:00
0110-Border_color new fork: pothi 2023-06-18 11:16:58 -07:00
0110-on.mouse_wheel_move support mouse wheel 2023-06-18 22:18:53 -07:00
0111-Files load in-memory data for a thread 2023-06-18 20:10:20 -07:00
0112-Global_state start rendering file picker on the surface as well 2023-06-21 22:28:56 -07:00
0113-draw_surface start rendering file picker on the surface as well 2023-06-21 22:28:56 -07:00
0117-open_thread bounds when panning by keyboard 2023-06-23 22:45:55 -07:00
0118-load_subtree reply starting to work 2023-06-22 23:43:03 -07:00
0119-load_metadata Merge driver.love 2023-12-18 13:05:54 -08:00
0120-initialize_item more conflict-resistant comment storage 2023-07-16 13:45:30 -07:00
0121-draw_debug Merge driver.love 2023-11-26 23:02:32 -08:00
0121-full_path support browsing directories outside save dir 2023-10-20 00:00:38 -07:00
0122-Show_debug spawning tries 10 times to avoid overlap 2023-11-26 22:55:54 -08:00
0122-metadata_file load in-memory data for a thread 2023-06-18 20:10:20 -07:00
0124-Indent start rendering the initialized thread 2023-06-20 20:10:10 -07:00
0125-Width start rendering the initialized thread 2023-06-20 20:10:10 -07:00
0127-Inter_comment_spacing add some vertical space between comments 2023-06-20 22:39:45 -07:00
0128-reset_viewport start rendering file picker on the surface as well 2023-06-21 22:28:56 -07:00
0129-initialize_file_picker support browsing directories outside save dir 2023-10-20 00:00:38 -07:00
0130-lay_out_file_picker start rendering file picker on the surface as well 2023-06-21 22:28:56 -07:00
0131-File_picker_margin start rendering file picker on the surface as well 2023-06-21 22:28:56 -07:00
0132-in_rect click on file picker to open thread 2023-06-21 22:48:47 -07:00
0132-on.resize typo X-( 2023-12-17 14:32:35 -08:00
0133-Reply_button_border_color start drawing 'reply' buttons under items 2023-06-21 23:28:25 -07:00
0134-Reply_button_color start drawing 'reply' buttons under items 2023-06-21 23:28:25 -07:00
0135-on_button mock-up of reply buttons 2023-06-22 18:17:01 -07:00
0136-update_all_editors start saving changes 2023-06-22 18:18:02 -07:00
0137-quit_all_editors save to disk when leaving thread view 2023-06-22 18:23:04 -07:00
0138-on.quit save to disk when leaving thread view 2023-06-22 18:23:04 -07:00
0139-new_comment more conflict-resistant comment storage 2023-07-16 13:45:30 -07:00
0141-indent reply button adds a reply 2023-06-22 19:35:13 -07:00
0142-reply_button couple of renames 2023-06-22 23:49:49 -07:00
0143-find_node reply starting to work 2023-06-22 23:43:03 -07:00
0144-new_comment_id more conflict-resistant comment storage 2023-07-16 13:45:30 -07:00
0145-save_metadata use absolute path for metadata 2023-10-19 23:49:23 -07:00
0146-find_comment_index reply starting to work 2023-06-22 23:43:03 -07:00
0147-Viewport_bounds bounds when panning by keyboard 2023-06-23 22:45:55 -07:00
0148-compute_viewport_bounds bounds when panning by keyboard 2023-06-23 22:45:55 -07:00
0149-Random_string_chars more conflict-resistant comment storage 2023-07-16 13:45:30 -07:00
0150-random_string more conflict-resistant comment storage 2023-07-16 13:45:30 -07:00
0151-comment_path more conflict-resistant comment storage 2023-07-16 13:45:30 -07:00
0152-Data_dir require the argument 2023-10-20 00:04:23 -07:00
LICENSE.txt add a license 2022-05-16 18:51:28 -07:00
Manual_tests.md Merge luaML.love 2023-12-07 01:28:07 -08:00
MemoryReferenceInfo.lua.0 remove some memory leaks from rendered fragments 2022-06-10 11:16:41 -07:00
MemoryReferenceInfo.lua.unused clean up memory leak experiments 2022-06-10 13:46:59 -07:00
README.md fix a crash involving mouse and drawings 2024-06-09 13:17:55 -07:00
app.lua Merge luaML.love 2024-06-11 13:31:15 -07:00
button.lua bugfix :( 2023-12-18 21:39:01 -08:00
default_map suggest a default layout for freewheeling apps 2023-11-11 10:31:25 -08:00
edit.lua Merge driver.love 2024-06-16 06:47:45 -07:00
file.lua audit all asserts 2023-11-18 11:32:01 -08:00
json.lua forgot to add json.lua 2022-05-15 14:36:25 -07:00
keychord.lua support for num pad 2023-07-07 18:40:12 -07:00
live.lua Merge driver.love 2023-12-15 15:35:04 -08:00
main.lua Merge driver.love 2024-05-20 00:34:41 -07:00
nativefs.lua cleaner API for file-system access 2023-08-30 19:04:06 -07:00
reference.md Merge driver.love 2024-06-16 06:47:45 -07:00
search.lua Merge text0 2024-06-11 12:54:49 -07:00
select.lua Merge lines.love 2024-06-11 12:13:18 -07:00
test.lua show another detail on test failure 2023-01-20 21:48:49 -08:00
text.lua Merge driver.love 2024-06-11 13:33:38 -07:00
text_tests bugfix: clear selection when clicking above or below lines 2023-09-20 13:39:29 -07:00
text_tests.lua Merge luaML.love 2024-06-11 13:31:15 -07:00
undo.lua fix a couple of asserts missed in the recent audit 2023-12-09 09:22:45 -08:00

README.md

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

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