NAME
App::oaf - Output stdin as GitHub/Slack/JIRA etc... formatted code
SYNOPSIS
Output as Format will read from stdin and output code formatted for GitHub/Slack/JIRA/ etc...
usage: oaf [-mps] [-f format] [-l lang]
Output stdin as code in the given format
-f FORMAT Format to output, case insensitive, defaults to 'markdown'
--help Display this message
-l LANG Programming language of stdin, if supported by FORMAT
-m Force multiline output, if supported by FORMAT
-p Print the supported formats and exit
-s Force single line output, if supported by FORMAT
--version Print the version
EXAMPLES
Output as GitHub Flavored Markdown:
cat some-code | oaf -f github -l perl
```perl
my $n = foo();
return unless $n > 100;
```
Output as MediaWiki:
cat some-code | oaf -f mediawiki -l perl
<syntaxhighlight lang="perl">
my $n = foo();
return unless $n > 100;
</syntaxhighlight>
INSTALLATION
Currently there are two ways to install.
Download
curl -o oaf https://raw.githubusercontent.com/sshaw/output-as-format/master/oaf
chmod 555 oaf
CPAN
This requires your system to have Perl installed.
cpan App::oaf
SUPPORTED FORMATS & SERVICES
Bitbucket
Disqus
GitHub
GitLab
HipChat
HTML
JIRA
Markdown
MediaWiki
Org-mode
POD
reStructuredText
Slack
DEFAULTS
Defaults can be set by the following environment variables:
OAF_FORMAT
- output formatOAF_LANG
- input programming language
The default format is Markdown. There is no default programming language.
AUTHOR
Skye Shaw (sshaw [AT] gmail.com)
SEE ALSO
copy-as-format for Emacs, from which this is based.
COPYRIGHT
Copyright (c) 2017 Skye Shaw.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.