{"id":25221895,"url":"https://github.com/skardyy/ttyimg","last_synced_at":"2025-04-05T12:12:22.817Z","repository":{"id":276505245,"uuid":"929490001","full_name":"Skardyy/ttyimg","owner":"Skardyy","description":"cross platform terminal image viewer","archived":false,"fork":false,"pushed_at":"2025-02-27T16:38:45.000Z","size":8960,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-27T23:07:42.868Z","etag":null,"topics":["cli","go","image-viewer","terminal"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Skardyy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-02-08T17:07:41.000Z","updated_at":"2025-02-27T16:38:48.000Z","dependencies_parsed_at":"2025-02-27T17:42:12.777Z","dependency_job_id":null,"html_url":"https://github.com/Skardyy/ttyimg","commit_stats":null,"previous_names":["skardyy/ttyimg"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skardyy%2Fttyimg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skardyy%2Fttyimg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skardyy%2Fttyimg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skardyy%2Fttyimg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Skardyy","download_url":"https://codeload.github.com/Skardyy/ttyimg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332612,"owners_count":20921854,"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":["cli","go","image-viewer","terminal"],"created_at":"2025-02-10T22:53:27.899Z","updated_at":"2025-04-05T12:12:22.807Z","avatar_url":"https://github.com/Skardyy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ettyimg\u003c/h1\u003e  \n\u003cp align=\"center\"\u003eA powerfull cli tool for encoding images into \u003cbr/\u003e\n\u003cb\u003e Iterm2 / Kitty / Sixel \u003c/b\u003e \u003c/p\u003e \n\u003cdiv align=\"center\"\u003e\n    \n[![Static Badge](https://img.shields.io/badge/go.dev-1e2029?style=flat\u0026logo=go\u0026logoColor=00ADD8\u0026label=find%20at\u0026labelColor=15161b)](https://pkg.go.dev/github.com/Skardyy/ttyimg) ˙ ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Skardyy/ttyimg/release.yml?style=flat\u0026labelColor=15161b\u0026color=1e2029)\n\n\n\u003c/div\u003e\n\n---\nhttps://github.com/user-attachments/assets/92b635e9-7ffe-4eed-8abe-a5d593504990\n\n## Installation 📦\n```sh\ngo install github.com/Skardyy/ttyimg@latest\n```\n\n## Usuage 💡  \n```sh\nUsage: ttyimg [options] \u003cpath_to_image\u003e\n  -w string\n         Resize width: \u003cnumber\u003e (pixels) / \u003cnumber\u003epx / \u003cnumber\u003ec (cells) / \u003cnumber\u003e% (default: 80%)\n  -h string\n         Resize height: \u003cnumber\u003e (pixels) / \u003cnumber\u003epx / \u003cnumber\u003ec (cells) / \u003cnumber\u003e% (default: 60%)\n  -m string\n         the resize mode to use when resizing: Fit, Strech, Crop (default: Fit)\n  -center bool\n         rather or not to center align the image (default: true)\n  -p string\n         Force protocol: kitty, iterm, sixel (default: auto)\n  -f string\n         fallback to when no protocol is supported: kitty, iterm, sixel (default: sixel)\n  -spx string\n         \u003cwidth\u003ex\u003cheight\u003e or \u003cwidth\u003ex\u003cheight\u003exForce. specify the size of the winodw in px for fallback / overwrite (default: 1920x1080)\n  -sc string\n         \u003cwidth\u003ex\u003cheight\u003e or \u003cwidth\u003ex\u003cheight\u003exForce. specify the size of the winodw in cell for fallback / overwrite (default: 120x30)\n  -scale string\n         \u003cfloat\u003ex\u003cfloat\u003e scales the spx and sc, only usefull for centering in smaller portions of the screen (default: 1x1)\n  -cache bool\n         rather or not to cache the heavy operations (default: true)\n```\n\n## Supports ✨  \n- [X] PNG  \n- [X] JPEG  \n- [X] TIFF  \n- [X] SVG  \n- [X] WEBP  \n- [X] BMP  \n- [X] GIF -- static only  \n- [X] DOCX  \n- [X] XLSX  \n- [X] PDF  \n- [X] PPTX  \n- [X] ODG  \n- [X] ODP  \n- [X] ODS  \n- [X] ODT  \n\n\u003e DOCX, XLSX, PDF PPTX, ODG, ODP, ODS, ODT require\n\u003e\u003cdetails\u003e\n\u003e  \u003csummary\u003eLibreoffice\u003c/summary\u003e\n\u003e \n\u003e  ```txt\n\u003e    make sure its installed and in your path  \n\u003e    * windows: in windows its called soffice and should be in C:\\Program Files\\LibreOffice\\program \n\u003e    * linux: should add it to path automatically\n\u003e  ```\n\u003e \u003c/details\u003e\n\n\u003e [!Note]  \n\u003e i am open for suggestions on other backends for the document types  \n\u003e Libreoffice was chosen for it being the only crossplatform one  \n\n## App Logic  \n* first queries the size of the screen using:  \n    *  cells: `\\x1b[18t`\n    *  px: `\\x1b[14t`\n* if neither works it fallbacks to:  \n    *  cells: term.GetSize(fd), uses win api / ioctl respectfully, shouldn't fail unless stderr is not the terminal.  \n    *  px: ioctl / windows api. windows shouldn't fail, just not as accurate. ioctl only fails if stderr is not the temrinal.  \n\nThose options e.g (spx, sc, scale) aren't really important for normal users.  \nbut can be very powerfull for power users trying to call the program in emulated environments, like neovim \\ tmux.  \n\n\u003e using those values we can use sizes  \n\u003e like c (cells) and % for resizing the image  \n\u003e and even center the image  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskardyy%2Fttyimg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskardyy%2Fttyimg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskardyy%2Fttyimg/lists"}