Skip to content

Instantly share code, notes, and snippets.

@alesya-h
Created June 12, 2013 14:43
Show Gist options
  • Save alesya-h/5765908 to your computer and use it in GitHub Desktop.
Save alesya-h/5765908 to your computer and use it in GitHub Desktop.
lvee abstract to latex
#!/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