I am still having troubles getting my multimarkdown to Prince command to find the css file. Prince wants to look for it in the /tmp file because that is were the generated html file is. So, if my file is in: ~/scratch/book.multimarkdown, and my css is also in ~/scratch/ book.css, the multimarkdown covention is to then write in the beginning of the document:
format: complete css: book.css
If I convert the document to html and save it in ~/scratch/ then run Prince I have no troubles. However, running my script to generate an / tmp/$DST.html and then running Prince on it gets me a pdf without the stylesheet. I can specify the style sheet in Prince "prince -s ~/ scratch/book.css book.css", but that would be impractical for a script. What I would love to write is prince -s "$CSS_FILES" "$DST.html" /tmp/
Allan gave me a quick ruby script "CSS_FILES=$(ruby <"$TM_FILEPATH" - ne 'puts $1 if /<link(?=[^>]*?type="text/css")[^>]*? href="(.*?)"/')", but it does not seem to find ~/scratch/book.css (or any other css file) and use it as $CSS_FILES.
Any help appreciated.
Thanks
Robert
On May 14, 2006, at 8:40 AM, Allan Odgaard wrote:
On 12/5/2006, at 20:54, Robert M. Ullrey wrote:
[...] I can get prince to run, but not glob the css file name. My end product is a PDF of the html source file. Cutie, but not what I want.
CSS_FILES=$(ruby <"$TM_FILEPATH" -ne 'puts $1 if /<link(?=[^>]*? type="text/css")[^>]*?href="(.*?)"/')
This will give all href arguments to link tags of type text/css.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate