Skip to content

Instantly share code, notes, and snippets.

Build Novel

I wrote this code to manage the publication of the Knowing Mars Novella in coordination with the build system that I use for tychogaren.com and Critical Futures, but this script just prepares multiple versions of the story for different kinds of readers, and prepares the content for proper rendering.

Many aspects of this script will need to be modified to be able to process other texts, but the main concepts are

#!/bin/zsh
# git-sync functions
# Copyright (c) 2010 Sam Kleinman
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the 'Software'), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,

Delegated Build

Introduction

This is the initial version of a script that clones the current git repository into build/ directory and runs make targets using this source as opposed the current working tree. More posts to come.

This is the initial implementation, and probably needs to some modification to work with your deployment. For more information and

Merge Script

Overview and Use

This script keeps two directories of files in synchronized and up to date even if you edit the files in both of the directories in between invocations of the script. Think of it as "copy on steroids."

Set the UPSTREAM, DOWNSTREAM, and CACHE variables as needed before use. Also, if your system does not have the merge binary

Org-Mail

These scripts and glue accept email sent to a secret address and convert the body of the email into a file where the subject of the email becomes an org-mode headline with the body of the note as the body of that org-mode item. Using a custom FILE todo keyword, these items are included in the org-agenda (assuming that ~/mail/inbox.org is included on your agenda.) With a deadline of "today," relative to receipt of the email.

Download Mail

I've revised the way that my git-mail method for downloading mail works. This system feels much more refined, results in far fewer commits, and resides entirely on the "client," system, which I think makes it easier to reproduce. I need to integrate local mail fetching (i.e. fetchmail) a bit more tightly, and I probably ought to work on porting it to something that isn't zsh/bash.

#!/bin/zsh

Ikiwiki Tasklist

I love org-mode, don't get me wrong, but as I do more work inside of [ikiwiki], I think I'd like to have an org-agenda like functionality inside of an ikiwiki. I've cobbled together the following script with that goal in mind.

This is probably the best script I've written so far: it has nifty arguments and (some) error checking (see the help text for more), and best of all it works like a dream. The only thing to configure is the

Novel Makefile

Background

This makefile-based build system provides a bit of extra gloss/configuration for using Sphinx and sffms to build conventional manuscripts and websites for novel-like hypertexts.

Usage Notes

@tychoish
tychoish / epistle-linker
Last active August 29, 2015 14:07
Epistle Linker
I've been using [Epistle](http://kooklab.com/epistle.html) for writing
on my Android devices and while I adore the software there are a
couple of significant limitations. Notably that all files need to be
in one directory with no hierarchy and that all files need to have
`.txt` extensions. I have pretty good file organization in a number of
git repositories, and I don't use the `.txt` extension at all. hile
Epistle is *great*, I needed a way to integrate it with my current
system without causing a nightmare.
Luckily the command line Linux dropbox program recognizes symbolic
source/core/gridfs.txt:13: ERROR: Too many autonumbered footnote references: only 0 corresponding footnotes available.
source/core/gridfs.txt:13: ERROR: Unknown target name: "default-chunk-size-change".
source/reference/command/geoNear-field.rst:105: SEVERE: Problems with "include" directive path:
source/reference/command/geoNear-field.rst:105: SEVERE: Problems with "include" directive path: source/includes/deprecation-uniqueDocs.rst
source/reference/command/geoNear-field.rst:147: SEVERE: Problems with "include" directive path:
source/reference/command/geoNear-field.rst:147: SEVERE: Problems with "include" directive path: source/includes/fact-geoNear-restrict-near-in-query.rst
source/reference/command/geoNear-field.rst:181: SEVERE: Problems with "include" directive path:
source/reference/command/geoNear-field.rst:181: SEVERE: Problems with "include" directive path: source/includes/deprecation-uniqueDocs.rst
source/reference/command/geoNear-field.rst:63: SEVERE: Problems with "include" directive path:
source/r