visualize a Mastodon thread
Go to file
Kartik K. Agaram 9b24e63e8c Merge luaML.love 2024-06-16 06:38:45 -07:00
assets screenshot; result of windows test 2023-02-19 00:57:25 -08:00
0000-freewheeling-start Merge template-live-editor 2023-04-16 11:30:56 -07:00
0001-on wire up mouse move handler 2023-12-26 08:28:23 -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 Merge template-live-editor 2023-04-16 11:30:56 -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 Merge luaML.love 2023-10-25 20:44:22 -07:00
0007-save_callstack debug animations 2023-11-11 10:00:54 -08:00
0007-to_text undo 2 most recent commits 2023-10-25 09:29:22 -07:00
0008-Debug_animation_period debug animations 2023-11-11 10:00:54 -08:00
0008-Viewport document a desirable invariant 2024-06-16 05:15:01 -07:00
0009-on.code_change bugfix: don't query network while panning around 2023-10-15 20:18:19 -07:00
0010-initialize_editor Merge template-live-editor 2023-12-29 15:43:24 -08:00
0011-box_height snapshot: commit 0ca5bb0e8d, take 2 2023-10-25 09:30:50 -07:00
0012-on.initialize undo 2 most recent commits 2023-10-25 09:29:22 -07:00
0013-font Merge template-live-editor 2023-04-16 11:30:56 -07:00
0014-y_of_schema1 bugfix: pin down schema1->y behavior 2023-10-25 00:11:58 -07:00
0015-line_height Merge template-live-editor 2023-04-16 11:30:56 -07:00
0016-schema1_of_y Merge template-live-editor 2023-04-16 11:30:56 -07:00
0017-on.mouse_release Merge luaML.love 2023-04-22 22:42:42 -07:00
0018-on.update Merge template-live-editor 2023-04-16 11:30:56 -07:00
0019-B snapshot: a whole new approach to panning 2023-10-27 16:07:34 -07:00
0021-compute_layout Merge luaML.love 2023-10-27 18:31:02 -07:00
0022-on.text_input bugfix: switch text_input to new panning impl 2023-10-27 23:01:46 -07:00
0023-on.keychord_press clean up debug prints 2023-10-27 18:26:29 -07:00
0024-copy_shape Merge template-live-editor 2023-04-16 11:30:56 -07:00
0025-add_thick_line Merge template-live-editor 2023-04-16 11:30:56 -07:00
0026-on.draw up and down arrow working at all 3 zoom levels 2023-10-27 17:13:28 -07:00
0027-Surface undo 2 most recent commits 2023-10-25 09:29:22 -07:00
0028-A Merge luaML.love 2023-10-27 18:31:02 -07:00
0030-update_editor_box bugfix: switch text_input to new panning impl 2023-10-27 23:01:46 -07:00
0031-Input_filename support LÖVE v12 2023-10-15 12:53:50 -07:00
0031-cols some helpers 2023-06-20 17:34:03 -07:00
0032-load_from_iterator Merge luaML.love 2023-04-16 12:22:20 -07:00
0032-rows some helpers 2023-06-20 17:34:03 -07:00
0033-split_lines Merge luaML.love 2023-04-16 12:22:20 -07:00
0033-test_y_of_schema1 bugfix: pin down schema1->y behavior 2023-10-25 00:11:58 -07:00
0034-add_edge Merge luaML.love 2023-04-16 12:22:20 -07:00
0034-dump_state snapshot: insight 2023-10-25 16:14:08 -07:00
0035-Nodes Merge luaML.love 2023-04-16 12:22:20 -07:00
0035-pan_viewport_to_contain_cursor clean up debug prints 2023-10-27 18:26:29 -07:00
0036-compute_ntracks Merge luaML.love 2023-04-16 12:22:20 -07:00
0037-ntracks Merge luaML.love 2023-04-16 12:22:20 -07:00
0038-to_node Merge luaML.love 2023-04-16 12:22:20 -07:00
0039-ensure_cursor_node_within_viewport bugfix: don't query network while panning around 2023-10-15 20:18:19 -07:00
0040-add_node Merge luaML.love 2023-04-16 12:22:20 -07:00
0041-header Merge luaML.love 2023-04-16 12:22:20 -07:00
0042-Root Merge luaML.love 2023-04-16 12:22:20 -07:00
0043-render_nodes_to_surface bugfix: don't query network while panning around 2023-10-15 20:18:19 -07:00
0044-dehtml Merge luaML.love 2023-04-16 12:22:20 -07:00
0045-render_node_and_descendants Merge luaML.love 2023-04-16 12:22:20 -07:00
0046-xposition Merge luaML.love 2023-04-16 12:22:20 -07:00
0048-get_toot support LÖVE v12 2023-10-15 12:53:50 -07:00
0049-load_nodes_from_url bugfix: don't query network while panning around 2023-10-15 20:18:19 -07:00
0050-Url comment 2023-10-15 15:09:56 -07:00
0051-ml_from_url support LÖVE v12 2023-10-15 12:53:50 -07:00
0052-url_from_ml support LÖVE v12 2023-10-15 12:53:50 -07:00
0053-load_nodes_from_input_file bugfix: don't query network while panning around 2023-10-15 20:18:19 -07:00
0054-load_nodes_from_json bugfix: don't query network while panning around 2023-10-15 20:18:19 -07:00
0055-set_cursor bugfix: don't query network while panning around 2023-10-15 20:18:19 -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:27:37 -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 text0 2024-06-11 12:54:49 -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 template-live-editor 2024-06-16 06:34:16 -07:00
file.lua audit all asserts 2023-11-18 11:32:01 -08:00
input show creator and timestamp for each toot 2023-02-19 00:04:22 -08:00
input2 ensure cursor is initially on viewport 2023-02-19 00:05:11 -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 rename a function to be more specific 2023-12-15 15:17:28 -08:00
main.lua Merge luaML.love 2024-05-20 00:24:27 -07:00
nativefs.lua cleaner API for file-system access 2023-08-30 19:04:06 -07:00
reference.md fix some names in documentation 2024-06-16 05:18:59 -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 text0 2024-06-11 12:54:49 -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 text0 2024-06-11 12:54:49 -07:00
undo.lua fix a couple of asserts missed in the recent audit 2023-12-09 09:22:45 -08:00
unfurl.lua delete unused vars 2024-02-03 05:43:06 -08:00

