removed windows and linux split subdir

This commit is contained in:
Luka Jankovic 2026-02-03 23:43:22 +01:00
parent 83dda10fa8
commit 065b982734
280 changed files with 9053 additions and 426 deletions

36
.antidote/tools/buildman Executable file
View file

@ -0,0 +1,36 @@
#!/usr/bin/env zsh
# https://pandoc.org/demo/pandoc.1.md
# https://eddieantonio.ca/blog/2015/12/18/authoring-manpages-in-markdown-with-pandoc/
# https://jeromebelleman.gitlab.io/posts/publishing/manpages/
0=${(%):-%x}
BASEDIR=${0:a:h:h}
TMPDIR=$BASEDIR/.tmp/buildman
[[ -d $TMPDIR ]] && command rm -rf $TMPDIR
mkdir -p $TMPDIR
sedi() {
sed --version &> /dev/null && sed -i -- "$@" || sed -i "" "$@"
}
for manpage in $BASEDIR/man/*.md; do
case ${manpage:t:r} in
footer|example) continue ;;
esac
print "Building ${manpage:t:r} manpage..."
[[ -d $BASEDIR/man/man1 ]] || mkdir -p $BASEDIR/man/man1
mdfile=$TMPDIR/${manpage:t}.md
cat ${manpage} > $mdfile
print "" >> $mdfile
cat $BASEDIR/man/footer.md >> $mdfile
manfile=$BASEDIR/man/man1/${manpage:t:r}.1
pandoc --standalone --to man ${mdfile} -o $manfile
# strip pandoc version so that every manpage build doesn't need to
# result in a new commit just b/c pandoc has a minor point release.
pandoc_ver=$(pandoc -v | awk 'NR==1{print $2}')
sedi "s/Pandoc $pandoc_ver/Pandoc/g" $manfile
done

7
.antidote/tools/bumpver Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env zsh
0=${(%):-%x}
bumpversion --allow-dirty ${1:-revision}
newver=$(grep 'current_version' ${0:h:h}/.bumpversion.cfg | sed -E 's/^[^0-9]+(.*)$/\1/')
print "Version bumped to $newver."
print "Now run:"
print " git commit -am 'Bump version to $newver'" | tee >(pbcopy)

34
.antidote/tools/run-clitests Executable file
View file

@ -0,0 +1,34 @@
#!/usr/bin/env zsh
0=${(%):-%x}
setopt extended_glob
cd ${0:A:h:h}
local o_unit o_rev
zparseopts -D -M -- -unit=o_unit -rev=o_rev || return 1
testfiles=()
if (( $# > 0 )); then
testfiles=($@)
elif (( $#o_unit )); then
testfiles=($PWD/tests/*.md~*test_real*~*foo*)
else
testfiles=($PWD/tests/*.md)
fi
# if tests are run in reverse order, I can catch places where I didn't teardown properly
if (( $#o_rev )); then
testfiles=(${(O)testfiles})
fi
# foo example test command
# env -i PATH=$PATH FPATH=$FPATH \
# zsh -f -- =clitest --list-run --progress dot --prompt '%' --color always $PWD/tests/foo.md
env -i PATH=$PATH FPATH=$FPATH PAGER=cat \
zsh -f -- \
=clitest \
--list-run --progress dot --prompt '%' \
--color always \
--pre-flight 'git --version; print $PWD $VENDOR $OSTYPE =zsh $ZSH_VERSION $ZSH_PATCHLEVEL' \
-- $testfiles

13
.antidote/tools/sloc Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env zsh
0=${(%):-%x}
BASEDIR=${0:h:h}
cd $BASEDIR
print "loc:"
wc -l antidote.zsh ./functions/*(.)
print "sloc:"
for file in antidote.zsh ./functions/*(.); do
lines=$(awk '/^ *[^#]+$/{print}' $file | wc -l)
print $lines $file
done
print "sloc total:"
awk '/^ *[^#]+$/{print}' antidote.zsh ./functions/*(.) | wc -l