forked from bhollis/maruku
-
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.
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
Showing
47 changed files
with
5,152 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
* Andrea Censi | ||
|
||
<http://www.dis.uniroma1.it/~acensi> | ||
|
||
|
||
|
||
|
||
|
||
|
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,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 |
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,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 |
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,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/ | ||
|
Oops, something went wrong.