Skip to content

Instantly share code, notes, and snippets.

@linuxcaffe
linuxcaffe / Makefile
Created November 14, 2021 02:45
hledger+pandoc invoice generator
INVOICECMD=./mkinvoice client.md work.client.dev assets:receivable:client:reimbursement
client-dry:
$(INVOICECMD)
client:
$(INVOICECMD) -m -p
@read -p "press enter to commit, or ctrl-c to cancel: "
$(INVOICECMD) -c
@linuxcaffe
linuxcaffe / on-modify.timetrack.py
Created November 10, 2021 21:17 — forked from wbsch/on-modify.timetrack.py
Time tracking hook script for Taskwarrior that outputs ledger timelog formatted data.
#!/usr/bin/env python
#
# Writes task start/stop times to a timelog formatted file.
# You might need to adjust LEDGERFILE, or set the TIMELOG environment variable.
#
# Example reports, after using start/stop on a task:
# ledger -f /path/to/timelog.ledger print
# ledger -f /path/to/timelog.ledger register
#
# Projects, tags, and UUIDs are fully supported and queryable from ledger.
@linuxcaffe
linuxcaffe / on-launch_stopstarted.sh
Created June 1, 2019 23:19 — forked from wbsch/on-launch_stopstarted.sh
Taskwarrior hook that stops all active tasks when "task FILTER start" is run. PoC for https://bug.tasktools.org/browse/TW-1712
#!/usr/bin/env bash
# Stops all previously active tasks on "task FILTER start"
#
# Only pending tasks are checked/stopped. If you really want to stop
# started tasks that are completed/deleted, remove the status:pending
# filter. Note that this will decrease performance, and should not
# be necessary.
tw_command=""
for i in "$@"; do
#!/usr/bin/env python3
#
# Save as on-add_annotate.py in hooks directory, then:
# $ chmod +x ~/.task/hooks/on-add_annotate.py
#
# Anything after "annotate:" in a new task's description is added as an
# annotation:
# $ task add this is the description annotate:this is an annotation
import json
djp@ace:~/.vim/bundle/vim-devicons$ pip show tasklib
Name: tasklib
Version: 1.1.0
Summary: Python Task Warrior library
Home-page: https://github.com/robgolding63/tasklib
Author: Rob Golding
Author-email: rob@robgolding.com
License: BSD
Location: /home/djp/.local/lib/python3.5/site-packages
Requires: six, pytz, tzlocal
; PCF csv rules file
; Date, Transaction Details, Funds Out, Funds In
; 01/04/2016,POS MERCHANDISE FOODLAND #6737,11.97,
; 01/11/2016,POS MERCHANDISE FOODLAND #6737,42.01,
; 01/11/2016, ABM DEPOSIT,,141.98
; 01/11/2016,POS MERCHANDISE HOME COMPUTER,11.30,
skip 1
date-format %m/%d/%Y

taskwiki -- projects -- areas


Index Name :: index.wiki Description :: top taskwiki index page Created :: Aug31, 2015 Manager :: djp Files :: ~/.task/wiki/

Taskwiki Index

djp@ace ~ $ actor-daemon
Traceback (most recent call last):
File "/usr/local/bin/actor-daemon", line 3, in <module>
from actor.core.actord import main
File "/usr/local/lib/python2.7/dist-packages/actor/core/actord.py", line 8, in <module>
from main import Actor, ActorDBusProxy
File "/usr/local/lib/python2.7/dist-packages/actor/core/main.py", line 15, in <module>
from activities import Activity, Flow
File "/usr/local/lib/python2.7/dist-packages/actor/core/activities.py", line 7, in <module>
from plugins import Plugin, PluginMount, ContextProxyMixin, PersistentStateMixin
@linuxcaffe
linuxcaffe / on-exit_git.py
Created November 24, 2016 05:41 — forked from wbsch/on-exit_git.py
Proof of concept for a Taskwarrior on-exit hook that manages a git repository in ~/.task
#!/usr/bin/env python
#
# PoC: Manage a git repository in ~/.task that gets updated on changes.
# Only pending.data and completed.data are included by default.
# You can use "git add" to add whatever files you want to track in your
# task folder.
#
# Inspired by https://gist.github.com/Unode/9366218
#
# Works with any Taskwarrior version that supports hooks.
diag_Hooks-improvement.txt
:Author: djp
:Date: 2016-01-03 22:27
This is a text mockup of a proposed refinement of the task diag / Hooks section.
The current display bugs be because;
a) "Scripts" is redundant