]> git.plutz.net Git - confetti/commitdiff
changed project layout
authorPaul Hänsch <paul@plutz.net>
Sat, 13 Oct 2018 10:19:41 +0000 (12:19 +0200)
committerPaul Hänsch <paul@plutz.net>
Sat, 13 Oct 2018 10:19:41 +0000 (12:19 +0200)
55 files changed:
.gitmodules
cards/cards.css [moved from static/cards.css with 100% similarity]
cards/cards.html.sh [moved from templates/cards.html.sh with 100% similarity]
cards/cards.sh [moved from pages/cards.sh with 100% similarity]
cards/categories.css [moved from static/categories.css with 100% similarity]
cards/categories.html.sh [moved from templates/categories.html.sh with 100% similarity]
cards/categories.sh [moved from pages/categories.sh with 100% similarity]
cards/edit_card.sh [moved from actions/edit_card.sh with 100% similarity]
cards/edit_card.template.sh [moved from templates/edit_card.sh with 100% similarity]
cards/edit_categories.sh [moved from actions/edit_categories.sh with 100% similarity]
cards/export_vcard.sh [moved from actions/export_vcard.sh with 100% similarity]
cards/filter_card.sh [moved from actions/filter_card.sh with 100% similarity]
cards/new_card.sh [moved from actions/new_card.sh with 100% similarity]
cards/text_cards.sh [moved from templates/text_cards.sh with 100% similarity]
cards/text_categories.sh [moved from templates/text_categories.sh with 100% similarity]
cards/update_card.sh [moved from actions/update_card.sh with 100% similarity]
cards/update_categories.sh [moved from actions/update_categories.sh with 100% similarity]
cards/view_card.sh [moved from templates/view_card.sh with 100% similarity]
cgilite [new submodule]
common.css [moved from static/common.css with 100% similarity]
courses/course_print.sh [moved from templates/course_print.sh with 100% similarity]
courses/courses.css [moved from static/courses.css with 100% similarity]
courses/courses.html.sh [moved from templates/courses.html.sh with 100% similarity]
courses/courses.sh [moved from pages/courses.sh with 100% similarity]
courses/edit_course.sh [moved from actions/edit_course.sh with 100% similarity]
courses/edit_course.template.sh [moved from templates/edit_course.sh with 100% similarity]
courses/export_ical.sh [moved from actions/export_ical.sh with 100% similarity]
courses/generate_courselist.sh [moved from actions/generate_courselist.sh with 100% similarity]
courses/new_course.sh [moved from actions/new_course.sh with 100% similarity]
courses/text_courses.sh [moved from templates/text_courses.sh with 100% similarity]
courses/update_course.sh [moved from actions/update_course.sh with 100% similarity]
courses/view_course.sh [moved from templates/view_course.sh with 100% similarity]
email/email.css [moved from static/email.css with 100% similarity]
email/email.html.sh [moved from templates/email.html.sh with 100% similarity]
email/email.sh [moved from pages/email.sh with 100% similarity]
frame.html.sh [moved from templates/frame.html.sh with 100% similarity]
index.cgi [new file with mode: 0755]
prescriptions/edit_prescription.sh [moved from templates/edit_prescription.sh with 100% similarity]
prescriptions/new_prescription.sh [moved from actions/new_prescription.sh with 100% similarity]
prescriptions/prescriptions.css [moved from static/prescriptions.css with 100% similarity]
prescriptions/prescriptions.html.sh [moved from templates/prescriptions.html.sh with 100% similarity]
prescriptions/prescriptions.sh [moved from pages/prescriptions.sh with 100% similarity]
prescriptions/text_prescriptions.sh [moved from templates/text_prescriptions.sh with 100% similarity]
prescriptions/update_prescription.sh [moved from actions/update_prescription.sh with 100% similarity]
prescriptions/view_prescription.sh [moved from templates/view_prescription.sh with 100% similarity]
text_frame.sh [moved from templates/text_frame.sh with 100% similarity]
therapy/text_therapy.sh [moved from templates/text_therapy.sh with 100% similarity]
therapy/therapy.css [moved from static/therapy.css with 100% similarity]
therapy/therapy.html.sh [moved from templates/therapy.html.sh with 100% similarity]
therapy/therapy.sh [moved from pages/therapy.sh with 100% similarity]
therapy/therapy_background.png [moved from static/therapy_background.png with 100% similarity]
therapy/therapy_background.xcf [moved from static/therapy_background.xcf with 100% similarity]
therapy/therapy_draw.js [moved from static/therapy_draw.js with 100% similarity]
therapy/update_therapy.sh [moved from actions/update_therapy.sh with 100% similarity]
update_bookmarks.sh [moved from actions/update_bookmarks.sh with 100% similarity]

