Skip to content

Instantly share code, notes, and snippets.

@atelic
Last active August 29, 2015 14:21
Show Gist options
  • Save atelic/0f0c3bd8fb199b0db53a to your computer and use it in GitHub Desktop.
Save atelic/0f0c3bd8fb199b0db53a to your computer and use it in GitHub Desktop.
A quick and dirty script that inserts my custom org-mode header into new files
#! /usr/bin/env ruby
if ARGV.empty?
puts "Please enter a file name"
end
new_file = ARGV[0]
org_file = File.new(new_file, "w+")
org_file.puts("#+HTML_HEAD: <link rel=\"stylesheet\" type=\"text/css\" href=\"http://thomasf.github.io/solarized-css/solarized-light.min.css\" />\n")
org_file.puts("#+TITLE: \n")
org_file.puts("#+AUTHOR: YOUR NAME HERE\n")
org_file.puts("#+OPTIONS: toc:nil\n")
org_file.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment