X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=widgets.sh;h=835e6463113dae536546a0124d96855f56763e75;hb=e4fab82c23e1a1d61814307df428b564fe5ae15f;hp=ab88b3ec699319238b3db7452839d15fc8b2139b;hpb=0b60e2e81ffac0fcdd7760d3034f0e1d36f40c8f;p=webpoll diff --git a/widgets.sh b/widgets.sh index ab88b3e..835e646 100755 --- a/widgets.sh +++ b/widgets.sh @@ -1,5 +1,20 @@ #!/bin/sh +export MD_HTML="false" +if [ "$(which awk)" ]; then + markdown() { awk -f "$_EXEC/cgilite/markdown.awk"; } +else + markdown() { busybox awk -f "$_EXEC/cgilite/markdown.awk"; } +fi + +dec(){ + local n + for n in "$@"; do + while [ "${n}" != "${n#0}" ]; do n="${n#0}"; done + printf %i\\n "$n" + done +} + checked(){ local check="$1"; shift 1; for comp in "$@"; do