Skip to content

Commit

Permalink
Importing code into repository
Browse files Browse the repository at this point in the history
git-svn-id: svn://rubyforge.org/var/svn/maruku/trunk@2 7e2f57f0-5a75-4fd6-9797-5817c466b243
  • Loading branch information
Andrea Censi committed Dec 25, 2006
1 parent 1cebff1 commit 64f0a2a
Show file tree
Hide file tree
Showing 47 changed files with 5,152 additions and 0 deletions.
10 changes: 10 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

* Andrea Censi

<http://www.dis.uniroma1.it/~acensi>






340 changes: 340 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions bin/maruku
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env ruby

require 'maruku'

if File.basename($0) =~ /^maruku/
# Convert each file
ARGV.each do |f|
puts "Opening #{f}"

# read file content
input = File.open(f,'r').read

# create Maruku
doc = Maruku.new(input)
# convert to a complete html document
html = doc.to_html_document

# write to file
dir = File.dirname(f)
filename = File.basename(f, File.extname(f)) + ".html"

out_xml = File.join(dir, filename)
File.open(out_xml,'w') do |f| f.puts html end
end
end
29 changes: 29 additions & 0 deletions bin/marutex
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby

require 'maruku'

if File.basename($0) =~ /^marutex/
# Convert each file
ARGV.each do |f|
puts "Opening #{f}"

# read file content
input = File.open(f,'r').read

# create Maruku
doc = Maruku.new(input)
# convert to a complete html document
latex = doc.to_latex_document

# write to file
dir = File.dirname(f)
job = File.join(dir, File.basename(f, File.extname(f)))
filename = job + ".tex"

File.open(filename,'w') do |f| f.puts latex end


system "pdflatex #{job}"
# system "open #{job}.pdf"
end
end
25 changes: 25 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

out=index.html maruku.pdf maruku.html markdown_syntax.pdf
others=maruku.md style.css

all: $(out)

index.html: maruku.html
cp $< $@

%.html: %.md
ruby -I../lib ../bin/maruku $<

%.pdf: %.md
ruby -I../lib ../bin/marutex $<

clean:
-rm -f $(out)


publish: $(out) $(others)
scp $^ andrea@rubyforge.org:/var/www/gforge-projects/maruku/

publish_tests:
scp -r ../tests/*.md ../tests/*.html ../tests/*.pdf andrea@rubyforge.org:/var/www/gforge-projects/maruku/tests/

Loading

0 comments on commit 64f0a2a

Please sign in to comment.