Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Christopher Marsh
RE: Newbie advice on new file tasks [ reply ]  
2007-05-29 08:46
BTW, here's what I have so far:

directory "pdf"
file "pdf" => [:doc] do |t|
# SOMETHING HERE
end

rule '.pdf' => '.html' do |t|
sh "prince #{t.source} #{t.name}"
end


It doesn't seem to account for the directory structure, and I'm not sure how to hook it together with what is already in the Rakefile.

By: Christopher Marsh
Newbie advice on new file tasks [ reply ]  
2007-05-29 08:26
Hi. I've started experimenting with Rote for my documentation needs. I really appreciate the straightforward design and clear documentation. It makes all the difference. I used to use Userland Frontier, which uses a really interesting and powerful webpage generation model -- Rote looks like it can reproduce some of Frontier's features.

Except - I'm a bit stuck on the basics. I just need another example.

I'd like to create a task to transform my rendered html pages into pdfs, using Prince. Assuming the command is just 'prince in.html out.pdf', can someone give me a headstart with a task that will keep a pdf folder up to date with docs just like the html folder?

Any other examples of custom tasks would be very useful to see. I'm sure I can crack this, but I have no experience with Rake and am just stumbling a little at the moment.