add concat script
This commit is contained in:
parent
6162a6ef5d
commit
4167d28530
|
@ -134,3 +134,9 @@ output/*
|
|||
source/*.json
|
||||
sources/*
|
||||
/scripts/all_tasks.org
|
||||
/scripts/all.pdf
|
||||
/scripts/all.tex
|
||||
/scripts/all_tasks.json
|
||||
/scripts/stats.org
|
||||
all_tasks.org
|
||||
stats.org
|
|
@ -3,8 +3,12 @@ touch all_tasks.org
|
|||
echo "" > all_tasks.org
|
||||
cat /home/tykayn/Nextcloud/textes/orgmode/tasks.org >> all_tasks.org
|
||||
cat /home/tykayn/Nextcloud/textes/orgmode/tasks.org_archive >> all_tasks.org
|
||||
cp all_tasks.org /home/tykayn/Nextcloud/textes/orgmode/stats
|
||||
|
||||
echo " décomptes: "
|
||||
|
||||
touch stats.org
|
||||
date >> stats.org
|
||||
echo " décomptes: " >> stats.org
|
||||
todos=`grep -o '* TODO' all_tasks.org | wc -l`
|
||||
echo " TODO : $todos"
|
||||
|
||||
|
@ -14,7 +18,7 @@ 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"
|
||||
|
@ -23,17 +27,17 @@ counter=`grep -o '* DONE' all_tasks.org | wc -l`
|
|||
done=$counter
|
||||
echo " DONE : $counter"
|
||||
|
||||
counter=`grep -o '* CREATED' all_tasks.org | wc -l`
|
||||
echo " CREATED : $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 /home/tykayn/Nextcloud/textes/orgmode/org-roam/*.org | wc -l`
|
||||
echo " Roam files : $counter"
|
||||
|
||||
emacsclient -e '(progn (switch-to-buffer "all_tasks.org") (org-beamer-export-to-pdf))'
|
||||
#pandoc -i all_tasks.org -o all_tasks.json
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* convert org file to json
|
||||
* @type {string}
|
||||
*/
|
||||
|
||||
var Org = require("org");
|
||||
|
||||
var orgCode = "* some org notation text";
|
||||
var orgParser = new Org.Parser();
|
||||
var orgDocument = orgParser.parse(orgCode);
|
||||
var orgHTMLDocument = orgDocument.convert(Org.ConverterHTML, {
|
||||
headerOffset: 1,
|
||||
exportFromLineNumber: false,
|
||||
suppressSubScriptHandling: false,
|
||||
suppressAutoLink: false
|
||||
});
|
||||
|
||||
console.dir(orgHTMLDocument); // => { title, contentHTML, tocHTML, toc }
|
||||
console.log(orgHTMLDocument.toString()) // => Rendered HTML
|
Loading…
Reference in New Issue