Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Convert GTasks semi-automatically into a weekly or monthly status report.
#! /bin/sed -f
# Convert GTasks semi-automatically into a weekly or monthly status
# report. This happens to convert into TiddlyWiki format, but it should
# be no harder to do markdown, moin, or mediawiki. This script is more
# about the idea, and some fun showing off how to invoke ‘sed’ from
# shebang, and using ‘xsel’. Tweak as you see fit!
#
# Why bother? Can’t be sure how long your completed tasks will be
# available, so it’s nice to keep a record of your own. Maybe your boss
# would like you to send a monthly roll-up, or you just like to organize
# completed tasks into a personal or team-viewable wiki. Might be worth
# having a calendar reminder go off to tell you to run this.
#
# 1. Choose a list to do your important tracking.
# 2. Click: Actions → View completed tasks
# 3. Copy however many items you want to archive (select manually with
# mouse!) for time window. Yes, GTasks needs an API.
# (Optional) Paste buffer to a file (eg, ‘xsel >thismonth.gtasks’)
# 4. Run this over your buffer (or the file you saved it as).
# % xsel |gtasks2tiddly.sed
# OR
# % gtasks2tiddly.sed thismonth.gtasks
# 5. Paste that output of this script into “status” Tiddler.
#
# Actually, if running X you can do the whole thing with just:
# xsel |gtasks2tiddly.sed |xsel -i
# Remove blank lines, all of them since tiddly prefers.
/^ *$/d
# Convert every “# Heading” to “!!Heading”
s/^# /!!/
# Remove space at start of bullets.
s/^ \+\*/*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment