flaper87 / obsidian-kaffelogic-plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kaffelogic Plugin for Obsidian

NOTE: THIS PLUGIN IS UNDER HEAVY DEVELOPMENT, UNSTABLE, AND AT SUPRE EARLY STAGE

The Kaffelogic plugin for Obsidian helps importing Kaffelogic Roasts (KLog Files) into Obsidian. What it currently does:

Screenshot of the top part of the note

Screenshot of the top part of the note with chart

Screenshot of the bottom part of the note

  • Alt + k -> Opens a new dialog to search for the log to import
  • On import, it reads the log, extracts all the stats and writes them into a note in the form of a Markdown table
  • Copies the original klog file into the attachment directory
  • If a PDF for the log is present in the same directory, it will copy the PDF to the attachment directory as well

Installation

NOTE: This plugin currently depends on Templater. Please, make sure it's installed before using the Kaffelogic plugin.

For now, I would recommend just cloning the repo and doing:

$ yarn install
$ yarn build
$ mv dist $YOUR_VAULT_DIR/.obsidian/plugins/Kaffelogic-obsidian

Once that's done, you can go into the Community Plugins section in obsidian to enable the Kaffelogic plugin. Finally, configure the various paths in the Kaffelogic settings and start importing your logs.

HotKey

The default hotkey for the import command is: Alt+k and it can be changed through the hotkey's menu.

Settings

The settings section allows for:

  • Setting your Kaffelogic files path
  • Setting your template file
  • Setting the directory in your vault where the imported roasts will be saved
  • Enable/disable variables to import
  • Group variables into specialized tables (see section below on how to use this specialized tables)

Screenshot of the settings tab

Documentation (will eventually move into proper docs):

  • kl_log_var_{variable} -> Will be replaced with the value of the variable chosen. The list of variables can be found here or in the settings tab
  • kl_log_table_{group_name} -> Will be replaced with a table for the desired group.
  • kl_log_data_table -> Will be replaced with the log table data
  • kl_log_attachment -> Adds a link to the imported log
  • kl_log_attachment_pdf -> Adds a link to the imported PDF (if present)
  • kl_log_chart -> Adds chart data to use with obsidian-chart

Upcoming features / ideas

  • Render a roast graph
  • Allow to import all the logs with one command
  • Allow to select what keys to import in the table
  • Make these notes easier to search and link between them.
  • Integrate better with templater so that users can customize the import process.

Contributions and credits

  • The code in the src/fileSystem module was mostly copied from the obsidian-readwise module.
  • Lots of inspiration and learning from the amazing Templater plugin (including the CommandHandler).

About


Languages

Language:TypeScript 94.5%Language:JavaScript 5.5%