diff --git a/Makefile b/Makefile deleted file mode 100644 index 32635ad..0000000 --- a/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -all: index -index: - emacs --batch -l ~//.emacs.d/init.el --visit=README.org --funcall org-html-export-to-html - mv README.html index.html diff --git a/README.org b/README.org index 833cba1..fe58797 100644 --- a/README.org +++ b/README.org @@ -2,6 +2,21 @@ * My Talks + +- [[file:2016-01-munich-rubyshift/][2016-01-munich-rubyshift/]] +- [[file:2015-12-munich-rubyshift/][2015-12-munich-rubyshift/]] +- [[file:2015-11-munich-rubyshift/][2015-11-munich-rubyshift/]] +- [[file:2015-10-munich-rubyshift/][2015-10-munich-rubyshift/]] +- [[file:2015-05-munich-rubyshift/][2015-05-munich-rubyshift/]] +- [[file:2015-03-munich-rubyshift/][2015-03-munich-rubyshift/]] +- [[file:2014-leipzig-js/][2014-leipzig-js/]] +- [[file:2014-cologne-js/][2014-cologne-js/]] +- [[file:2012-lightning-io/][2012-lightning-io/]] +- [[file:2012-cologne.rb/][2012-cologne.rb/]] +- [[file:2012-cologne-rb-vagrant/][2012-cologne-rb-vagrant/]] +- [[file:2012-cologne-rb-faceblock/][2012-cologne-rb-faceblock/]] +- [[file:2011-pyconde/][2011-pyconde/]] + 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. @@ -20,3 +35,5 @@ bascht dot com~ and I will take it down. 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: 2016-01-13 17:25:51 +0100 diff --git a/README.org.erb b/README.org.erb new file mode 100644 index 0000000..259dd57 --- /dev/null +++ b/README.org.erb @@ -0,0 +1,27 @@ +#+HTML_HEAD: + +* 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 %> diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..cc7f1b1 --- /dev/null +++ b/Rakefile @@ -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]