add folders and default variables

This commit is contained in:
Tykayn 2023-07-08 10:57:36 +02:00 committed by tykayn
parent 8d3b2cca0f
commit eda5f5ca05
9 changed files with 81 additions and 0 deletions

2
Makefile Normal file
View File

@ -0,0 +1,2 @@
default:
bash ./initialization/init_workflow.sh

0
assets/.gitkeep Normal file
View File

View File

@ -0,0 +1,17 @@
#!/bin/bash
#
# ----------------- documentation -----------------
# tâche à effectuer régulièrement sur les ordis portables
#
# @author functions_sync by @tykayn - contact at cipherbliss.com
source ~/Nextcloud/ressources/workflow_nextcloud/workflow_variables.sh
# récupérer les notes du mobile et les stocker dans l'incoming inbox orgmode
bash $WORKFLOW_PATH/archive_from_nextcloud.sh
bash $WORKFLOW_PATH/update_calendar_tkwulfi.sh
bash $WORKFLOW_PATH/get_nextcloud_notes_todo.sh
bash $WORKFLOW_PATH/backup_nextcloud_in_user_home.sh
bash $WORKFLOW_PATH/git_auto_commit_workflow_folder.sh
upPhotosADispatcher

View File

0
bin/.gitkeep Normal file
View File

View File

View File

@ -0,0 +1,4 @@
#!/bin/bash
#
# mise en place du workflow
#

View File

@ -0,0 +1,6 @@
#!/bin/bash
#
# variables à ne pas versionner
#
export secret_key="bidule"

View File

@ -0,0 +1,52 @@
#!/bin/sh
FILES="${@}"
USERTAG="@$USER"
no_files_found()
{
echo "No files found. Please do give me some Org-mode files as parameter" >&2
exit 1
}
[ "x$FILES" = "x" ] && no_files_found
TODO=$(egrep '^\*+.*(TODO|NEXT)' ${FILES}|wc -l)
STARTED=$(egrep '^\*+.*STARTED' ${FILES}|wc -l)
WAITING=$(egrep '^\*+.*WAITING' ${FILES}|wc -l)
CANCELLED=$(egrep '^\*+.*CANCELLED' ${FILES}|wc -l)
DONE=$(egrep '^\*+.*DONE' ${FILES}|wc -l)
TOTAL=$(wc -l ${FILES}|grep total)
HEADINGS=$(egrep '^\*+' ${FILES}|wc -l)
USERTAGGED=$(egrep "^\*+.*:${USERTAG}:.*" ${FILES}|wc -l)
OTHERATTAGGED=$(egrep '^\*+.*:@.+:.*' ${FILES} | grep -v "${USERTAG}" | wc -l)
OPEN=$(( TODO + STARTED + WAITING ))
FINISHED=$(( CANCELLED + DONE ))
TASKS=$(( OPEN + FINISHED ))
NONTASKS=$(( HEADINGS - TASKS ))
cat <<EOF
Stats for: $FILES
$HEADINGS headings in $TOTAL lines
$TASKS task headings
$NONTASKS non-task headings
$USERTAGGED tagged with $USERTAG
$OTHERATTAGGED tagged with "@.+" but not "$USERTAG"
$OPEN open tasks:
TODO: $TODO
STARTED: $STARTED
WAITING: $WAITING
$FINISHED finished tasks:
CANCELLED: $CANCELLED
DONE: $DONE
EOF
#end