Skip to content

Instantly share code, notes, and snippets.

View adityadaniel's full-sized avatar
🛠️

Daniel Aditya Istyana adityadaniel

🛠️
View GitHub Profile
@adityadaniel
adityadaniel / textexpander_gen.rb
Last active October 29, 2022 23:44 — forked from ttscoff/textexpander_gen.rb
Mass generate TextExpander snippets from a CSV file. I modified the script to add label for the created snippets using the data from third column of the CSV file
#!/usr/bin/ruby
require 'csv'
require 'erb'
require 'cgi'
if ARGV.length == 2
input_csv = ARGV[0]
output_te = ARGV[1]
unless output_te =~ /\.textexpander$/
puts "Second argument must have a '.textexpander' extension."