Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MastodonとtootとTerminal graphics protocolのKittyと...

MastodonとtootとTerminal graphics protocolのKittyとiTerm2

Avatar for Kenichiro MATOHARA

Kenichiro MATOHARA

April 12, 2025
Tweet

More Decks by Kenichiro MATOHARA

Other Decks in Technology

Transcript

  1. toot Mastodon CLI/TUI client Python実装,GPL-3.0 license CLI or TUIで利用できる マルチアカウント対応

    Kitty/iTerm graphicに対応  Kitty/iTerm実装以前にSixel対応patchがあった 10
  2. toot導入例 Debian sidは最新と同じ0.48.1だがgraphicが動作しない? 1 Kitty/iTerm graphicを使う場合に必要  pipでtootを導入することも可能 $ git

    clone https://github.com/ihabunek/toot $ cd toot $ python3 -m venv venv $ source venv/bin/activate $ pip install pillow term-image urwidgets $ python -m toot --version Warning: Settings section [tui] has been deprecated in favour of [commands.tui]. python -m toot v0.48.1 1 11
  3. help $ python -m toot Warning: Settings section [tui] has

    been deprecated in favour of [commands.tui]. Usage: python -m toot [OPTIONS] COMMAND [ARGS]... Toot is a Mastodon CLI Options: -w, --max-width INTEGER Maximum width for content rendered by toot [default: 80] --debug / --no-debug Log debug info to stderr [default: no-debug] --color / --no-color Use ANSI color in output [default: color] --as ACCOUNT The account to use, overrides the active account. --version Show the version and exit. -h, --help Show this message and exit. Commands: activate Switch to logged in ACCOUNT. auth Show logged in accounts and instances block Block an account blocked List blocked accounts bookmark Bookmark a status bookmarks Show recent statuses in a timeline delete Delete a status diag Display useful information for diagnosing problems favourite Favourite a status 13
  4. follow Follow an account followers List accounts following an account.

    following List accounts followed by an account. instance Display instance details lists Show and manage your lists login Log into an instance using your browser (recommended) login_cli Log into an instance from the console (not recommended) logout Log out of ACCOUNT, delete stored access keys mute Mute an account muted List muted accounts notifications Show notifications pin Pin a status post Post a new status reblog Reblog (boost a status reblogged_by Show accounts that reblogged a status search Search for content in accounts, statuses and hashtags. status Show a single status tags List, follow, and unfollow tags thread Show thread for a toot. timeline Show timelines (deprecated, use `toot timelines` instead) timelines Show various timelines tui Launches the toot terminal user interface 14
  5.  TUIを使う場合はアカウント登録後はあまり使わない unblock Unblock an account unbookmark Unbookmark a status

    unfavourite Unfavourite a status unfollow Unfollow an account unmute Unmute an account unpin Unpin a status unreblog Unreblog (unboost) a status update_account Update your account details upload Upload an image or video file whoami Display logged in user details whois Display account details 15
  6. アカウント登録 1 インスタンスurl 2 ウェブブラウザで認証 3 ブラウザで取得した認証コードを入力 $ toot login

    Warning: Settings section [tui] has been deprecated in favour of [commands.tui]. Enter instance URL [https://mastodon.social]: : Login URL: https://mastodon.social/oauth/authorize/?response_type=code&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope Open link in default browser? [Y/n]: Authorization code: XXXXXXXXXXXXXXXXXXX : 1 2 3 16
  7. 登録済アカウントの確認 1 ACTIVE の付いているアカウントが既定 $ toot auth Warning: Settings section

    [tui] has been deprecated in favour of [commands.tui]. Authenticated accounts: * [email protected] ACTIVE * [email protected] Auth tokens are stored in: /home/matoken/.config/toot/config.json 1 18
  8. 規定アカウントの切り替え  --as オプションで指定アカウントを指定可能 $ toot --as …… $ toot

    activate [email protected] Warning: Settings section [tui] has been deprecated in favour of [commands.tui]. ✓ Account [email protected] activated [email protected] 19
  9. 画像が表示されない場合 Kitty or iTerm2 graphic対応端末? kitten icat <imagefile> などで確認 ターミナルマルチプレクサを挟んでいないか?

    tmux から Kitty を起動などもNG tootが0.43.0以降か? toot --version Pythonのグラフィックライブラリが導入されているか pip list toot に -f kitty or -f iterm で明示的に対応プロトコルを渡して みる 22
  10. Kitty graphics対応terminals から軽いものを探す Ghostty → おばけ 👻 Konsole → KDE標準

    st (with a patch) → 軽量(RAM 14MB前後)だがtootでの graphicsは動作せず Warp → AI/Kittyよりさらにメモリを消費(330MB) wayst Wayland and X11 → 未検証 WezTerm → ParrotOS標準,Kittyと機能が似ている.その割 には軽量(RAM 33MB前後) Terminal graphics protocol - kitty 26
  11. SEE ALSO ターミナルに特化した Misskey ストリームクラ イアントです。(Sixel対応) CLI Mastodon Client.(0.5.0でSixel対応) A

    command-line Fediverse client that doesn’t require a server. a blingful TUI library. → run notcurses-demo isaki68k/sayaka taka-tuos/nanotodon: CLI mastodon client BentonEdmondson/servitor: A command-line Fediverse client that doesn’t require a server notcurses 29
  12. ActivityPub terminal client matrix toot Servitor nanotodon sayaka service Mastodon

    ActivityPub Mastodon Misskey login Y Y toot Y Y cli Y tui Y Y streaming Y Y graphic Kitty/iTerm2/block Sixel Sixel 30
  13. 奥付 発表 2024-12- 14(sat) 未発表 発表者 利用ソフトウェア NeiVim + textlint

    + ライセンス 小江戸らぐ 12月のオフな集まり(第269回) Kenichiro Matohara(matoken) Asciidoctor Reveal.js CC BY 4.0 31