-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate all the Things! (as in: Shave all the Yaks).
- Loading branch information
Showing
4 changed files
with
89 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#+HTML_HEAD: <style type="text/css">body { font-family: Fira Sans, Helvetica, Arial, sans-serif; }</style> | ||
|
||
* My Talks | ||
|
||
<% talks.each do |talk| %> | ||
- [[file:<%= talk %>][<%= talk %>]]<% end %> | ||
|
||
This is a (non-comprehensive) list of talks I gave at various user | ||
groups & conferences. If you have any questions, feel free to reach | ||
out for me via a GitHub issue in this repo. | ||
|
||
** Found license issues & copyright violations? | ||
I tried my best to keep the original licenses and give credit to | ||
original authors. If you miss photos from a Talk I gave, that probably | ||
means that I couldn't find the author of the image or give proper | ||
attribution. | ||
|
||
If you find photos / images / text content in this repository that | ||
violates intellectual property, please notify me at ~github dot com at | ||
bascht dot com~ and I will take it down. | ||
|
||
** License | ||
Unless noted otherwise, all content in this repository is free for you | ||
to use under the terms of the [[http://creativecommons.org/licenses/by-sa/4.0/][Attribution-ShareAlike 4.0 International | ||
(CC BY-SA 4.0)]] license. | ||
|
||
Generated: <%= Time.new %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# -- encoding: utf-8 -- | ||
require 'logger' | ||
require 'fileutils' | ||
require 'erb' | ||
|
||
@logger = Logger.new(STDOUT) | ||
@logger.formatter = proc { |serverity, time, progname, msg| "#{time} – #{msg}\n" } | ||
|
||
def talks(file = "") | ||
Dir.glob("[0-9]*/#{file}").sort.reverse | ||
end | ||
|
||
def dontbotherme(command) | ||
@logger.info("Executing [#{command}]") | ||
pid = spawn(command, [:out, :err] => '/dev/null') | ||
Process.wait(pid) | ||
end | ||
|
||
task :ioslide do | ||
system("git checkout gh-pages") | ||
talks("README.org").each do |file| | ||
path = File.dirname(file) | ||
if File.exists?("#{path}/index.html") | ||
@logger.warn("Skipping #{path}. Found an index.html.") | ||
next | ||
end | ||
|
||
@logger.info("Building #{file}") | ||
dontbotherme("emacs --batch -l ~//.emacs.d/init.el --visit=#{file} --funcall org-ioslide-export-to-html") | ||
@logger.debug("Moving #{path}/README.html to #{path}/index.html") | ||
FileUtils.move("#{path}/README.html", "#{path}/index.html") | ||
end | ||
@logger.info("Done building ioslides.") | ||
end | ||
|
||
task :index do | ||
README = File.read('README.org.erb') | ||
index = ERB.new(README).result(binding) | ||
File.open('README.org', 'w') {|f| f.write(index) } | ||
@logger.info("Rebuilt ORG index.") | ||
dontbotherme("emacs --batch -l ~//.emacs.d/init.el --visit=README.org --funcall org-html-export-to-html") | ||
@logger.info("Rebuilt HTML index. I'm done.") | ||
end | ||
|
||
task :default => [:ioslide, :index] |