1
0
Fork 0

zsh: add adoc2md

This commit is contained in:
tastytea 2022-12-08 03:01:01 +01:00
parent 32869bceae
commit 5952901e06
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 11 additions and 0 deletions

11
.config/zsh/functions/adoc2md Executable file
View 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