{"id":24566226,"url":"https://github.com/archer884/annatar","last_synced_at":"2025-04-22T10:36:35.346Z","repository":{"id":21533803,"uuid":"93098494","full_name":"archer884/annatar","owner":"archer884","description":"The Lord of Gifs! ...Hahahaha shut up.","archived":false,"fork":false,"pushed_at":"2025-04-08T05:15:34.000Z","size":480,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T10:36:11.801Z","etag":null,"topics":["captioning-images","deus-vult","image-processing","imagemagick","images","meme","meme-generator","meme-maker","memes","piston","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/archer884.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2017-06-01T20:51:29.000Z","updated_at":"2025-04-08T05:14:41.000Z","dependencies_parsed_at":"2023-02-18T18:55:13.953Z","dependency_job_id":"6969ee2d-f071-4e81-b105-90a38d501b3b","html_url":"https://github.com/archer884/annatar","commit_stats":{"total_commits":113,"total_committers":3,"mean_commits":"37.666666666666664","dds":"0.23008849557522126","last_synced_commit":"8f8fb634ca0cfb3b261968ed09f0312a367db6fe"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archer884%2Fannatar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archer884%2Fannatar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archer884%2Fannatar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archer884%2Fannatar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/archer884","download_url":"https://codeload.github.com/archer884/annatar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250221684,"owners_count":21394746,"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":["captioning-images","deus-vult","image-processing","imagemagick","images","meme","meme-generator","meme-maker","memes","piston","rust"],"created_at":"2025-01-23T12:18:53.543Z","updated_at":"2025-04-22T10:36:35.286Z","avatar_url":"https://github.com/archer884.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Annatar\n\n\u003e A command line tool for adding text to pictures\n\nThis crate is named for the Dark Lord Sauron. The name is taken from the Quenya for 'Lord of Gifts,' which has a hilarious mispronunciation that seems to apply almost directly to this case. Like the library it's based on, this is clearly for making evil things.\n\n## Installation\n\nVisit [rustup.rs](https://rustup.rs/) to download the Rust tools, then run the following command via cargo:\n\n```shell\ncargo install annatar\n```\n\n## Usage\n\n```shell\nannatar foo.jpg \\\n    --top \"This text will appear near the top of the image.\" \\\n    --middle \"This text will appear near the middle of the image.\" \\\n    --bottom \"This text will appear near the bottom of the image.\"\n```\n\nPer the usual conventions, `-t`, `-m`, and `-b` are also available as arguments. Additionally, it is possible to supply only a caption as a positional argument, in which case the caption works as a synonym for `--bottom`, e.g.:\n\n```shell\nannatar foo.jpg \"This text will appear near the bottom of the image.\"\n```\n\nImages may be provided as either local paths or URLs; annatar is happy to fetch your picture from the internet for you.\n\n\u003e Note: Linux usually does not include annatar's default font, Impact, which will result in an error unless an alternate font is selected. To avoid this, set the var `ANNATAR_DEFAULT_FONT` in your shell profile. Feel free to pick something you like.\n\n### Annotation size\n\nBy default, annatar sizes the text used for your captions on the basis of the height of the image itself. The exact algorithm used for this purpose was selected by a team of scientists working round the clock for weeks on end at the Vatican, and we didn't let them out until we saw white smoke. Rumors that the members of our text scaling enclave were able to agree only once the majority of members had starved or been bludgeoned to death by the others are, as far as you know, unfounded.\n\nThe important thing is that, normally, the text will look ok. For images with strange aspect ratios (either very wide or very narrow relative to their height), text can look either too large or too small. In that case, or in the case wherein you prefer to express greater emphasis, you may prefer to pass the `-s --scale` flag with a scaling multiplier.\n\n```shell\nannatar doge.png \\\n    --scale 2.0 \\\n    --top \"SUCH BIG\" \\\n    --bottom \"SO SCALE\"\n```\n\nThis scale multiplier acts (surprisingly) as a *multiplier* for the scaling value selected by annatar. So, text scaled at `2.0` will be twice as tall (annatar scales text by height, proportionally) as it would have been otherwise.\n\n\u003e Note: You will probably find a value like `2.0` to be excessive under most circumstances; I usually scale by about 30%—`0.7` or `1.3`—at most.\n\n#### In-band annotation scaling\n\nThe `-s --scale` mutliplier is set for *all* annotations, top, middle, and bottom. To allow annotations of different size, an in-band scaling format is provided.\n\n```shell\nannatar doge.png \\\n    --top \"this one is normal\" \\\n    --bottom \"\\1.3 this one is bigger!\"\n```\n\nWhite space between the scaling modifier (`\\1.3` above) and the annotation (`this one is bigger`) will be ignored. However, some amount of intervening white space *is required.*\n\n\u003e Note: for those of you who are plagued by morbid curiosity, here's the regular expression used: `\\\\(?P\u003cscale\u003e\\d+(\\.\\d+)?)\\s+(?P\u003ccaption\u003e.+)`.\n\n### Rightsholder protections\n\nWe realize that laws in places like Britain or the European Union may not support the concept of \"fair use\" we have in the United States. This program is explicitly intended to create derivative and transformative works for the purpose of fair and reasonable criticism and commentary, but that may not be a right [afforded to you](https://fee.org/articles/why-it-matters-that-some-rights-are-inalienable/) by those who rule over you in your jurisdiction. If that is the case, we encourage you to use annatar ONLY with the `--rightsholder-protections` flag set.\n\nIt may help to create a function similar to the following in your shell profile. The following function is written for [PowerShell](https://github.com/PowerShell/PowerShell).\n\n```powershell\n\u003c#\n.SYNOPSIS\nInvokes annatar with rightsholder protections enabled.\n\n.DESCRIPTION\nThis function performs pass-through for all arguments passed to it and adds \nthe --rightsholder-protections flag in order to maintain compatibility with \nnon-US copyright law when using annatar.\n\n.NOTES\nAnnatar may print alarming warnings when rightsholder protections are enabled.\nPlease ignore these. They will be addressed in a future release.\n#\u003e\nfunction Invoke-Annatar {\n    annatar $args --rightsholder-protections\n}\n```\n\n## Version history\n\n- **0.5.7** Permit selection of default font via environment var\n- **0.5.6** Fix regression: scale should be optional.\n- **0.5.2** Fix macOS font problem\n- **0.4.0** Add in-band annotation scaling\n\n## License\n\nLicensed under either of\n * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\nat your option.\n\n### Contributions\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n\n[LICENSE-APACHE]: https://github.com/archer884/annatar/blob/master/LICENSE-MIT\n[LICENSE-MIT]: https://github.com/archer884/annatar/blob/master/LICENSE-APACHE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcher884%2Fannatar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcher884%2Fannatar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcher884%2Fannatar/lists"}