ibayer / dotfiles Goto Github PK
View Code? Open in Web Editor NEWThis project forked from sontek/homies
My configuration files (.vimrc, .i3, .bashrc, .gitconfig, etc)
This project forked from sontek/homies
My configuration files (.vimrc, .i3, .bashrc, .gitconfig, etc)
Org-Drill is an extension for Org mode. Org-Drill uses a spaced repetition algorithm to conduct interactive "drill sessions", using org files as sources of facts to be memorised. I want to track the progress made for each drill session by saving some counts together with a timestamp to a seperate file drill-stats.csv
.
This is a simple example how to save a timestamp after each drill session.
(setq my-drill-stats-file "/tmp/drill-stats.csv")
(defun my-save-final-report ()
(write-region (format "%s\n" (current-time-string))
nil my-drill-stats-file 'append))
(advice-add 'org-drill-final-report :before 'my-save-final-report)
This is an example file that contains org-drill drawers.
* first :drill:
SCHEDULED: <2017-05-14 So>
:PROPERTIES:
:ID: 4e74e88d-b9c2-4c7e-b8a2-db3369d563b6
:DRILL_LAST_INTERVAL: 4.14
:DRILL_REPEATS_SINCE_FAIL: 2
:DRILL_TOTAL_REPEATS: 1
:DRILL_FAILURE_COUNT: 0
:DRILL_AVERAGE_QUALITY: 5.0
:DRILL_EASE: 2.6
:DRILL_LAST_QUALITY: 5
:DRILL_LAST_REVIEWED: [2017-05-10 Mi 22:59]
:END:
question
** result
bla
* first 2 :drill:
SCHEDULED: <2017-05-14 So>
:PROPERTIES:
:ID: a39f420f-a1f4-4350-af63-828423472df1
:DRILL_LAST_INTERVAL: 3.86
:DRILL_REPEATS_SINCE_FAIL: 2
:DRILL_TOTAL_REPEATS: 1
:DRILL_FAILURE_COUNT: 0
:DRILL_AVERAGE_QUALITY: 3.0
:DRILL_EASE: 2.36
:DRILL_LAST_QUALITY: 3
:DRILL_LAST_REVIEWED: [2017-05-10 Mi 22:59]
:END:
question
** result
bla
The problem I want to solve is to extend the function my-save-final-report
(see above and https://github.com/ibayer/dotfiles/blob/emacs/_emacs.d/lisp/init-org.el#L387) to append the count for each possible DRILL_LAST_QUALITY
(0:5) to the file drill-stats.csv
for each entry with the :drill:
tag.
The correct entry for the example given above would be:
drill-stats.csv (only values 3 and 5 are in the file)
Wed May 10 22:59:40 2017, 0, 0, 0, 1, 0, 1
I would appreciate any ideas on how to solve this task.
References that might be useful:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.