Created
June 12, 2013 14:43
-
-
Save alesya-h/5765908 to your computer and use it in GitHub Desktop.
lvee abstract to latex
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
#!/usr/bin/env ruby | |
# | |
# Usage lvee2latex.rb id > out.tex | |
require "rubygems" | |
require "open-uri" | |
require "json" | |
require "redcloth" | |
if ARGV[0] == nil | |
puts "No id." | |
exit 1 | |
end | |
id=ARGV[0] | |
document = JSON.parse(open("http://lvee.org/en/abstracts/#{id}.json").read) | |
latex = RedCloth.new(document['body']).to_latex | |
$stdout.write "#{latex}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment