Skip to main content

A collection of scripts used to manage my personal Foam workspace

Project description

Seckerwiki Scripts

This package contains various scripts for managing my markdown-based wiki monorepo.
I store everything from lecture notes to journal entries in my wiki. The main command, wiki, has functions for downloading slides, setting labels, cross referencing docs and more! see usage

Installation

Dependencies:

  • poppler if using a mac (brew install poppler)
  • unoconv for converting pptx to pdf (link)
  • gpg for journal encryption/decryption

Install the package & pip dependencies

pip install --user seckerwiki

(mac only?) Add the scripts path to your $PATH variable, as described in the pip install logs

export PATH=$PATH:/path/to/wiki/scripts

Set up configuration file

wiki setup

Configure wiki scripts

vim ~/.personal.yml

See config for configuration file details.

Wiki structure

I stick to the following wiki structure. Currently, the lecture generation scripts assume this structure.

wiki_root/
    Personal/
        Personal-Management/
            Journal/
    Uni/
        General/
        Tri-1/
            COURSE_CODE/
                Lectures/
                    images/
                    lecture-01-name.md
                Assignments/
        Tri-2/
        Full-Year/
    Scripts/

Usage

This section shows off a brief explanation of each command in the wiki script.

Lecture

Initiates an interactive script for downloading pdf or pptx lecture slides, converts them into individual images, and places the images onto a markdown file. Markdown is a great way to store lecture notes because the plain text format is simple and reliable. The images have the content and extra annotations can be written under each slide. A version controlled git repository of lecture notes will be around forever.

Setup

Sets up the wiki CLI configuration file with some default values. See config for details.

log

Alias for git log, with some pretty graph options.

open

runs [editor] /path/to/wiki, where editor is the editor command, for example code (vscode) or vim

commit

does a git commit, generating a commit message. If there are a number of staged files, the commit header shows the top level folders instead.

todo

grep for TODOs in the wiki.

sync

perform a git pull then git push

tags

To horizontally group wiki pages in different directories, I implemented a simple document tagging system. In the top line of each file, a comment can be added to add tags in the following format:

<!-- tags: tag1, tag2, tag3 -->

Running wiki tags --union will show all the tags. Running with one or more arguments will reduce the output to files that have all of the tags supplied (alternatively, add the --union tag to show all files that contain any of the supplied tags). For example, wiki tags todo project will show all files that have BOTH todo and project tags.

I have a few things planned to improve this:

  • Cache the outputs so it doesn't search the wiki tree each time
  • better visualisation
  • rewrite the function (bit of a mess atm)

journal

I use my wiki to store encrypted journal entries.

Run wiki journal to generate a new empty journal entry in the journal folder specified in the settings. wiki journal --encrypt replaces all the .md files with .md.asc files, encrypting the files with a symmetric key specified in the settings. wiki journal --decrypt [path] decrypts a file and prints it to stdout.

links

open a list of links in your favourite browser. Great for quickly bringing up most commonly used tabs when you start the computer.

receipt (WIP)

Save a receipt to the wiki (todo)

build (WIP)

build the markdown into html/pdf files (todo)

Config

When running wiki setup, it generates the following example config file (added some comments here to explain the options):

wiki-root: /home/benjamin/Personal/personal # root directory of the wiki
journal-path: Personal/Personal-Management/Journal # relative path from root to the journal directory
journal-password: password # symmetric key for encypting journal articles
courses: # list of lists of courses separated by semester/trimester
  tri-1:
    - COMP424
    - NWEN438
    - ENGR401
  tri-2:
    - NWEN439
    - SWEN430
    - ENGR441
  full-year:
    - ENGR489
links: # list of links to open when running the `wiki links` command
  - https://trello.com/
  - https://mail.google.com/mail/?shva=1#inbox
  - https://calendar.google.com/calendar/r
  - https://clockify.me/tracker
browser-command: firefox # terminal command to open web browser
editor-command: code # terminal command to open text editor

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seckerwiki-2.0.2.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seckerwiki-2.0.2-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file seckerwiki-2.0.2.tar.gz.

File metadata

  • Download URL: seckerwiki-2.0.2.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.6.9 Linux/4.4.0-19041-Microsoft

File hashes

Hashes for seckerwiki-2.0.2.tar.gz
Algorithm Hash digest
SHA256 118faaea8d1ce102f51855bc58382e693dd7505443ab45e6a2ccb4ab52466948
MD5 eeda9228dc29102fb98b2fb4d828ef1b
BLAKE2b-256 92c3d94f7c4abcf569a0892ce0ca5f71db1052eda30f237e20e2f03cbf91f319

See more details on using hashes here.

File details

Details for the file seckerwiki-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: seckerwiki-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.6.9 Linux/4.4.0-19041-Microsoft

File hashes

Hashes for seckerwiki-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fa3d48bc2dbd4e95579eb860b2f566a44839f251e34579a9e389b75c6e26fc28
MD5 e1c5d500636add522fe371656787e8b3
BLAKE2b-256 729c0360b25f93bfc7e432548aa11c8e2c25a5889e74990e6e643adb66de3c01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page