{"id":23473591,"url":"https://github.com/rsdoiel/shorthand","last_synced_at":"2025-04-13T08:47:27.229Z","repository":{"id":53210277,"uuid":"41602045","full_name":"rsdoiel/shorthand","owner":"rsdoiel","description":"A simple text label expander combined with a markdown processor.","archived":false,"fork":false,"pushed_at":"2024-10-24T19:47:41.000Z","size":4862,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T09:05:12.943Z","etag":null,"topics":["label-expander","labels","macro-language"],"latest_commit_sha":null,"homepage":"http://rsdoiel.github.io/shorthand","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rsdoiel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":"codemeta.json","zenodo":null}},"created_at":"2015-08-29T17:46:47.000Z","updated_at":"2024-10-24T19:47:45.000Z","dependencies_parsed_at":"2024-05-20T22:53:22.962Z","dependency_job_id":"4411e67f-b1ce-4dbb-bf12-b9b34a743129","html_url":"https://github.com/rsdoiel/shorthand","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsdoiel%2Fshorthand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsdoiel%2Fshorthand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsdoiel%2Fshorthand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsdoiel%2Fshorthand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rsdoiel","download_url":"https://codeload.github.com/rsdoiel/shorthand/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688173,"owners_count":21145762,"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":["label-expander","labels","macro-language"],"created_at":"2024-12-24T17:29:38.539Z","updated_at":"2025-04-13T08:47:27.202Z","avatar_url":"https://github.com/rsdoiel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n\n[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-white.svg)](https://snapcraft.io/shorthand)\n\n\n# shorthand\n\nA simple label or macro expander\n\nExample use cases:\n\n+ label or abbreviation expansion in Markdown files\n+ build html templates from markdown files\n+ compose pages from multiple markdown files\n\nThe supported command line options can be listed using the _--help_\noptions.\n\n```shell\n    shorthand --help\n```\nSource code can be found at [github.com/rsdoiel/shorthand](https://github.com/rsdoiel/shorthand)\n\nThe project website is [rsdoiel.github.io/shorthand](http://rsdoiel.github.io/shorthand)\n\n\n## Tutorial\n\n### Timestamp in Markdown file\n\nIf the content of the markdown file _testdata/report.md_ was\n\n```markdown\n\n    Report Date: @now\n\n    # Topic: The current local time.\n\n    This report highlights the current local time of rendering this document\n\n    The current local time is @now\n\n```\n\nFrom the command line you can do something like this\n\n```shell\n    shorthand -e ':bash: @now date' \\\n        -e \":import: @report testdata/report.md\" \\\n        -e \"@report\" \\\n        -e ':exit:' | pandoc -s \u003e testdata/report.html\n```\n\nWhat this command does is launch the _shorthand_ interpreter and it\nreplaces all occurrences of \"@now\" in the markdown document with the\noutput from the Unix program _date_. \n\nThe output (before piping to Pandoc) would look something like\n\n```html\n    Report Date: Sat Aug 29 11:25:48 PDT 2015\n\n    # Topic: The current local time.\n\n    This report highlights the current local time of rendering this document\n\n    The current local time is Sat Aug 29 11:25:48 PDT 2015\n```\n\nNotice that both \"@now\" are replace with the same date information.\n\n### embedding shorthand definitions\n\nYou could also embed the shorthand definitions command straight in the\nmarkdown itself. with something like\n\n```markdown\n    @now :bash: date\n\n    Report Date: @now\n\n    # Topic: The current local time.\n\n    This report highlights the current local time of rendering this document\n\n    The current local time is @now\n\n```\n\nThat makes the command line a little shorter\n\n```shell\n    shorthand testdata/report.md | pandoc -s \u003e testdata/report.html\n```\n\n\n## Installation\n\n_shorthand_ can be installed with the *go get* command.\n\n```\n    go get github.com/rsdoiel/shorthand/...\n```\n\n## Documentation\n\n- [shorthand](shorthand.html)\n- [shorthand syntax](shorthand-syntax)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsdoiel%2Fshorthand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsdoiel%2Fshorthand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsdoiel%2Fshorthand/lists"}