{"id":18027168,"url":"https://github.com/annacrombie/altprintf","last_synced_at":"2025-03-27T01:31:36.509Z","repository":{"id":56842394,"uuid":"201096439","full_name":"annacrombie/altprintf","owner":"annacrombie","description":"a string template language","archived":false,"fork":false,"pushed_at":"2023-01-02T15:30:18.000Z","size":387,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T11:46:08.208Z","etag":null,"topics":["c","formatting"],"latest_commit_sha":null,"homepage":"","language":"C","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/annacrombie.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}},"created_at":"2019-08-07T17:31:13.000Z","updated_at":"2024-02-26T10:47:42.000Z","dependencies_parsed_at":"2023-02-01T03:10:23.100Z","dependency_job_id":null,"html_url":"https://github.com/annacrombie/altprintf","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annacrombie%2Faltprintf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annacrombie%2Faltprintf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annacrombie%2Faltprintf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/annacrombie%2Faltprintf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/annacrombie","download_url":"https://codeload.github.com/annacrombie/altprintf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245764741,"owners_count":20668469,"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":["c","formatting"],"created_at":"2024-10-30T08:09:57.371Z","updated_at":"2025-03-27T01:31:36.167Z","avatar_url":"https://github.com/annacrombie.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# altprintf\n[![builds.sr.ht status](https://builds.sr.ht/~lattis.svg?search=altprintf)](https://builds.sr.ht/~lattis?search=altprintf)\n\naltprintf is a string template language.  It was designed with a very specific\ngoal in mind: allowing users to customize a program's functionality through the\nuse of format strings.\n\n## Features\n\n+ Cool format specifiers, like conditionals.\n+ UTF-8 character width sensitive alignment\n+ Nesting expressions\n+ Robust\n  - the library makes no memory allocations\n  - an advanced error reporting system\n  - fuzz testing based on the grammar in the docs\n+ Template strings are compiled into a custom binary format\n  - this saves resources when reusing the same template\n\nNote that altprintf is not designed to replace printf.  It is designed with the\nspecific use case of providing user-specified templates to customize output.\n\n## Example\n\nHere is an example format string to build a statusline for something like\n[swaybar](https://github.com/swaywm/sway/wiki#swaybar-configuration).\n\n```\n{win} {fetching?⇄ }{locked?閉 }{mail?〒{mail} }{cpu:\u003e 3}% {temp}c {bat} {time}\n```\n\nWhich could result in a string like:\n\n```\nmochiro.moe -- Mozilla Firefox 〒4   3% 49c 45 08:56\n```\n\n## Building\n\nYou need a compatible `meson` implementation.  If you want man pages, you also need `scdoc`.\n\nExample:\n\n```sh\n$meson setup build\n$ninja -C build\n```\n\n## Docs\n\nSee the man pages\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fannacrombie%2Faltprintf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fannacrombie%2Faltprintf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fannacrombie%2Faltprintf/lists"}