Skip to content

Instantly share code, notes, and snippets.

@craigeley
craigeley / log-completed-reminders-to-day-one.applescript
Last active May 2, 2023 17:13
An applescript that looks for Reminders completed today and then pushes them to an entry in the Day One journal app.
--Log Completed Reminders to Day One
--by Craig Eley (@craigeley), based on scripts by Samantha Hilton and Nick Morris
--This script looks for Reminders that were completed today, then automatically sends them to a single Day One entry using the Day One [CLI Tool](http://dayoneapp.com/tools/).
--Schedule it to run at 11:55 every night using Lingon or launchd and forget about it
tell application "Reminders"
set output to ""
set output to output & "# Things done on " & date string of (current date) & linefeed
@craigeley
craigeley / todoist_to_obsidian.rb
Last active January 5, 2023 19:20
This script allows you to use Todoist as your primary todo list manager but still see tasks in Todoist formatted in a way to work with the [Obsidian Tasks](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/README.md) plugin for sorting and querying. If you set this script to run periodically, it can close tasks that have been clos…
#!/usr/local/opt/ruby/bin/ruby
# encoding: utf-8
require 'json'
require "unicode/emoji"
# Variables: path and API key
path = "/Users/USER/Library/Mobile\ Documents/iCloud\~md\~obsidian/Documents/VAULTNAME/"
key = "YOUR TODOIST API KEY"
@craigeley
craigeley / sifttter_1.8.7.rb
Last active August 16, 2022 00:23
This script looks for text files in a specific folder modified today that include completed tasks ('@done') and timestamps, and then collects them into a daily log for the Day One journaling application. It works especially well when it's connected to IFTTT. See more details at http://craigeley.com/tagged/sifttter Use this script if you are runn…
#!/usr/bin/ruby
# Sifttter: An IFTTT-to-Day One Logger by Craig Eley 2014 <http://craigeley.com>
# Based on tp-dailylog.rb by Brett Terpstra 2012 <http://brettterpstra.com>
#
# Notes:
# * Uses `mdfind` to locate a specific folder of IFTTT-generated text files changed in the last day
# * The location of your folder should be hardcoded in line 53
# * Scans leading timestamps in each line matching today's date
# * Does not alter text files in any way
# * Changes ampersand ('&') to 'and' so the script keeps running
@craigeley
craigeley / completed_things3_tasks_to_dayone.rb
Created May 13, 2021 03:31
A script that finds tasks in Things 3 that were completed today and formats them as a Markdown list for Day One
#!/usr/bin/env ruby
# -*- coding: utf-8 -*- #specify UTF-8 (unicode) characters
require 'time'
tasktext = %x{ osascript <<APPLESCRIPT
set theDate to date string of ((current date))
tell application "Things3"
set output to ""
repeat with toDo in (to dos whose status is completed) of list "Logbook"
#!/usr/local/bin/node
var sub = require('subtitle');
var fs = require('fs');
var WaveFile = require('wavefile').WaveFile;
// Load a wav file as a WaveFile object
let wav = new WaveFile('');
// Read from SRT file to get start, end, and region names
@craigeley
craigeley / otter_to_audition.rb
Last active December 31, 2019 15:35
A script to convert an SRT file from Otter.ai to cue markers in Adobe Audition
#!/usr/local/opt/ruby/bin/ruby
# Scipt to convert Otter.ai-generated SRT files into Adobe Audition Markers
require 'srt'
require 'csv'
CSV.open("audition_markers.csv", "wb", col_sep: "\t") do |csv|
csv << ["Name", "Start", "Duration", "Time Format", "Type", "Description"]
end

Keybase proof

I hereby claim:

  • I am craigeley on github.
  • I am craigeley (https://keybase.io/craigeley) on keybase.
  • I have a public key whose fingerprint is 66B0 914F 27AF 93C0 C719 18FF 8D8E 3F93 C7DD 54EB

To claim this, I am signing this object:

@craigeley
craigeley / multimarkdown-chicago-fullnote
Created February 10, 2012 04:57
A modification of the Zotero Chicago Style for use with MultiMarkdown (Plain text) writing
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="sort-only">
<info>
<title>Multimarkdown - Chicago (full note)</title>
<id>http://fieldnoise.com/styles/markdown-chicago-fullnote</id>
<link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
<author>
<name>Julian Onions</name>
<email>julian.onions@gmail.com</email>
</author>
@craigeley
craigeley / add_instagram_to_contacts.scpt
Created May 23, 2019 14:10
This script takes the contents of your clipboard, allows you to search for a contact, and then adds an Instagram social media profile to that contact. Useful for use with the Vignette iOS app and the "Connections.json" file from the Instagram data dump.
set input to the clipboard as text
--whole process is in a loop to allow for user to research for contact
repeat
--need to find contact in order to update their info
try
display dialog "Enter name or company of contact to Instagram to:" default answer ""
set thePerson to text returned of result
end try
@craigeley
craigeley / arc_to_dayone.rb
Created January 12, 2019 23:18
This app parses the Arc iOS app's GPX exports and sends location to the Day One journaling app. You must have the Day One command line interface installed and set the path to your GPX files on line 8.
#!/usr/local/opt/ruby/bin/ruby
# Scipt to send Arc locations to Day One
require 'nokogiri'
require 'time'
require 'json'
filepath = "/Path/to/files/#{ARGV[0]}.gpx"
f = File.open(filepath)