{ "version": "https://jsonfeed.org/version/1.1", "user_comment": "This feed allows you to read the posts from this site in any feed reader that supports the JSON Feed format. To add this feed to your reader, copy the following URL -- https://matoken.org/blog/tag/svg/feed/json -- and add it your reader.", "home_page_url": "https://matoken.org/blog/tag/svg", "feed_url": "https://matoken.org/blog/tag/svg/feed/json", "language": "ja", "title": "SVG – matoken's blog", "description": "Is there no plan B?", "icon": "https://matoken.org/blog/wp-content/uploads/2025/03/cropped-1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9.jpeg", "items": [ { "id": "http://matoken.org/blog/?p=1983", "url": "https://matoken.org/blog/2018/07/05/record-operation-on-terminal-in-svg-format-termtosvg/", "title": "\u7aef\u672b\u3067\u306e\u64cd\u4f5c\u3092SVG\u5f62\u5f0f\u3067\u8a18\u9332\u3059\u308b termtosvg", "content_html": "
\nttyrec/play\u307f\u305f\u3044\u306b\u7aef\u672b\u64cd\u4f5c\u3092\u9332\u753b\u51fa\u6765\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\uff0e\u518d\u751f\u306f\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u306a\u3069\u3067\u3067\u304d\u307e\u3059\uff0e
\n\u5c0e\u5165\u306fpip\u3067
\n$ pip3 install termtosvg\r\n$ termtosvg -h\r\nusage: termtosvg [output_file] [--font FONT] [--theme THEME] [--help] [--verbose]\r\nRecord a terminal session and render an SVG animation on the fly\r\n\r\npositional arguments:\r\n output_file optional filename of the SVG animation; if missing, a random\r\n filename will be automatically generated\r\n\r\noptional arguments:\r\n -h, --help show this help message and exit\r\n --font FONT font to specify in the CSS portion of the SVG animation\r\n (DejaVu Sans Mono, Monaco...). If the font is not installed\r\n on the viewer's machine, the browser will display a default\r\n monospaced font instead.\r\n --theme THEME color theme used to render the terminal session (circus,\r\n classic-dark, classic-light, dracula, isotope, marrakesh,\r\n material, monokai, solarized-dark, solarized-light, zenburn)\r\n -v, --verbose increase log messages verbosity\r\n\r\nSee also 'termtosvg record --help' and 'termtosvg render --help'\r\n\n
\u5c0e\u5165\u5f8c\u5b9f\u884c\u3059\u308b\u3068\u305d\u306e\u307e\u307e\u7aef\u672b\u306b\u623b\u3063\u3066exit\u3059\u308b\u307e\u3067\u306e\u64cd\u4f5c\u3092\u8a18\u9332\u3057\u3066\u304f\u308c\u308b\uff0eexit\u3059\u308b\u3068SVG\u3092\u66f8\u304d\u51fa\u3057\u3066\u305d\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6559\u3048\u3066\u304f\u308c\u308b\uff0e
\nmk@T430s:~ (551)$ termtosvg\r\nRecording started, enter "exit" command or Control-D to end\r\nmk@T430s:~ (554)$ cowsay -f duck "hello termtosvg!"\r\n __________________\r\n< hello termtosvg! >\r\n ------------------\r\n \\\r\n \\\r\n \\ >()_\r\n (__)__ _\r\nmk@T430s:~ (555)$ cowsay -f duck "hello termtosvg!"|lolcat\r\n __________________\r\n< hello termtosvg! >\r\n ------------------\r\n \\\r\n \\\r\n \\ >()_\r\n (__)__ _\r\nmk@T430s:~ (556)$ exit\r\nRecording ended, SVG animation is /tmp/termtosvg_vpd7hh0z.svg\r\n\n
\u51fa\u6765\u4e0a\u304c\u3063\u305f\u30d5\u30a1\u30a4\u30eb\u306fSVG\u306a\u306e\u3067\u4e2d\u3092\u898b\u3066\u30b3\u30d4\u30da\u3068\u304b\u51fa\u6765\u306a\u304f\u306f\u306a\u3044\uff0e
\n$ xmllint --format /tmp/termtosvg_vpd7hh0z.svg|head\r\n<?xml version="1.0" encoding="utf-8"?>\r\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="full" height="408" version="1.1" width="640">\r\n <defs>\r\n <style type="text/css"><![CDATA[* {font-family: "DejaVu Sans Mono", monospace; font-style: normal; font-size: 14px}\r\ntext {dominant-baseline: text-before-edge}\r\n.bold {font-weight: bold}\r\n.background {fill: #002b36}]]></style>\r\n <g id="1">\r\n <text fill="#93a1a1" lengthAdjust="spacingAndGlyphs" textLength="144" x="0">mk@T430s:~ (554)$ </text>\r\n <text fill="#002b36" lengthAdjust="spacingAndGlyphs" textLength="8" x="144"> </text>\r\n\n
\u4ee5\u4e0b\u306bexample\u304c\u3042\u308b
\n\n\u30b5\u30fc\u30d0\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u5171\u6709\u3060\u3068asciinema\u304c\u4fbf\u5229\u3060\u3051\u3069\u3053\u308c\u306f\u3053\u308c\u3067\u30d5\u30a1\u30a4\u30eb\u4e00\u500b\u306a\u306e\u3067\u4fbf\u5229\u305d\u3046\u3067\u3059\uff0e
\nPython\u88fd\u3067\u30e9\u30a4\u30bb\u30f3\u30b9\u306fBSD 3-Clause License\u3067\u3059\uff0e