README.md

Visualize a Mastodon thread tree

An experiment inspired by Colin Wright's Chartodon.

demo (video; 20 seconds)

Cons:

  • Doesn't run in a browser. You need to install several small, reputable Lua tools.
  • Not as pretty as Chartodon.
  • Might not work on Windows. Please report your experience if you try it.

Pros:

  • Use keyboard shortcuts to browse the graph.
    • ctrl+up to parent
    • ctrl+down to first child
    • ctrl+left to previous sibling
    • ctrl+right to next sibling
  • Much easier to modify to your needs than a web browser. You can modify it while it's running (see below).

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 (LÖVE v11)

Install the Lua programming language. Just a 200KB download, open source and with a stellar reputation. I'll assume below that you can invoke it using the lua command, but that might vary depending on your OS.

Install the luasec library for https access. One way to accomplish this is to install the LuaRocks package manager and then:

$ luarocks install luasec

(I haven't been able yet to install luarocks+luasec on Windows 11.)

Install the LÖVE game engine. 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 unfurl.lua from this directory, passing in a link to some toot. For example:

lua unfurl.lua https://merveilles.town/@akkartik/108773157588384635

unfurl.lua will make some Mastodon API requests before passing the results to LÖVE.

Click on any toot to copy its URL to the clipboard.

Getting started (LÖVE v12 pre-release)

Install LÖVE from a nightly build.

  • Go to https://github.com/love2d/love/actions
  • Click on the most recent successful build (with a green check mark before it)
  • Scroll down to the "Artifacts" section
  • Download the artifact for your OS
    • If you don't have a Github account, these won't be clickable. Copy the URL for the build and paste it into https://nightly.link to get clickable links to artifacts.

Run LÖVE from the commandline and pass in this directory. Optionally also pass in a link to a Mastodon toot.

Copy a link to any mastodon toot and paste it into the app window using ctrl+v to view it in the context of its thread.

Click on any toot to copy its URL to the clipboard.

Hacking

To modify the code for the app 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

  • ctrl + arrow keys to move around
  • ctrl+= to zoom in, ctrl+- to zoom out, ctrl+0 to reset zoom

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.

  • 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 a simple Lua-based markup language. Updates to it can be downloaded from:

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

Feedback

Most appreciated.