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:
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 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)