zsh: add adoc2md
This commit is contained in:
parent
32869bceae
commit
5952901e06
11
.config/zsh/functions/adoc2md
Executable file
11
.config/zsh/functions/adoc2md
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
# Convert AsciiDoc to Markdown.
|
||||||
|
|
||||||
|
setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL
|
||||||
|
|
||||||
|
if [[ -v 1 ]]; then
|
||||||
|
print "usage: print foo | ${0}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat | asciidoc -b docbook --out-file=- - | pandoc --from=docbook --to=gfm
|
Loading…
Reference in New Issue
Block a user