org-report-stats/scripts/concat_org.sh

44 lines
1.1 KiB
Bash

#!/usr/bin/bash
touch all_tasks.org
echo "" > all_tasks.org
cat ~/Nextcloud/textes/orgmode/tasks.org >> all_tasks.org
cat ~/Nextcloud/textes/orgmode/tasks.org_archive >> all_tasks.org
cp all_tasks.org ~/Nextcloud/textes/orgmode/stats
touch stats.org
date >> stats.org
echo " décomptes: " >> stats.org
todos=`grep -o '* TODO' all_tasks.org | wc -l`
echo " TODO : $todos"
counter=`grep -o '* SOMEDAY' all_tasks.org | wc -l`
echo " SOMEDAY : $counter"
someday=$counter
counter=`grep -o '* WAITING' all_tasks.org | wc -l`
echo " WAITING : $counter"
echo " "
counter=`grep -o '* CANCELLED' all_tasks.org | wc -l`
cancelled_tasks=$counter
echo " CANCELLED : $counter"
counter=`grep -o '* DONE' all_tasks.org | wc -l`
done=$counter
echo " DONE : $counter"
prevus=$((todos + someday))
finis=$((cancelled_tasks + done))
tout=$((prevus + finis))
echo " "
echo " prévus : $prevus"
echo " finis : $finis"
counter=`grep -o '* CREATED' all_tasks.org | wc -l`
echo " CREATED : $counter"
echo " en tout : $tout"
counter=`ls -l ~/Nextcloud/textes/orgmode/org-roam/*.org | wc -l`
echo " Roam files : $counter"
#pandoc -i all_tasks.org -o all_tasks.json