{"id":19908773,"url":"https://github.com/farlepet/iwiitool","last_synced_at":"2026-01-25T13:32:58.962Z","repository":{"id":62858419,"uuid":"561104131","full_name":"farlepet/iwiitool","owner":"farlepet","description":"Set of tools for interacting with Apple ImageWriter II dot-matrix printers","archived":false,"fork":false,"pushed_at":"2024-09-17T03:38:23.000Z","size":6463,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-03T02:38:05.639Z","etag":null,"topics":["dot-matrix-printer","escape-codes","imagewriter-ii","printing"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/farlepet.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":"2022-11-03T00:34:16.000Z","updated_at":"2024-09-17T03:38:27.000Z","dependencies_parsed_at":"2024-09-17T07:07:23.840Z","dependency_job_id":null,"html_url":"https://github.com/farlepet/iwiitool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/farlepet/iwiitool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farlepet%2Fiwiitool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farlepet%2Fiwiitool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farlepet%2Fiwiitool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farlepet%2Fiwiitool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farlepet","download_url":"https://codeload.github.com/farlepet/iwiitool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farlepet%2Fiwiitool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28753440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T10:25:12.305Z","status":"ssl_error","status_checked_at":"2026-01-25T10:25:11.933Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dot-matrix-printer","escape-codes","imagewriter-ii","printing"],"created_at":"2024-11-12T21:13:25.456Z","updated_at":"2026-01-25T13:32:58.946Z","avatar_url":"https://github.com/farlepet.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"iwiitool\n=========\n\nSet of tools for interactiong with Apple ImageWriter II dot-matrix printers:\n - `ansi2iwii`: Tool to convert ANSI escape sequences to those compatible with\n   the ImageWriter II.\n - `iwiigfx`: Tool to print B\u0026W and color pictures using an ImageWriter II\n\nExample\n-------\n\n![Test print from test.sh](images/test_print_2.jpg)\n\nThe image was printed using `iwiigfx` on `images/test.bmp`:\n```\n./iwiigfx -o /dev/ttyUSB0 -i images/test.bmp -H 72 -V 72 -S -R\n```\n\n`images/test.bmp` was generated using ImageMagick's `convert` utility, along with\nthe palette file provided in `images/palette.bmp`:\n```\nconvert test.tiff -resize 128x128 -dither FloydSteinberg -map palette.bmp -colors 8 test.bmp\n```\n\nThe text to the right of the image was printed by pipeing `test.sh` through `ansi2iwii` with a margin of 24\ncharacters. The close line spacing is left-over from the settings for the image print, but can be changed\nthrough `ansi2iwii` and the -l or -L flag.\n```\n./test.sh | ./ansi2iwii -o /dev/ttyUSB0 -c -U -q 2 -M 24\n```\n\nUsage\n-----\n\n```\n$ ./ansi2iwii --help\nansi2iwii: Convert ANSI escape codes to Apple ImageWriter II escape codes\n\nBasic Options:\n  -i, --input=FILE          Read input from FILE, use `-` for stdin (default)\n  -o, --output=FILE         Write output to FILE, use `-` for stdout (default)\n  -b, --baud=RATE           Set baud rate to use when output is set to the printer's serial\n                            port. Values 300, 1200, 2400, and 9600 (default) are accepted\n  -F, --flow=MODE           Set flow control mode when using serial as output\n                              0: None\n                              1: XON/XOFF (default)\n                              2: RTS/CTS\n  -N, --no-setup            Do not configure printer via escape codes on startup\n\nCommon Format Options:\n  -f, --font=FONT           Set default font to use:\n                              0: Extended\n                              1: Pica\n                              2: Elite (default)\n                              3: Semicondensed\n                              4: Condensed\n                              5: Ultracondensed\n                              6: Pica proportional\n                              7: Elite proportional\n                              8: Custom\n  -q, --quality=QUAL        Set print quality to use:\n                              0: Draft (default)\n                              1: Standard\n                              2: Near Letter Quality\n  -c, --color[=COLOR]       Enable support for color, set default color if supplied.\n                              0: Black (default)\n                              1: Red\n                              2: Green\n                              3: Yellow\n                              4: Blue\n                              5: Purple\n                              6: Orange\n  -t, --tab=WIDTH           Set tab width, in characters (default is 8)\n                            NOTE: Tab positions are relative to the starting font\n  -l, --lpi=LPI             Set number of lines per inch, 6 (default) or 8\n  -L, --line-spacing=SPACE  Set spacing between lines, in 144ths of an inch (1-99)\n\nPage Settings:\n  -M, --left-margin=MARGIN     Set left margin in characters\n  -p, --pagelen=LENGTH         Set page length in 144ths of an inch\n  -P, --skip-perforation[=EN]  Enable/disable continuous-form perforation skip\n\nMisc. Print Settings:\n  -U, --unidirectional[=EN]    Enable/disable unidirectional printing\n  -A, --auto-linefeed[=EN]     Enable/disable automatic linefeed at end of line\n  -Z, --slashed-zero[=EN]      Enable/disable slashed-zeros\n  -D, --double-width[=EN]      Enable/disable double-width\n  -S, --prop-spacing=DOTS      Set proportional dot spacing (0-9)\n\nMiscellaneous:\n  -I, --identify            Retrieve printer identification and exit\n                            NOTE: Must be provided prior to specifying output\n  -h, --help                Display this help message\n  -v, --verbose[=LEVEL]     Increase verbosity, can be supplied multiple times, or desired\n                            verbosity can be directly supplied\n```\n\n```\n$ ./iwiigfx --help\niwiigfx: Print B\u0026W and color images using an ImageWriter II\n\nBasic Options:\n  -i, --image=FILE          Read image from FILE, use `-` for stdin (default)\n                            Image must be in BMP format, with no more than 8 used colors,\n                            which must match those in the provided palette.bmp.\n  -o, --output=FILE         Write output to FILE, use `-` for stdout (default)\n  -b, --baud=RATE           Set baud rate to use when output is set to the printer's serial\n                            port. Values 300, 1200, 2400, and 9600 (default) are accepted\n  -F, --flow=MODE           Set flow control mode when using serial as output\n                              0: None\n                              1: XON/XOFF (default)\n                              2: RTS/CTS\n\nGraphics Options:\n  -H, --hdpi=DPI            Horizontal DPI, values of 72 (default), 80, 96, 107, 120,\n                            136, 144, and 160 are supported\n  -V, --vdpi=DPI            Vertical DPI, values of 72 (default), and 144 are supported.\n  -O, --hoff=OFFSET         Set horizontal offset in dots\n  -R, --return-to-top       Return to top of image after completion\n  -s, --sequential-color    Print image one color at a time. This can potentially reduce\n                            color bleed or ribbon staining when printing at 144 dpi vertical\n                            resulution.\n\nMiscellaneous:\n  -h, --help                Display this help message\n```\n\nSupported ANSI Escape Codes\n---------------------------\n\nCurrently only a subset of SGR (Screen Graphic Rendition) ANSI escape sequences\n(following the form of `ESC[\u003cnum\u003e[...]m`) are supported:\n\n| SGR   | Description               | IWII        | Notes                                                 |\n|-------|---------------------------|-------------|-------------------------------------------------------|\n| 0     | Reset                     | (multiple)  |                                                       |\n| 1     | Bold                      | `ESC !`     |                                                       |\n| 3     | Italic                    | `ESC w`     | Approximating using half height text on the IWII side |\n| 4     | Underline                 | `ESC X`     |                                                       |\n| 8     | Conceal                   | N/A         | Prints spaces while enabled                           |\n| 9     | Strikethrough             | `\\b-`       | Prints - over each character (slow)                   |\n| 10    | Primary Font              | (multiple)  | Set via `--font`, defaults to Elite                   |\n| 11-19 | Set Font                  | (multiple)  | See `--help` for details                              |\n| 22    | Normal Intensity/Bold Off | `ESC \"`     |                                                       |\n| 23    | Italic Off                | `ESC W`     | See note on 3                                         |\n| 24    | Underline Off             | `ESC Y`     |                                                       |\n| 26    | Proportional Spacing      | (multiple)  | Sets font to pica/elite proportional                  |\n| 28    | Conceal Off               | N/A         |                                                       |\n| 29    | Strikethrough Off         | N/A         |                                                       |\n| 30-37 | Set Foreground Color      | (multiple)  | Cyan (6) represented by orange                        |\n| 50    | Proportional Spacing Off  | (multiple)  |                                                       |\n| 73    | Superscript               | `ESC x`     |                                                       |\n| 74    | Subscript                 | `ESC y`     |                                                       |\n| 75    | Superscript/Subscript Off | `ESC z`     |                                                       |\n\nAdditional ImageWriter II escape codes are supported through command-line options.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarlepet%2Fiwiitool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarlepet%2Fiwiitool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarlepet%2Fiwiitool/lists"}