index fb3970922e1e8f2ef17a11ea80cfcf1c04cc56e6..4dba977558682ee5eaa64da1a0ca3105fdfc3da6 100644 (file)
@@ -1,3 +1,6 @@
 [submodule "shcgi"]
        path = shcgi
        url = http://git.plutz.net/git/shcgi
+[submodule "cgilite"]
+       path = cgilite
+       url = http://git.plutz.net/git/cgilite
similarity index 100%
rename from static/cards.css
rename to cards/cards.css
similarity index 100%
rename from templates/cards.html.sh
rename to cards/cards.html.sh
similarity index 100%
rename from pages/cards.sh
rename to cards/cards.sh
similarity index 100%
rename from static/categories.css
rename to cards/categories.css
similarity index 100%
rename from pages/categories.sh
rename to cards/categories.sh
similarity index 100%
rename from actions/edit_card.sh
rename to cards/edit_card.sh
similarity index 100%
rename from actions/filter_card.sh
rename to cards/filter_card.sh
similarity index 100%
rename from actions/new_card.sh
rename to cards/new_card.sh
similarity index 100%
rename from templates/text_cards.sh
rename to cards/text_cards.sh
similarity index 100%
rename from actions/update_card.sh
rename to cards/update_card.sh
similarity index 100%
rename from templates/view_card.sh
rename to cards/view_card.sh
diff --git a/cgilite b/cgilite
new file mode 160000 (submodule)
index 0000000..3a49d64
--- /dev/null
+++ b/cgilite
@@ -0,0 +1 @@
+Subproject commit 3a49d642c02f8577096cfd31a89cb07714a95215
similarity index 100%
rename from static/common.css
rename to common.css
similarity index 100%
rename from static/courses.css
rename to courses/courses.css
similarity index 100%
rename from pages/courses.sh
rename to courses/courses.sh
similarity index 100%
rename from actions/new_course.sh
rename to courses/new_course.sh
similarity index 100%
rename from static/email.css
rename to email/email.css
similarity index 100%
rename from templates/email.html.sh
rename to email/email.html.sh
similarity index 100%
rename from pages/email.sh
rename to email/email.sh
similarity index 100%
rename from templates/frame.html.sh
rename to frame.html.sh
diff --git a/index.cgi b/index.cgi
new file mode 100755 (executable)
index 0000000..e0bf125
--- /dev/null
+++ b/index.cgi
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+for n in "$@"; do case ${n%%=*} in
+  data) _DATA="${n#data=}";;
+  exec) _exec="${n#exec=}";;
+  noerr) exec 2>&-;;
+esac; done
+
+[ -z "${_EXEC%/}" ] && _EXEC="$(realpath "${0%/*}")" || _EXEC="${_EXEC%/}"
+[ -z "${_DATA%/}" ] && _DATA=. || _DATA="${_DATA%/}"
+
+. "$_EXEC/cgilite/cgilite.sh"
+
+FILTER="$(GET filter)"
+ORDER="$(GET o |grep -m1 -axE 'firstname|lastname|bdate' || printf firstname)"
+# LISTSIZE="$(COOKIE pagesize |grep -m1 -axE '[1-9][0-9]*' || printf 50)"
+ITEM="$(PATH "${PATH_INFO#/}")"
+ACTION="$(GET a)"
+
+if [ -d "${_EXEC}/${ITEM%%/*}/main.cgi" ]
+  . "${_EXEC}/${ITEM%%/*}/main.cgi"
+elif [ "$ITEM" = "/style.css" ]; then
+  . "$_EXEC/cgilite/file.sh"
+  [ -r "$_DATA/$ITEM" ] && FILE "$_DATA/$ITEM" \
+                        || FILE "$_EXEC/style.css"
+elif [ -d "${_EXEC}/${ITEM%%/*}" -a ! -x "${_EXEC}/$ITEM" ]
+  . "$_EXEC/cgilite/file.sh"
+  FILE "${_EXEC}/$ITEM"
+else
+  printf 'Status: 404 Not Found\r\nContent-Length: 0\r\n\r\n'
+fi
similarity index 100%
rename from templates/text_frame.sh
rename to text_frame.sh
similarity index 100%
rename from static/therapy.css
rename to therapy/therapy.css
similarity index 100%
rename from pages/therapy.sh
rename to therapy/therapy.sh