X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=widgets.sh;h=835e6463113dae536546a0124d96855f56763e75;hb=3738794352574a8024553a8a32643ed5b5547531;hp=ab88b3ec699319238b3db7452839d15fc8b2139b;hpb=5d96868dc6c0d92c120f78f059d8be25108b8e5e;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