Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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)
@craigeley
craigeley / timeline_things_dayone.rb
Created December 30, 2017 19:30
Find completed Things tasks, cross reference them with Google Timeline, and send the output of each location to Day One.
#!/usr/local/bin/ruby
# Scipt for using Using Google Time to create summary records of Things in Day One
require 'time'
require 'date'
require 'json'
require 'yaml/store'
require 'nokogiri'
# To prevent encoding errors on OSX
@craigeley
craigeley / timeline_kml_to_geojson.rb
Created December 30, 2017 16:15
Parse a Google Timeline KML file and convert to geoJSON in order to visualize directly on GitHub.
#!/usr/local/bin/ruby
# Scipt for parsing Google Timeline files to geoJSON
require 'time'
require 'json'
require 'nokogiri'
# To prevent encoding errors on OSX
if RUBY_VERSION =~ /2.*.*/
Encoding.default_external = Encoding::UTF_8
@craigeley
craigeley / asana_to_things.rb
Created June 18, 2017 16:51
Sync tasks assigned to you in an Asana workspace to an area in Things 3. Define variables for lines 20 and 21 in a "data.yml" file. Fill in your area name on line 22.
#!/usr/bin/env ruby
# Syncing Tasks Assigned to you in Asana with Things 3
require 'json'
require 'yaml/store'
require 'time'
# Load storage file and variables
store = YAML::Store.new("data.yml")
mod = store.transaction { store[:mod_time] }