]> sipb.mit.edu Git - ikiwiki.git/blob - doc/forum/Export_images_when_building_the_wiki/comment_5_7e0a6336c6a6785d9cf4b6b4b124fd6d._comment
Added a comment: Plugin compile
[ikiwiki.git] / doc / forum / Export_images_when_building_the_wiki / comment_5_7e0a6336c6a6785d9cf4b6b4b124fd6d._comment
1 [[!comment format=mdwn
2  username="spalax"
3  ip="82.233.196.200"
4  subject="Plugin compile"
5  date="2014-10-04T10:37:16Z"
6  content="""
7 Hello,
8 I enventually wrote a plugin that might fit your need: [[plugins/contrib/compile]].
9
10 In setup file, you specify which command is to be applied to files. For instance, to convent `odt` files to `pdf`, you can use:
11
12     compile_filetypes = '
13         \"odt\": {
14           \"build\": \"libreoffice --headless --convert-to pdf %{srcname}s\",
15           \"destname\": \"%{basename}s.pdf\"
16         }
17       }'
18
19 Then, in your wiki pages, you can use `\[[!compile files=\"foo.odt\"]]`. This will convert file to pdf, and render as a link to the `pdf` file. If option `inline` is set, you can also simply use a wikilink `\[[foo.odt]]`, which will have the same effect.
20
21 Regards,    
22 -- [[Louis|spalax]]
23
24 """]]