Kartik K. Agaram 18036ed89f | ||
---|---|---|
assets | ||
0000-freewheeling-start | ||
0001-on | ||
0002-Debug_animations_in_progress | ||
0002-vx | ||
0003-refresh_debug_animations | ||
0003-scale | ||
0004-on.update | ||
0004-vy | ||
0005-Cursor_node | ||
0005-animate | ||
0006-loiter | ||
0006-on.mouse_press | ||
0007-save_callstack | ||
0007-to_text | ||
0008-Debug_animation_period | ||
0008-Viewport | ||
0009-on.code_change | ||
0010-initialize_editor | ||
0011-box_height | ||
0012-on.initialize | ||
0013-font | ||
0014-y_of_schema1 | ||
0015-line_height | ||
0016-schema1_of_y | ||
0017-on.mouse_release | ||
0018-on.update | ||
0019-B | ||
0021-compute_layout | ||
0022-on.text_input | ||
0023-on.keychord_press | ||
0024-copy_shape | ||
0025-add_thick_line | ||
0026-on.draw | ||
0027-Surface | ||
0028-A | ||
0030-update_editor_box | ||
0031-Input_filename | ||
0031-cols | ||
0032-load_from_iterator | ||
0032-rows | ||
0033-split_lines | ||
0033-test_y_of_schema1 | ||
0034-add_edge | ||
0034-dump_state | ||
0035-Nodes | ||
0035-pan_viewport_to_contain_cursor | ||
0036-compute_ntracks | ||
0037-ntracks | ||
0038-to_node | ||
0039-ensure_cursor_node_within_viewport | ||
0040-add_node | ||
0041-header | ||
0042-Root | ||
0043-render_nodes_to_surface | ||
0044-dehtml | ||
0045-render_node_and_descendants | ||
0046-xposition | ||
0048-get_toot | ||
0049-load_nodes_from_url | ||
0050-Url | ||
0051-ml_from_url | ||
0052-url_from_ml | ||
0053-load_nodes_from_input_file | ||
0054-load_nodes_from_json | ||
0055-set_cursor | ||
LICENSE.txt | ||
Manual_tests.md | ||
MemoryReferenceInfo.lua.0 | ||
MemoryReferenceInfo.lua.unused | ||
README.md | ||
app.lua | ||
button.lua | ||
default_map | ||
edit.lua | ||
file.lua | ||
input | ||
input2 | ||
json.lua | ||
keychord.lua | ||
live.lua | ||
main.lua | ||
nativefs.lua | ||
reference.md | ||
search.lua | ||
select.lua | ||
test.lua | ||
text.lua | ||
text_tests | ||
text_tests.lua | ||
undo.lua | ||
unfurl.lua |
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 parentctrl+down
to first childctrl+left
to previous siblingctrl+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:
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 aroundctrl+=
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:
- https://git.sr.ht/~akkartik/mastodon-unfurl.love
- https://tildegit.org/akkartik/mastodon-unfurl.love
- https://git.merveilles.town/akkartik/mastodon-unfurl.love
- https://nest.pijul.com/akkartik/mastodon-unfurl.love (using the Pijul version control system)
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.