J.C. Reinecke
(c) 2019
- Project Home: https://github.com/paploo/leioparse
- Project Mirror: https://gitlab.com/paploo/LeioParse
A little project for myself to parse the reading logs from the reading log app for iOS, Leio.
This program parses the log files exported from Leio (an iOS reading tracker), generates statistics, and outputs the data in several formats for processing in various systems.
This currently supports dumping to a large JSON structure, as well as outputting CSV in formats that are easy to parse in spreadsheets for graphical display and analysis.
Since this is for me, I haven't tried to bundle this as a self-contained app, instead I run it from sbt, the scala-centric (and ironically named) simple build tool.
To run the program, either start the sbt shell, or invoke with arguments from the shell directly. In its most simple form, that would be:
Inside the sbt shell, simply do
run <path_to_data_dir>
From the bash shell, you have to quote the command:
$ sbt "run <path_to_data_dir>"
use the --help
switch to get further options, such as formatters, output to file, and use of a book library overlay
that is different than the one I've bundled in (which happens to be mine).
To test with coverage, you have to compile with coverage turned on:
$ sbt coverage test coverageReport
Note that IntelliJ will choke if trying to run on the files compiled with coverage on; the easiest way is to
clean and compile from a new sbt instance (one without coverage loaded); however if you are in an active sbt
session, use coverageOff
to clear coverage first, and then clean
and compile
. This leads to an interesting chain
of commands I find myself running:
$ sbt clean coverage test coverageReport coverageOff compile
See the LICENSE file.