project:uzzas:start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
project:uzzas:start [2018/06/16 20:14] – sachy | project:uzzas:start [2018/06/17 20:53] (current) – sachy | ||
---|---|---|---|
Line 3: | Line 3: | ||
{{template>: | {{template>: | ||
name=UzZas| | name=UzZas| | ||
- | image= | | + | image=.: |
founder=[[user: | founder=[[user: | ||
interested=[[user: | interested=[[user: | ||
Line 11: | Line 11: | ||
~~META: | ~~META: | ||
status = active | status = active | ||
- | & | + | & |
~~ | ~~ | ||
Line 30: | Line 30: | ||
* **(install|-i|--install)** - Install UzZas (create uzzas.db and CRON entry) | * **(install|-i|--install)** - Install UzZas (create uzzas.db and CRON entry) | ||
* **(ping|-p|--ping)** - Graphical equivalent of -t | * **(ping|-p|--ping)** - Graphical equivalent of -t | ||
- | * **(help|-h|--help)** - help | + | * **(help|-h|--help)** - Help |
+ | * **(edit|-e|--edit)** - Edit entry | ||
+ | * **(clone|-c|--clone|copy|--copy)** - Clone (and modify) entry | ||
==== Installation ==== | ==== Installation ==== | ||
- Check if the dependencies are met (bash interpreter, | - Check if the dependencies are met (bash interpreter, | ||
- | - Run " | + | |
+ | | ||
+ | |||
+ | If you will ever update/ | ||
< | < | ||
Line 115: | Line 120: | ||
0 | 0 | ||
Not removed! | Not removed! | ||
+ | </ | ||
+ | |||
+ | ==== Editing event ==== | ||
+ | |||
+ | To edit existing event, run " | ||
+ | |||
+ | < | ||
+ | $ ./uzzas.sh -e | ||
+ | ==== Edit entry ==== | ||
+ | 1 | ||
+ | 3 | ||
+ | 5 | ||
+ | 6 | ||
+ | 7 | ||
+ | Edit: (0 = nothing) | ||
+ | 7 | ||
+ | First time planned to (yyyy-mm-dd): | ||
+ | 2018-07-16 | ||
+ | Repeat each (days): | ||
+ | 7 | ||
+ | Item...: | ||
+ | Aqua2 | ||
+ | ...containing: | ||
+ | Modry | ||
+ | Action/ | ||
+ | Wipe | ||
+ | EDIT? (Y/n) | ||
+ | |||
+ | Tasks edited! | ||
+ | </ | ||
+ | |||
+ | ==== Cloning entry ==== | ||
+ | |||
+ | To clone/copy entry, possibly with modification, | ||
+ | |||
+ | < | ||
+ | $ ./uzzas.sh -c | ||
+ | ==== Clone entry ==== | ||
+ | 1 | ||
+ | 3 | ||
+ | 5 | ||
+ | 6 | ||
+ | 7 | ||
+ | Clone: (0 = nothing) | ||
+ | 7 | ||
+ | == Edit cloned entry == | ||
+ | First time planned to (yyyy-mm-dd): | ||
+ | 2018-08-16 | ||
+ | Repeat each (days): | ||
+ | 7 | ||
+ | Item...: | ||
+ | Aqua2 | ||
+ | ...containing: | ||
+ | Modry | ||
+ | Action/ | ||
+ | Wipe | ||
+ | COPY? (Y/n) | ||
+ | |||
+ | Tasks copied! | ||
</ | </ | ||
===== Source code ==== | ===== Source code ==== | ||
+ | |||
+ | Download the script and make it executable "chmod +x uzzas.sh" | ||
+ | |||
+ | Run " | ||
+ | |||
+ | After update of the uzzas.sh script, do NOT reinstall it! | ||
<code bash uzzas.sh> | <code bash uzzas.sh> | ||
Line 128: | Line 198: | ||
# Usage: | # Usage: | ||
# | # | ||
- | # | + | # |
# | # | ||
Line 134: | Line 204: | ||
akce=" | akce=" | ||
db=" | db=" | ||
- | |||
- | # CREATE TABLE IF NOT EXISTS zas (day TIMESTAMP, | ||
case " | case " | ||
Line 212: | Line 280: | ||
;; | ;; | ||
" | " | ||
- | todo=$(echo " | + | |
- | zenity --width=600 --info --text=" | + | if [[ " |
+ | boxlen=$(sqlite3 " | ||
+ | inslen=$(sqlite3 " | ||
+ | notelen=$(sqlite3 " | ||
+ | | ||
+ | #zenity --width=600 --info --text=" | ||
+ | zenity --info --title=" | ||
+ | fi | ||
;; | ;; | ||
" | " | ||
Line 228: | Line 303: | ||
echo " | echo " | ||
echo " " | echo " " | ||
- | echo " | + | echo " |
echo " | echo " | ||
echo " | echo " | ||
Line 238: | Line 313: | ||
echo " | echo " | ||
echo " | echo " | ||
+ | echo " | ||
+ | echo " | ||
echo " " | echo " " | ||
echo "==== See brmlab.cz/ | echo "==== See brmlab.cz/ | ||
+ | echo " " | ||
+ | ;; | ||
+ | " | ||
+ | echo "==== Edit entry ====" | ||
+ | echo ".mode column^SELECT rowid, | ||
+ | echo " | ||
+ | read edit | ||
+ | if [[ " | ||
+ | row=$(echo ".mode line^SELECT * FROM zas WHERE rowid=$edit LIMIT 1;" | tr ' | ||
+ | day=$(echo " | ||
+ | incr=$(echo " | ||
+ | box=$(echo " | ||
+ | ins=$(echo " | ||
+ | note=$(echo " | ||
+ | |||
+ | echo " | ||
+ | read -e -i " | ||
+ | echo " | ||
+ | read -e -i " | ||
+ | echo " | ||
+ | read -e -i " | ||
+ | echo " | ||
+ | read -e -i " | ||
+ | echo " | ||
+ | read -e -i " | ||
+ | echo "EDIT? (Y/n)" | ||
+ | read ack | ||
+ | |||
+ | if [[ " | ||
+ | sqlite3 " | ||
+ | echo "Tasks edited!" | ||
+ | else | ||
+ | echo "Edit cancelled!" | ||
+ | fi | ||
+ | else | ||
+ | echo " | ||
+ | fi | ||
+ | ;; | ||
+ | " | ||
+ | echo "==== Clone entry ====" | ||
+ | echo ".mode column^SELECT rowid, | ||
+ | echo " | ||
+ | read clone | ||
+ | if [[ " | ||
+ | row=$(echo ".mode line^SELECT * FROM zas WHERE rowid=$clone LIMIT 1;" | tr ' | ||
+ | day=$(echo " | ||
+ | incr=$(echo " | ||
+ | box=$(echo " | ||
+ | ins=$(echo " | ||
+ | note=$(echo " | ||
+ | |||
+ | echo "== Edit cloned entry ==" | ||
+ | |||
+ | echo " | ||
+ | read -e -i " | ||
+ | echo " | ||
+ | read -e -i " | ||
+ | echo " | ||
+ | read -e -i " | ||
+ | echo " | ||
+ | read -e -i " | ||
+ | echo " | ||
+ | read -e -i " | ||
+ | echo "COPY? (Y/n)" | ||
+ | read ack | ||
+ | |||
+ | if [[ " | ||
+ | sqlite3 " | ||
+ | echo "Tasks copied!" | ||
+ | else | ||
+ | echo "Copy cancelled!" | ||
+ | fi | ||
+ | else | ||
+ | echo " | ||
+ | fi | ||
;; | ;; | ||
esac | esac |
project/uzzas/start.txt · Last modified: 2018/06/17 20:53 by sachy