{"id":14128468,"url":"https://github.com/sshaw/output-as-format","last_synced_at":"2025-10-28T15:07:17.654Z","repository":{"id":56837324,"uuid":"83763212","full_name":"sshaw/output-as-format","owner":"sshaw","description":"Output stdin as GitHub/Slack/Jira etc... formatted code, lists, or quotes","archived":false,"fork":false,"pushed_at":"2020-05-30T00:17:14.000Z","size":33,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-01T18:45:09.507Z","etag":null,"topics":["bitbucket","command-line-tool","disqus","github","gitlab","hipchat","html","jira","markdown","mediawiki","org-mode","perl","pod","restructuredtext","slack","vim"],"latest_commit_sha":null,"homepage":"https://metacpan.org/pod/App::oaf","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sshaw.png","metadata":{"files":{"readme":"README.pod","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-03T05:59:34.000Z","updated_at":"2024-09-19T21:17:21.000Z","dependencies_parsed_at":"2022-09-09T23:20:17.585Z","dependency_job_id":null,"html_url":"https://github.com/sshaw/output-as-format","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaw%2Foutput-as-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaw%2Foutput-as-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaw%2Foutput-as-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshaw%2Foutput-as-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sshaw","download_url":"https://codeload.github.com/sshaw/output-as-format/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229805750,"owners_count":18126902,"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":["bitbucket","command-line-tool","disqus","github","gitlab","hipchat","html","jira","markdown","mediawiki","org-mode","perl","pod","restructuredtext","slack","vim"],"created_at":"2024-08-15T16:01:45.078Z","updated_at":"2025-10-28T15:07:12.616Z","avatar_url":"https://github.com/sshaw.png","language":"Perl","funding_links":[],"categories":["Perl","\u003ca name=\"text-processing\"\u003e\u003c/a\u003eText processing"],"sub_categories":[],"readme":"=pod\n\n=head1 NAME\n\nApp::oaf - Output stdin as a GitHub/Slack/Jira etc... formatted code, list, or quote\n\n=head1 SYNOPSIS\n\nOutput as Format will read from stdin and output code, lists, or quotes\nbased on the provided options and/or environment variables.\n\n  usage: oaf [-1mpsLQ] [-f format] [-l lang] [--list[1]] [--quote]\n  Output stdin according to the given options\n    -f FORMAT    Format to output, defaults to markdown\n    -h, --help   Display this message\n    -l LANG      Programming language of stdin, if supported by FORMAT\n    -L, --list   Output a bullet point list using FORMAT, each line is a list item\n    -1, --list1  Output a numbered list using FORMAT, each line is a list item\n    -m           Force multiline output, if supported by FORMAT\n    -p           Print the supported formats and exit\n    -Q, --quote  Output as a quote in FORMAT\n    -s           Force single line output, if supported by FORMAT\n    --version    Print the version\n\n=head1 EXAMPLES\n\nOutput as GitHub Flavored Markdown:\n\n  cat some-code | oaf -f github -l perl\n  ```perl\n  my $n = foo();\n  return unless $n \u003e 100;\n  ```\n\nOutput as MediaWiki:\n\n  cat some-code | oaf -f mediawiki -l perl\n  \u003csyntaxhighlight lang=\"perl\"\u003e\n  my $n = foo();\n  return unless $n \u003e 100;\n  \u003c/syntaxhighlight\u003e\n\nOutput a Markdown list:\n\n  echo -e \"line1\\nline2\\nline3\" | oaf --list\n  * line1\n  * line2\n  * line3\n\nOutput a numbered list formatted for JIRA:\n\n  echo -e \"line1\\nline2\\nline3\" | oaf --list1 -f jira\n  # line1\n  # line2\n  # line3\n\nOutput a quote formatted for Org mode:\n\n  echo -e \"line1\\nline2\\nline3\" | oaf --quote -f orgmode\n  #+BEGIN_QUOTE\n  line1\n  line2\n  line3\n  #+END_QUOTE\n\n=head1 INSTALLATION\n\nCurrently there are two ways to install.\n\nThis requires your system to have L\u003cPerl|https://www.perl.org/get.html\u003e installed.\nUnless you're on Windows you probably have it (here in 2019).\n\n=head2 Download\n\n  curl -o oaf https://raw.githubusercontent.com/sshaw/output-as-format/master/oaf\n  chmod 555 oaf\n\n=head2 CPAN\n\n  cpan App::oaf\n\n=head1 SUPPORTED FORMATS \u0026 SERVICES\n\n=over 2\n\n=item * Bitbucket\n\n=item * Disqus\n\n=item * GitHub\n\n=item * GitLab\n\n=item * HipChat\n\n=item * HTML\n\n=item * JIRA\n\n=item * Markdown\n\n=item * MediaWiki\n\n=item * Org-mode\n\n=item * POD\n\n=item * reStructuredText\n\n=item * Slack\n\n=back\n\n=head1 DEFAULTS\n\nDefaults can be set by the following environment variables:\n\n=over 2\n\n=item * C\u003cOAF_FORMAT\u003e - output format\n\n=item * C\u003cOAF_LANG\u003e - input programming language\n\n=back\n\nThe default format is Markdown. There is no default programming language.\n\n=head1 AUTHOR\n\nSkye Shaw (sshaw [AT] gmail.com)\n\n=head1 SEE ALSO\n\nL\u003ccopy-as-format|https://github.com/sshaw/copy-as-format\u003e for Emacs, from which\nthis is based.\n\n=head1 COPYRIGHT\n\nCopyright (c) 2017-2019 Skye Shaw.\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshaw%2Foutput-as-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsshaw%2Foutput-as-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshaw%2Foutput-as-format/lists"}