User Tools

Site Tools


project:uzzas:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
project:uzzas:start [2018/06/16 23:53] – edit and clone sachyproject:uzzas:start [2018/06/17 20:53] (current) sachy
Line 3: Line 3:
 {{template>:project:infobox| {{template>:project:infobox|
 name=UzZas| name=UzZas|
-image= |+image=.:uzzas:plostboros.svg?400 |
 founder=[[user:sachy:start]]| founder=[[user:sachy:start]]|
 interested=[[user:sumie-dh]]| interested=[[user:sumie-dh]]|
Line 11: Line 11:
 ~~META: ~~META:
 status = active status = active
-&relation firstimage = +&relation firstimage = :project:uzzas:plostboros.svg
 ~~ ~~
  
Line 37: Line 37:
  
   - Check if the dependencies are met (bash interpreter, sqlite3). If you want automatic notifications, you need also CRON and zenity.   - Check if the dependencies are met (bash interpreter, sqlite3). If you want automatic notifications, you need also CRON and zenity.
-  - Run "uzzas.sh -i"+  - Download the script and make it executable "chmod +x uzzas.sh"
 +  - Run "uzzas.sh -i" to create the database and to create crontab entry. 
 + 
 +If you will ever update/modify the uzzas.sh script, do NOT reinstall it.
  
 <code> <code>
Line 179: Line 182:
  
 ===== Source code ==== ===== Source code ====
 +
 +Download the script and make it executable "chmod +x uzzas.sh".
 +
 +Run "uzzas.sh -i" to create the database and to create crontab entry for reminding you.
 +
 +After update of the uzzas.sh script, do NOT reinstall it!
  
 <code bash uzzas.sh> <code bash uzzas.sh>
Line 271: Line 280:
     ;;     ;;
   "ping"|"-p"|"--ping") # Invoked via CRON, display graphical   "ping"|"-p"|"--ping") # Invoked via CRON, display graphical
-    todo=$(echo ".headers on^.width 20 20 40^.mode column^SELECT box,inside,note FROM zas WHERE day=date('now');" | tr '^' '\n' | sqlite3 "$db"+    count=$(sqlite3 "$db" "SELECT count(rowid) FROM zas WHERE day=date('now');"
-    zenity --width=600 --info --text="$todo" --title="UzZas"+    if [[ "$count" > "0" ]]; then 
 +      boxlen=$(sqlite3 "$db" "SELECT max(length(box)) FROM zas WHERE day=date('now');"
 +      inslen=$(sqlite3 "$db" "SELECT max(length(inside)) FROM zas WHERE day=date('now');"
 +      notelen=$(sqlite3 "$db" "SELECT max(length(note)) FROM zas WHERE day=date('now');"
 +      todo=$(echo ".headers on^.width $boxlen $inslen $notelen^.mode column^SELECT box,inside,note FROM zas WHERE day=date('now');" | tr '^' '\n' | sqlite3 "$db"
 +      #zenity --width=600 --info --text="$todo" --title="UzZas" 
 +      zenity --info --title="UzZas" --no-wrap --text="<tt>$todo</tt>" 
 +    fi
     ;;     ;;
   "help"|"-h"|"--help")   "help"|"-h"|"--help")
project/uzzas/start.1529193187.txt.gz · Last modified: 2018/06/16 23:53 by sachy