{"id":13477388,"url":"https://github.com/tweekmonster/tmux2html","last_synced_at":"2025-05-16T12:07:24.909Z","repository":{"id":57476008,"uuid":"55025617","full_name":"tweekmonster/tmux2html","owner":"tweekmonster","description":":cat2: Render full tmux windows or individual panes as HTML","archived":false,"fork":false,"pushed_at":"2024-01-20T10:19:59.000Z","size":83,"stargazers_count":721,"open_issues_count":6,"forks_count":16,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-02T06:18:21.937Z","etag":null,"topics":["animation","capture","html","tmux"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tweekmonster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-30T02:23:00.000Z","updated_at":"2025-03-22T11:22:01.000Z","dependencies_parsed_at":"2024-10-28T04:07:43.104Z","dependency_job_id":null,"html_url":"https://github.com/tweekmonster/tmux2html","commit_stats":{"total_commits":68,"total_committers":2,"mean_commits":34.0,"dds":"0.014705882352941124","last_synced_commit":"20fb2409e7350d45814135a7421df35a98a61834"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tweekmonster%2Ftmux2html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tweekmonster%2Ftmux2html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tweekmonster%2Ftmux2html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tweekmonster%2Ftmux2html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tweekmonster","download_url":"https://codeload.github.com/tweekmonster/tmux2html/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999859,"owners_count":21031046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","capture","html","tmux"],"created_at":"2024-07-31T16:01:42.076Z","updated_at":"2025-04-09T08:04:11.678Z","avatar_url":"https://github.com/tweekmonster.png","language":"Python","funding_links":[],"categories":["Python","Plugins"],"sub_categories":[],"readme":"# tmux2html\n\ntmux2html captures full tmux windows or individual panes then parses their\ncontents into HTML in living ![color](https://cloud.githubusercontent.com/assets/111942/14111051/2aa0927e-f597-11e5-85d8-e529c803ec61.png).\nThe output can either be still snapshots, or animated sequences.\n\nWith a web server that uses gzip compression, the size over the network is\nnegligible for reasonably sized windows or panes.\n\n\n## Examples\n\nSome of these may be large in dimensions.  You'll need to zoom out if you want\nto see all panes at once.  These are not raster graphics!\n\n- ![Color](https://cloud.githubusercontent.com/assets/111942/14111051/2aa0927e-f597-11e5-85d8-e529c803ec61.png) `[disk: 135KB, gzip: 17KB]`: https://share.esdf.io/FGlV4sufpt/color.html\n- Single Pane `[disk: 124KB, gzip: 13KB]`: https://share.esdf.io/oby611JQvB/single.html\n- Full Window (Big) `[disk: 237KB, gzip: 21KB]`: https://share.esdf.io/9t7tgDC4Gf/full.html\n- Animated `[disk: 204KB, gzip: 146KB]`: https://share.esdf.io/sVu5q1xFk9/animated.html\n- Partially Animated (Big) `[disk: 122KB, gzip: 89KB]`: https://share.esdf.io/UNoltIEHt4/partial-animated.html\n  (Only some panes are animating)\n- Scrollable pane history `[disk: 83KB, gzip: 47KB]`: https://share.esdf.io/sEDNecDCat/scroll.html\n  (Scroll with the mouse wheel, or two fingers on a touch screen.)\n- Complete pane history `[disk: 63KB, gzip: 18KB]`: https://share.esdf.io/bvn100jhi7/history.html\n- Over kill animation `[disk: 679KB, gzip: 516KB]`: https://share.esdf.io/eSZQheewUL/absurd-animation.html\n  (This animation is recorded using a 10ms interval.  It will not be great on mobile devices.)\n- \"Streaming\": https://share.esdf.io/log.html\n  (This displays the HTTP log for the links above.)\n\nIf you decide to look at the telnet animations yourself and don't know how to\nexit, use `Ctrl-]` then type `quit`.  For the Star Wars animation, press\n`Ctrl-]\u003center\u003e` to get the prompt.\n\n\n## Rationale\n\nThis was a weekend project I made for fun and I have no particular use for it\nbeyond annoying my friends about how bad they should feel for not using tmux.\nI also thought it would be neat to have a render of my sessions that didn't\nresult in an image using some crummy font on a headless server.\n\nI suppose you can use cron to capture screens and display it on your website,\nor use it to create terminal snippets for your blog.  You could also load a\npane render in elinks within your coworker's session.  The only limit is your\nimagination, my friend. :sparkles:\n\n\n### What people think of tmux2html\n\n\u003e tmux2html 便利そう。\n\n  — [@nakamuray](https://twitter.com/nakamuray/status/717620065303015425)\n\n\u003e aaaaoooooo\n\n  — [@l4utert](https://twitter.com/l4utert/status/718046015908155393)\n\n\u003e 9:39:46 PM Jef Myers: what the fuck is tmux?\n\n  — Jef Myers\n\n\n## Requirements\n\n- tmux 1.8\n- Python 2.7 or 3.4 (could be wrong since it's not tested in lower versions)\n\n\n## Installation\n\n```shell\npip install tmux2html\n```\n\n\n## Usage\n\n```shell\ntmux2html 4 -o window_5_in_current_session.html\ntmux2html .0 -o first_pane_in_current_window.html\ntmux2html other:1.2 -o second_window_third_pane_in_other_session.html\n```\n\n### Command Line Options\n\n- `target` (positional) - Target window or pane.  Uses tmux's target syntax, but\n  always 0-indexed.  (e.g. `sess:1.2` - Session - sess, Window 2, Pane 3.\n  Default target is window.)\n- `-o`, `--output` -  Output file.  Prints to stdout if omitted.\n- `-m`, `--mode` -  Output file permissions.  Default - 644\n- `--light` -  Light background.\n- `--interval` -  Number of seconds between captures.\n- `--duration` -  Number of seconds to capture.  0 for indefinite recording, -1\n  to disable.\n- `--stream` -  Continuously renders until stopped and adds a script to auto\n  refresh based on `--interval`.  See the notes below for more info.\n- `--fg` -  Foreground color.  Can be a color index or R,G,B\n- `--bg` -  Background color.  Can be a color index or R,G,B\n- `--full` - Renders the full history of a single pane\n- `--history` - Specifies the maximum number of pane history lines to include\n  (implies `--full`)\n\n\n## Limitations\n\n- ~~The cursor is not displayed.~~\n- Basic colors will not match your terminal's configured colors.\n- Animations aren't perfect with a lot of splits and fast resizing.\n- ~~Animations won't capture scrolling the pane's history (selection mode).~~\n  Scrolling in the pane's history is now recorded in animations.\n- ~~In animations, a pane is updated with the full pane's content.~~  Only the\n  changed lines are updated on a per-pane basis.\n- Zoomed panes will ruin all the fun.\n- Your imagination :stars:\n\n\n## Notes\n\n- Still captures are plain HTML and CSS.\n- Animations use Javascript.\n- To keep the size reasonable with animations,\n  [pako](https://github.com/nodeca/pako) is used to inflate the gzipped frame\n  contents.  Combined with decompression of frame content, the animations will\n  use a fair amount of CPU.  So, you shouldn't run animations indefinitely on\n  your low performance or battery operated fun machines.\n- `--stream` doesn't actually \"stream\", per se.  It keeps writing to the same\n  file and adds a script that reloads the contents.  This can be used to\n  have a live feed of a window or pane.  However, it's not elegant.  If you set\n  the interval to too low, your might unintentionally DDoS your own web server.\n  Caveat Emptor.\n- The font stack includes [Powerline](https://github.com/powerline/fonts) and\n  [Nerd](https://github.com/ryanoasis/nerd-fonts) fonts because I'm pedantic\n  and want to see those fancy glyphs.  It falls back to `monospace` if you\n  don't have any of those fonts installed.  The caveat: if you have more than\n  one of those fonts installed, the first one in the font stack might not be\n  your favorite and you'll be forced to set your monitor on fire and buy a new\n  one.\n\n\n## To Do\n\n- ~~If there's practical use for animations in the future, only lines that are\n  different should be updated to keep the size low.~~\n- Tell people to follow me on Twitter\n  ([@cloudsiphon](https://twitter.com/cloudsiphon)) if they would like to stay\n  up to date on tmux2html, but don't be pushy about it.\n\n\n## Similar Projects\n\n- [gotty](https://github.com/yudai/gotty) - Share your terminal as a web\n  application\n- [asciinema](https://github.com/asciinema/asciinema) - Terminal session\n  recorder\n\n\n## License\n\n- tmux2html: MIT\n- [pako](https://github.com/nodeca/pako): MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftweekmonster%2Ftmux2html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftweekmonster%2Ftmux2html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftweekmonster%2Ftmux2html/lists"}