Last updated:
2020-09-25 19:07

Purpose: An overview of rendering time-based data.

Prerequistes: an understanding of The Render Function and layouts.

Note: Logbook support is rudimentary and in-progress of being built.


When parsing your org-mode files, Firn collects Logbook data in the case that you want to render time-based visuals.


Rendering Logbook Visualizations

Rendering Logbook Visualizations

Currently, there is limited experimentation with rendering SVG charts based on logbook data. It is likely that this render option will be deprecated as a better alternative is developed.

Come back soon!

Logbook Polyline

Logbook Polyline

Graphs all logbook entries for the current file in a polyline, generating a chart for each year.

(defn default
  [{:keys [render partials]}]
  (let [{:keys [head]} partials]
      [:div (render :logbook-polyline {:stroke "#45698A" :height 60 :width 365})]]))
Accessing raw logbook data

Accessing raw logbook data

Logbook data is available in your layouts.

  • site-logs provides log data for all logbooks across all files.

  • logbook provides data for the file you are rendering.

(defn default
  [{:keys [logbook site-logs]}]
   ; ...

Both the logbook and site-logs are lists of maps that look roughly like so:

[{:end-ts 1600792920000,
  :start {:year 2020, :month 9, :day 20, :dayname "Sun", :hour 16, :minute 42},
  :start-ts 1600620120000,
  :type "clock",
  :duration "48:00",
  :from-headline "Overview",
  :post_blank 0,
  :end {:year 2020, :month 9, :day 22, :dayname "Tue", :hour 16, :minute 42},
  :from-url "http://localhost:4000/folding",
  :file-tags nil,
  :from-file "Folding"}]