├── Pandoc HTML.workflow └── Contents │ ├── QuickLook │ └── Preview.png │ ├── Info.plist │ └── document.wflow ├── Pandoc ConTeXt.workflow └── Contents │ ├── QuickLook │ └── Preview.png │ ├── Info.plist │ └── document.wflow ├── Pandoc LaTeX.workflow └── Contents │ ├── QuickLook │ └── Preview.png │ ├── Info.plist │ └── document.wflow ├── Pandoc LaTeX PDF.workflow └── Contents │ ├── QuickLook │ └── Preview.png │ ├── Info.plist │ └── document.wflow ├── Pandoc ConTeXt PDF.workflow └── Contents │ ├── QuickLook │ └── Preview.png │ ├── Info.plist │ └── document.wflow ├── Pandoc HTML MathJax.workflow └── Contents │ ├── QuickLook │ └── Preview.png │ ├── Info.plist │ └── document.wflow ├── Pandoc LaTeX PDF with Template.workflow └── Contents │ ├── QuickLook │ └── Preview.png │ ├── Info.plist │ └── document.wflow ├── Pandoc ConTeXt PDF with Template.workflow └── Contents │ ├── QuickLook │ └── Preview.png │ ├── Info.plist │ └── document.wflow ├── Pandoc selection to HTML clipboard.workflow └── Contents │ ├── QuickLook │ └── Thumbnail.png │ ├── Info.plist │ └── document.wflow └── README.md /Pandoc HTML.workflow/Contents/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mb21/Pandoc-Mac-OS-X-Services/HEAD/Pandoc HTML.workflow/Contents/QuickLook/Preview.png -------------------------------------------------------------------------------- /Pandoc ConTeXt.workflow/Contents/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mb21/Pandoc-Mac-OS-X-Services/HEAD/Pandoc ConTeXt.workflow/Contents/QuickLook/Preview.png -------------------------------------------------------------------------------- /Pandoc LaTeX.workflow/Contents/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mb21/Pandoc-Mac-OS-X-Services/HEAD/Pandoc LaTeX.workflow/Contents/QuickLook/Preview.png -------------------------------------------------------------------------------- /Pandoc LaTeX PDF.workflow/Contents/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mb21/Pandoc-Mac-OS-X-Services/HEAD/Pandoc LaTeX PDF.workflow/Contents/QuickLook/Preview.png -------------------------------------------------------------------------------- /Pandoc ConTeXt PDF.workflow/Contents/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mb21/Pandoc-Mac-OS-X-Services/HEAD/Pandoc ConTeXt PDF.workflow/Contents/QuickLook/Preview.png -------------------------------------------------------------------------------- /Pandoc HTML MathJax.workflow/Contents/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mb21/Pandoc-Mac-OS-X-Services/HEAD/Pandoc HTML MathJax.workflow/Contents/QuickLook/Preview.png -------------------------------------------------------------------------------- /Pandoc LaTeX PDF with Template.workflow/Contents/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mb21/Pandoc-Mac-OS-X-Services/HEAD/Pandoc LaTeX PDF with Template.workflow/Contents/QuickLook/Preview.png -------------------------------------------------------------------------------- /Pandoc ConTeXt PDF with Template.workflow/Contents/QuickLook/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mb21/Pandoc-Mac-OS-X-Services/HEAD/Pandoc ConTeXt PDF with Template.workflow/Contents/QuickLook/Preview.png -------------------------------------------------------------------------------- /Pandoc selection to HTML clipboard.workflow/Contents/QuickLook/Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mb21/Pandoc-Mac-OS-X-Services/HEAD/Pandoc selection to HTML clipboard.workflow/Contents/QuickLook/Thumbnail.png -------------------------------------------------------------------------------- /Pandoc HTML.workflow/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSServices 6 | 7 | 8 | NSMenuItem 9 | 10 | default 11 | Pandoc HTML 12 | 13 | NSMessage 14 | runWorkflowAsService 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Pandoc ConTeXt.workflow/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSServices 6 | 7 | 8 | NSMenuItem 9 | 10 | default 11 | Pandoc ConTeXt 12 | 13 | NSMessage 14 | runWorkflowAsService 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Pandoc LaTeX.workflow/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSServices 6 | 7 | 8 | NSMenuItem 9 | 10 | default 11 | Pandoc LaTeX 12 | 13 | NSMessage 14 | runWorkflowAsService 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Pandoc LaTeX PDF.workflow/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSServices 6 | 7 | 8 | NSMenuItem 9 | 10 | default 11 | Pandoc LaTeX PDF 12 | 13 | NSMessage 14 | runWorkflowAsService 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Pandoc ConTeXt PDF.workflow/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSServices 6 | 7 | 8 | NSMenuItem 9 | 10 | default 11 | Pandoc ConTeXt PDF 12 | 13 | NSMessage 14 | runWorkflowAsService 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Pandoc HTML MathJax.workflow/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSServices 6 | 7 | 8 | NSMenuItem 9 | 10 | default 11 | Pandoc HTML MathJax 12 | 13 | NSMessage 14 | runWorkflowAsService 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Pandoc LaTeX PDF with Template.workflow/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSServices 6 | 7 | 8 | NSMenuItem 9 | 10 | default 11 | Pandoc LaTeX PDF with Template 12 | 13 | NSMessage 14 | runWorkflowAsService 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Pandoc ConTeXt PDF with Template.workflow/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSServices 6 | 7 | 8 | NSMenuItem 9 | 10 | default 11 | Pandoc ConTeXt PDF with Template 12 | 13 | NSMessage 14 | runWorkflowAsService 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Pandoc selection to HTML clipboard.workflow/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSServices 6 | 7 | 8 | NSMenuItem 9 | 10 | default 11 | Pandoc HTML selection to clipboard 12 | 13 | NSMessage 14 | runWorkflowAsService 15 | NSSendTypes 16 | 17 | public.utf8-plain-text 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pandoc Mac OS X Services 2 | 3 | Invoke [pandoc](http://johnmacfarlane.net/pandoc/) from any text editor with the opened file as input. 4 | 5 | This is achieved using [Mac OS X services](http://arstechnica.com/apple/2011/03/howto-build-mac-os-x-services-with-automator-and-shell-scripting/). 6 | 7 | 8 | ## Go! 9 | 10 | 1. Copy the files to your `~/Library/Services` folder 11 | 2. Restart your editor, open and save a file containing some [markdown](http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown) 12 | 3. Go to the `Services` menu (for example if you're using Sublime: `Sublime > Services`) and choose a service like `Pandoc PDF`. 13 | 4. After a few seconds, the PDF file will appear in the same folder as your markdown file 14 | 5. Finally, you can assign a keyboard shortcut to invoke a service in `System Preferences > Keyboard > Keyboard Shortcuts > Services (on the left)`. 15 | 16 | 17 | ## Templates 18 | 19 | `Pandoc PDF with Template` and `Pandoc ConTeXt PDF with Template` look for a `template.tex` or `contextTemplate.tex` file respectively in the same directory as the input file. 20 | 21 | To get a copy of the default [pandoc template](http://johnmacfarlane.net/pandoc/README.html#templates) to customize, use `pandoc -D latex > template.tex` or `pandoc -D context > contextTemplate.tex` respectively. -------------------------------------------------------------------------------- /Pandoc selection to HTML clipboard.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 381 7 | AMApplicationVersion 8 | 2.4 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.cocoa.string 25 | 26 | 27 | AMActionVersion 28 | 2.0.3 29 | AMApplication 30 | 31 | Automator 32 | 33 | AMParameterProperties 34 | 35 | COMMAND_STRING 36 | 37 | CheckedForUserDefaultShell 38 | 39 | inputMethod 40 | 41 | shell 42 | 43 | source 44 | 45 | 46 | AMProvides 47 | 48 | Container 49 | List 50 | Types 51 | 52 | com.apple.cocoa.string 53 | 54 | 55 | ActionBundlePath 56 | /System/Library/Automator/Run Shell Script.action 57 | ActionName 58 | Run Shell Script 59 | ActionParameters 60 | 61 | COMMAND_STRING 62 | #!/bin/bash 63 | export LC_CTYPE=UTF-8 64 | /usr/local/bin/pandoc -t html5 | pbcopy 65 | CheckedForUserDefaultShell 66 | 67 | inputMethod 68 | 0 69 | shell 70 | /bin/bash 71 | source 72 | 73 | 74 | BundleIdentifier 75 | com.apple.RunShellScript 76 | CFBundleVersion 77 | 2.0.3 78 | CanShowSelectedItemsWhenRun 79 | 80 | CanShowWhenRun 81 | 82 | Category 83 | 84 | AMCategoryUtilities 85 | 86 | Class Name 87 | RunShellScriptAction 88 | InputUUID 89 | 20F8F47A-7A69-4825-846D-95E450C47976 90 | Keywords 91 | 92 | Shell 93 | Script 94 | Command 95 | Run 96 | Unix 97 | 98 | OutputUUID 99 | 9C8F360F-E095-46EE-B54D-3A3A4478AFF0 100 | ShowWhenRun 101 | 102 | UUID 103 | 6EBA3A23-739B-4522-AF92-377C2DC09263 104 | UnlocalizedApplications 105 | 106 | Automator 107 | 108 | arguments 109 | 110 | 0 111 | 112 | default value 113 | 0 114 | name 115 | inputMethod 116 | required 117 | 0 118 | type 119 | 0 120 | uuid 121 | 0 122 | 123 | 1 124 | 125 | default value 126 | 127 | name 128 | source 129 | required 130 | 0 131 | type 132 | 0 133 | uuid 134 | 1 135 | 136 | 2 137 | 138 | default value 139 | 140 | name 141 | CheckedForUserDefaultShell 142 | required 143 | 0 144 | type 145 | 0 146 | uuid 147 | 2 148 | 149 | 3 150 | 151 | default value 152 | 153 | name 154 | COMMAND_STRING 155 | required 156 | 0 157 | type 158 | 0 159 | uuid 160 | 3 161 | 162 | 4 163 | 164 | default value 165 | /bin/sh 166 | name 167 | shell 168 | required 169 | 0 170 | type 171 | 0 172 | uuid 173 | 4 174 | 175 | 176 | isViewVisible 177 | 178 | location 179 | 404.500000:789.000000 180 | nibPath 181 | /System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib 182 | 183 | isViewVisible 184 | 185 | 186 | 187 | connectors 188 | 189 | workflowMetaData 190 | 191 | serviceInputTypeIdentifier 192 | com.apple.Automator.text 193 | serviceOutputTypeIdentifier 194 | com.apple.Automator.nothing 195 | serviceProcessesInput 196 | 0 197 | workflowTypeIdentifier 198 | com.apple.Automator.servicesMenu 199 | 200 | 201 | 202 | -------------------------------------------------------------------------------- /Pandoc LaTeX.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 417 7 | AMApplicationVersion 8 | 2.6 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.applescript.object 25 | 26 | 27 | AMActionVersion 28 | 1.0.2 29 | AMApplication 30 | 31 | Automator 32 | 33 | AMParameterProperties 34 | 35 | source 36 | 37 | 38 | AMProvides 39 | 40 | Container 41 | List 42 | Types 43 | 44 | com.apple.applescript.object 45 | 46 | 47 | ActionBundlePath 48 | /System/Library/Automator/Run AppleScript.action 49 | ActionName 50 | Run AppleScript 51 | ActionParameters 52 | 53 | source 54 | on run {input, parameters} tell application "System Events" set theAppName to name of the first process whose frontmost is true end tell tell application "System Events" keystroke "s" using command down --save file tell process theAppName set theFilePath to the value of attribute "AXDocument" of window 1 set textencoded to do shell script "php -r 'echo substr(trim(urldecode(" & "\"" & theFilePath & "" & "\")), 7);'" return textencoded end tell end tell return theFilePath end run 55 | 56 | BundleIdentifier 57 | com.apple.Automator.RunScript 58 | CFBundleVersion 59 | 1.0.2 60 | CanShowSelectedItemsWhenRun 61 | 62 | CanShowWhenRun 63 | 64 | Category 65 | 66 | AMCategoryUtilities 67 | 68 | Class Name 69 | RunScriptAction 70 | InputUUID 71 | EBE9653F-9D9A-49D4-8A71-BD3D19D942D2 72 | Keywords 73 | 74 | Run 75 | 76 | OutputUUID 77 | 56D8A2F3-BA2D-4371-BE18-D9E6E0677FC2 78 | ShowWhenRun 79 | 80 | UUID 81 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 82 | UnlocalizedApplications 83 | 84 | Automator 85 | 86 | arguments 87 | 88 | 0 89 | 90 | default value 91 | on run {input, parameters} 92 | 93 | (* Your script goes here *) 94 | 95 | return input 96 | end run 97 | name 98 | source 99 | required 100 | 0 101 | type 102 | 0 103 | uuid 104 | 0 105 | 106 | 107 | isViewVisible 108 | 109 | location 110 | 338.500000:316.000000 111 | nibPath 112 | /System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib 113 | 114 | isViewVisible 115 | 116 | 117 | 118 | action 119 | 120 | AMAccepts 121 | 122 | Container 123 | List 124 | Optional 125 | 126 | Types 127 | 128 | com.apple.cocoa.string 129 | 130 | 131 | AMActionVersion 132 | 2.0.3 133 | AMApplication 134 | 135 | Automator 136 | 137 | AMParameterProperties 138 | 139 | COMMAND_STRING 140 | 141 | CheckedForUserDefaultShell 142 | 143 | inputMethod 144 | 145 | shell 146 | 147 | source 148 | 149 | 150 | AMProvides 151 | 152 | Container 153 | List 154 | Types 155 | 156 | com.apple.cocoa.string 157 | 158 | 159 | ActionBundlePath 160 | /System/Library/Automator/Run Shell Script.action 161 | ActionName 162 | Run Shell Script 163 | ActionParameters 164 | 165 | COMMAND_STRING 166 | #!/bin/bash 167 | cd "$( dirname "$1" )" 168 | filename=$(basename "$1") 169 | /usr/local/bin/pandoc "$filename" --standalone -o "$filename.tex" 170 | CheckedForUserDefaultShell 171 | 172 | inputMethod 173 | 1 174 | shell 175 | /bin/bash 176 | source 177 | 178 | 179 | BundleIdentifier 180 | com.apple.RunShellScript 181 | CFBundleVersion 182 | 2.0.3 183 | CanShowSelectedItemsWhenRun 184 | 185 | CanShowWhenRun 186 | 187 | Category 188 | 189 | AMCategoryUtilities 190 | 191 | Class Name 192 | RunShellScriptAction 193 | InputUUID 194 | 20F8F47A-7A69-4825-846D-95E450C47976 195 | Keywords 196 | 197 | Shell 198 | Script 199 | Command 200 | Run 201 | Unix 202 | 203 | OutputUUID 204 | 9C8F360F-E095-46EE-B54D-3A3A4478AFF0 205 | ShowWhenRun 206 | 207 | UUID 208 | 6EBA3A23-739B-4522-AF92-377C2DC09263 209 | UnlocalizedApplications 210 | 211 | Automator 212 | 213 | arguments 214 | 215 | 0 216 | 217 | default value 218 | 0 219 | name 220 | inputMethod 221 | required 222 | 0 223 | type 224 | 0 225 | uuid 226 | 0 227 | 228 | 1 229 | 230 | default value 231 | 232 | name 233 | source 234 | required 235 | 0 236 | type 237 | 0 238 | uuid 239 | 1 240 | 241 | 2 242 | 243 | default value 244 | 245 | name 246 | CheckedForUserDefaultShell 247 | required 248 | 0 249 | type 250 | 0 251 | uuid 252 | 2 253 | 254 | 3 255 | 256 | default value 257 | 258 | name 259 | COMMAND_STRING 260 | required 261 | 0 262 | type 263 | 0 264 | uuid 265 | 3 266 | 267 | 4 268 | 269 | default value 270 | /bin/sh 271 | name 272 | shell 273 | required 274 | 0 275 | type 276 | 0 277 | uuid 278 | 4 279 | 280 | 281 | isViewVisible 282 | 283 | location 284 | 338.500000:499.000000 285 | nibPath 286 | /System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib 287 | 288 | isViewVisible 289 | 290 | 291 | 292 | connectors 293 | 294 | 7D46A7BA-E278-4251-89DA-76ED962419E4 295 | 296 | from 297 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 - 7BAF485E-44A5-4384-9219-1A953A5CD0D1 298 | to 299 | 6EBA3A23-739B-4522-AF92-377C2DC09263 - 6EBA3A23-739B-4522-AF92-377C2DC09263 300 | 301 | 302 | workflowMetaData 303 | 304 | serviceInputTypeIdentifier 305 | com.apple.Automator.nothing 306 | serviceOutputTypeIdentifier 307 | com.apple.Automator.nothing 308 | serviceProcessesInput 309 | 0 310 | workflowTypeIdentifier 311 | com.apple.Automator.servicesMenu 312 | 313 | 314 | 315 | -------------------------------------------------------------------------------- /Pandoc ConTeXt.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 417 7 | AMApplicationVersion 8 | 2.6 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.applescript.object 25 | 26 | 27 | AMActionVersion 28 | 1.0.2 29 | AMApplication 30 | 31 | Automator 32 | 33 | AMParameterProperties 34 | 35 | source 36 | 37 | 38 | AMProvides 39 | 40 | Container 41 | List 42 | Types 43 | 44 | com.apple.applescript.object 45 | 46 | 47 | ActionBundlePath 48 | /System/Library/Automator/Run AppleScript.action 49 | ActionName 50 | Run AppleScript 51 | ActionParameters 52 | 53 | source 54 | on run {input, parameters} tell application "System Events" set theAppName to name of the first process whose frontmost is true end tell tell application "System Events" keystroke "s" using command down --save file tell process theAppName set theFilePath to the value of attribute "AXDocument" of window 1 set textencoded to do shell script "php -r 'echo substr(trim(urldecode(" & "\"" & theFilePath & "" & "\")), 7);'" return textencoded end tell end tell return theFilePath end run 55 | 56 | BundleIdentifier 57 | com.apple.Automator.RunScript 58 | CFBundleVersion 59 | 1.0.2 60 | CanShowSelectedItemsWhenRun 61 | 62 | CanShowWhenRun 63 | 64 | Category 65 | 66 | AMCategoryUtilities 67 | 68 | Class Name 69 | RunScriptAction 70 | InputUUID 71 | EBE9653F-9D9A-49D4-8A71-BD3D19D942D2 72 | Keywords 73 | 74 | Run 75 | 76 | OutputUUID 77 | 56D8A2F3-BA2D-4371-BE18-D9E6E0677FC2 78 | ShowWhenRun 79 | 80 | UUID 81 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 82 | UnlocalizedApplications 83 | 84 | Automator 85 | 86 | arguments 87 | 88 | 0 89 | 90 | default value 91 | on run {input, parameters} 92 | 93 | (* Your script goes here *) 94 | 95 | return input 96 | end run 97 | name 98 | source 99 | required 100 | 0 101 | type 102 | 0 103 | uuid 104 | 0 105 | 106 | 107 | isViewVisible 108 | 109 | location 110 | 338.500000:316.000000 111 | nibPath 112 | /System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib 113 | 114 | isViewVisible 115 | 116 | 117 | 118 | action 119 | 120 | AMAccepts 121 | 122 | Container 123 | List 124 | Optional 125 | 126 | Types 127 | 128 | com.apple.cocoa.string 129 | 130 | 131 | AMActionVersion 132 | 2.0.3 133 | AMApplication 134 | 135 | Automator 136 | 137 | AMParameterProperties 138 | 139 | COMMAND_STRING 140 | 141 | CheckedForUserDefaultShell 142 | 143 | inputMethod 144 | 145 | shell 146 | 147 | source 148 | 149 | 150 | AMProvides 151 | 152 | Container 153 | List 154 | Types 155 | 156 | com.apple.cocoa.string 157 | 158 | 159 | ActionBundlePath 160 | /System/Library/Automator/Run Shell Script.action 161 | ActionName 162 | Run Shell Script 163 | ActionParameters 164 | 165 | COMMAND_STRING 166 | #!/bin/bash 167 | cd "$( dirname "$1" )" 168 | filename=$(basename "$1") 169 | /usr/local/bin/pandoc --standalone -t context "$filename" -o "$filename.tex" 170 | CheckedForUserDefaultShell 171 | 172 | inputMethod 173 | 1 174 | shell 175 | /bin/bash 176 | source 177 | 178 | 179 | BundleIdentifier 180 | com.apple.RunShellScript 181 | CFBundleVersion 182 | 2.0.3 183 | CanShowSelectedItemsWhenRun 184 | 185 | CanShowWhenRun 186 | 187 | Category 188 | 189 | AMCategoryUtilities 190 | 191 | Class Name 192 | RunShellScriptAction 193 | InputUUID 194 | 20F8F47A-7A69-4825-846D-95E450C47976 195 | Keywords 196 | 197 | Shell 198 | Script 199 | Command 200 | Run 201 | Unix 202 | 203 | OutputUUID 204 | 9C8F360F-E095-46EE-B54D-3A3A4478AFF0 205 | ShowWhenRun 206 | 207 | UUID 208 | 6EBA3A23-739B-4522-AF92-377C2DC09263 209 | UnlocalizedApplications 210 | 211 | Automator 212 | 213 | arguments 214 | 215 | 0 216 | 217 | default value 218 | 0 219 | name 220 | inputMethod 221 | required 222 | 0 223 | type 224 | 0 225 | uuid 226 | 0 227 | 228 | 1 229 | 230 | default value 231 | 232 | name 233 | source 234 | required 235 | 0 236 | type 237 | 0 238 | uuid 239 | 1 240 | 241 | 2 242 | 243 | default value 244 | 245 | name 246 | CheckedForUserDefaultShell 247 | required 248 | 0 249 | type 250 | 0 251 | uuid 252 | 2 253 | 254 | 3 255 | 256 | default value 257 | 258 | name 259 | COMMAND_STRING 260 | required 261 | 0 262 | type 263 | 0 264 | uuid 265 | 3 266 | 267 | 4 268 | 269 | default value 270 | /bin/sh 271 | name 272 | shell 273 | required 274 | 0 275 | type 276 | 0 277 | uuid 278 | 4 279 | 280 | 281 | isViewVisible 282 | 283 | location 284 | 338.500000:499.000000 285 | nibPath 286 | /System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib 287 | 288 | isViewVisible 289 | 290 | 291 | 292 | connectors 293 | 294 | 13F43F86-79E4-4090-8F98-7AFBCA4CBBB9 295 | 296 | from 297 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 - 7BAF485E-44A5-4384-9219-1A953A5CD0D1 298 | to 299 | 6EBA3A23-739B-4522-AF92-377C2DC09263 - 6EBA3A23-739B-4522-AF92-377C2DC09263 300 | 301 | 302 | workflowMetaData 303 | 304 | serviceInputTypeIdentifier 305 | com.apple.Automator.nothing 306 | serviceOutputTypeIdentifier 307 | com.apple.Automator.nothing 308 | serviceProcessesInput 309 | 0 310 | workflowTypeIdentifier 311 | com.apple.Automator.servicesMenu 312 | 313 | 314 | 315 | -------------------------------------------------------------------------------- /Pandoc HTML MathJax.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 417 7 | AMApplicationVersion 8 | 2.6 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.applescript.object 25 | 26 | 27 | AMActionVersion 28 | 1.0.2 29 | AMApplication 30 | 31 | Automator 32 | 33 | AMParameterProperties 34 | 35 | source 36 | 37 | 38 | AMProvides 39 | 40 | Container 41 | List 42 | Types 43 | 44 | com.apple.applescript.object 45 | 46 | 47 | ActionBundlePath 48 | /System/Library/Automator/Run AppleScript.action 49 | ActionName 50 | Run AppleScript 51 | ActionParameters 52 | 53 | source 54 | on run {input, parameters} tell application "System Events" set theAppName to name of the first process whose frontmost is true end tell tell application "System Events" keystroke "s" using command down --save file tell process theAppName set theFilePath to the value of attribute "AXDocument" of window 1 set textencoded to do shell script "php -r 'echo substr(trim(urldecode(" & "\"" & theFilePath & "" & "\")), 7);'" return textencoded end tell end tell return theFilePath end run 55 | 56 | BundleIdentifier 57 | com.apple.Automator.RunScript 58 | CFBundleVersion 59 | 1.0.2 60 | CanShowSelectedItemsWhenRun 61 | 62 | CanShowWhenRun 63 | 64 | Category 65 | 66 | AMCategoryUtilities 67 | 68 | Class Name 69 | RunScriptAction 70 | InputUUID 71 | EBE9653F-9D9A-49D4-8A71-BD3D19D942D2 72 | Keywords 73 | 74 | Run 75 | 76 | OutputUUID 77 | 56D8A2F3-BA2D-4371-BE18-D9E6E0677FC2 78 | ShowWhenRun 79 | 80 | UUID 81 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 82 | UnlocalizedApplications 83 | 84 | Automator 85 | 86 | arguments 87 | 88 | 0 89 | 90 | default value 91 | on run {input, parameters} 92 | 93 | (* Your script goes here *) 94 | 95 | return input 96 | end run 97 | name 98 | source 99 | required 100 | 0 101 | type 102 | 0 103 | uuid 104 | 0 105 | 106 | 107 | isViewVisible 108 | 109 | location 110 | 338.500000:316.000000 111 | nibPath 112 | /System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib 113 | 114 | isViewVisible 115 | 116 | 117 | 118 | action 119 | 120 | AMAccepts 121 | 122 | Container 123 | List 124 | Optional 125 | 126 | Types 127 | 128 | com.apple.cocoa.string 129 | 130 | 131 | AMActionVersion 132 | 2.0.3 133 | AMApplication 134 | 135 | Automator 136 | 137 | AMParameterProperties 138 | 139 | COMMAND_STRING 140 | 141 | CheckedForUserDefaultShell 142 | 143 | inputMethod 144 | 145 | shell 146 | 147 | source 148 | 149 | 150 | AMProvides 151 | 152 | Container 153 | List 154 | Types 155 | 156 | com.apple.cocoa.string 157 | 158 | 159 | ActionBundlePath 160 | /System/Library/Automator/Run Shell Script.action 161 | ActionName 162 | Run Shell Script 163 | ActionParameters 164 | 165 | COMMAND_STRING 166 | #!/bin/bash 167 | cd "$( dirname "$1" )" 168 | filename=$(basename "$1") 169 | export PATH=/usr/texbin:$PATH 170 | /usr/local/bin/pandoc "$filename" -t html5 -s --mathjax -o "$filename.html" 171 | CheckedForUserDefaultShell 172 | 173 | inputMethod 174 | 1 175 | shell 176 | /bin/bash 177 | source 178 | 179 | 180 | BundleIdentifier 181 | com.apple.RunShellScript 182 | CFBundleVersion 183 | 2.0.3 184 | CanShowSelectedItemsWhenRun 185 | 186 | CanShowWhenRun 187 | 188 | Category 189 | 190 | AMCategoryUtilities 191 | 192 | Class Name 193 | RunShellScriptAction 194 | InputUUID 195 | 20F8F47A-7A69-4825-846D-95E450C47976 196 | Keywords 197 | 198 | Shell 199 | Script 200 | Command 201 | Run 202 | Unix 203 | 204 | OutputUUID 205 | 9C8F360F-E095-46EE-B54D-3A3A4478AFF0 206 | ShowWhenRun 207 | 208 | UUID 209 | 6EBA3A23-739B-4522-AF92-377C2DC09263 210 | UnlocalizedApplications 211 | 212 | Automator 213 | 214 | arguments 215 | 216 | 0 217 | 218 | default value 219 | 0 220 | name 221 | inputMethod 222 | required 223 | 0 224 | type 225 | 0 226 | uuid 227 | 0 228 | 229 | 1 230 | 231 | default value 232 | 233 | name 234 | source 235 | required 236 | 0 237 | type 238 | 0 239 | uuid 240 | 1 241 | 242 | 2 243 | 244 | default value 245 | 246 | name 247 | CheckedForUserDefaultShell 248 | required 249 | 0 250 | type 251 | 0 252 | uuid 253 | 2 254 | 255 | 3 256 | 257 | default value 258 | 259 | name 260 | COMMAND_STRING 261 | required 262 | 0 263 | type 264 | 0 265 | uuid 266 | 3 267 | 268 | 4 269 | 270 | default value 271 | /bin/sh 272 | name 273 | shell 274 | required 275 | 0 276 | type 277 | 0 278 | uuid 279 | 4 280 | 281 | 282 | isViewVisible 283 | 284 | location 285 | 338.500000:499.000000 286 | nibPath 287 | /System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib 288 | 289 | isViewVisible 290 | 291 | 292 | 293 | connectors 294 | 295 | 78402B59-74F0-4DF5-9BD6-72921966DC57 296 | 297 | from 298 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 - 7BAF485E-44A5-4384-9219-1A953A5CD0D1 299 | to 300 | 6EBA3A23-739B-4522-AF92-377C2DC09263 - 6EBA3A23-739B-4522-AF92-377C2DC09263 301 | 302 | 303 | workflowMetaData 304 | 305 | serviceInputTypeIdentifier 306 | com.apple.Automator.nothing 307 | serviceOutputTypeIdentifier 308 | com.apple.Automator.nothing 309 | serviceProcessesInput 310 | 0 311 | workflowTypeIdentifier 312 | com.apple.Automator.servicesMenu 313 | 314 | 315 | 316 | -------------------------------------------------------------------------------- /Pandoc LaTeX PDF.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 417 7 | AMApplicationVersion 8 | 2.6 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.applescript.object 25 | 26 | 27 | AMActionVersion 28 | 1.0.2 29 | AMApplication 30 | 31 | Automator 32 | 33 | AMParameterProperties 34 | 35 | source 36 | 37 | 38 | AMProvides 39 | 40 | Container 41 | List 42 | Types 43 | 44 | com.apple.applescript.object 45 | 46 | 47 | ActionBundlePath 48 | /System/Library/Automator/Run AppleScript.action 49 | ActionName 50 | Run AppleScript 51 | ActionParameters 52 | 53 | source 54 | on run {input, parameters} tell application "System Events" set theAppName to name of the first process whose frontmost is true end tell tell application "System Events" keystroke "s" using command down --save file tell process theAppName set theFilePath to the value of attribute "AXDocument" of window 1 set textencoded to do shell script "php -r 'echo substr(trim(urldecode(" & "\"" & theFilePath & "" & "\")), 7);'" return textencoded end tell end tell return theFilePath end run 55 | 56 | BundleIdentifier 57 | com.apple.Automator.RunScript 58 | CFBundleVersion 59 | 1.0.2 60 | CanShowSelectedItemsWhenRun 61 | 62 | CanShowWhenRun 63 | 64 | Category 65 | 66 | AMCategoryUtilities 67 | 68 | Class Name 69 | RunScriptAction 70 | InputUUID 71 | EBE9653F-9D9A-49D4-8A71-BD3D19D942D2 72 | Keywords 73 | 74 | Run 75 | 76 | OutputUUID 77 | 56D8A2F3-BA2D-4371-BE18-D9E6E0677FC2 78 | ShowWhenRun 79 | 80 | UUID 81 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 82 | UnlocalizedApplications 83 | 84 | Automator 85 | 86 | arguments 87 | 88 | 0 89 | 90 | default value 91 | on run {input, parameters} 92 | 93 | (* Your script goes here *) 94 | 95 | return input 96 | end run 97 | name 98 | source 99 | required 100 | 0 101 | type 102 | 0 103 | uuid 104 | 0 105 | 106 | 107 | isViewVisible 108 | 109 | location 110 | 338.500000:316.000000 111 | nibPath 112 | /System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib 113 | 114 | isViewVisible 115 | 116 | 117 | 118 | action 119 | 120 | AMAccepts 121 | 122 | Container 123 | List 124 | Optional 125 | 126 | Types 127 | 128 | com.apple.cocoa.string 129 | 130 | 131 | AMActionVersion 132 | 2.0.3 133 | AMApplication 134 | 135 | Automator 136 | 137 | AMParameterProperties 138 | 139 | COMMAND_STRING 140 | 141 | CheckedForUserDefaultShell 142 | 143 | inputMethod 144 | 145 | shell 146 | 147 | source 148 | 149 | 150 | AMProvides 151 | 152 | Container 153 | List 154 | Types 155 | 156 | com.apple.cocoa.string 157 | 158 | 159 | ActionBundlePath 160 | /System/Library/Automator/Run Shell Script.action 161 | ActionName 162 | Run Shell Script 163 | ActionParameters 164 | 165 | COMMAND_STRING 166 | #!/bin/bash 167 | cd "$( dirname "$1" )" 168 | filename=$(basename "$1") 169 | export PATH=/Library/TeX/Distributions/Programs/texbin:$PATH 170 | /usr/local/bin/pandoc "$filename" -o "$filename.pdf" 171 | CheckedForUserDefaultShell 172 | 173 | inputMethod 174 | 1 175 | shell 176 | /bin/bash 177 | source 178 | 179 | 180 | BundleIdentifier 181 | com.apple.RunShellScript 182 | CFBundleVersion 183 | 2.0.3 184 | CanShowSelectedItemsWhenRun 185 | 186 | CanShowWhenRun 187 | 188 | Category 189 | 190 | AMCategoryUtilities 191 | 192 | Class Name 193 | RunShellScriptAction 194 | InputUUID 195 | 20F8F47A-7A69-4825-846D-95E450C47976 196 | Keywords 197 | 198 | Shell 199 | Script 200 | Command 201 | Run 202 | Unix 203 | 204 | OutputUUID 205 | 9C8F360F-E095-46EE-B54D-3A3A4478AFF0 206 | ShowWhenRun 207 | 208 | UUID 209 | 6EBA3A23-739B-4522-AF92-377C2DC09263 210 | UnlocalizedApplications 211 | 212 | Automator 213 | 214 | arguments 215 | 216 | 0 217 | 218 | default value 219 | 0 220 | name 221 | inputMethod 222 | required 223 | 0 224 | type 225 | 0 226 | uuid 227 | 0 228 | 229 | 1 230 | 231 | default value 232 | 233 | name 234 | source 235 | required 236 | 0 237 | type 238 | 0 239 | uuid 240 | 1 241 | 242 | 2 243 | 244 | default value 245 | 246 | name 247 | CheckedForUserDefaultShell 248 | required 249 | 0 250 | type 251 | 0 252 | uuid 253 | 2 254 | 255 | 3 256 | 257 | default value 258 | 259 | name 260 | COMMAND_STRING 261 | required 262 | 0 263 | type 264 | 0 265 | uuid 266 | 3 267 | 268 | 4 269 | 270 | default value 271 | /bin/sh 272 | name 273 | shell 274 | required 275 | 0 276 | type 277 | 0 278 | uuid 279 | 4 280 | 281 | 282 | isViewVisible 283 | 284 | location 285 | 338.500000:499.000000 286 | nibPath 287 | /System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib 288 | 289 | isViewVisible 290 | 291 | 292 | 293 | connectors 294 | 295 | D81DBB0D-0083-4A0F-87B4-93B7F746DB6A 296 | 297 | from 298 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 - 7BAF485E-44A5-4384-9219-1A953A5CD0D1 299 | to 300 | 6EBA3A23-739B-4522-AF92-377C2DC09263 - 6EBA3A23-739B-4522-AF92-377C2DC09263 301 | 302 | 303 | workflowMetaData 304 | 305 | serviceInputTypeIdentifier 306 | com.apple.Automator.nothing 307 | serviceOutputTypeIdentifier 308 | com.apple.Automator.nothing 309 | serviceProcessesInput 310 | 0 311 | workflowTypeIdentifier 312 | com.apple.Automator.servicesMenu 313 | 314 | 315 | 316 | -------------------------------------------------------------------------------- /Pandoc ConTeXt PDF.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 417 7 | AMApplicationVersion 8 | 2.6 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.applescript.object 25 | 26 | 27 | AMActionVersion 28 | 1.0.2 29 | AMApplication 30 | 31 | Automator 32 | 33 | AMParameterProperties 34 | 35 | source 36 | 37 | 38 | AMProvides 39 | 40 | Container 41 | List 42 | Types 43 | 44 | com.apple.applescript.object 45 | 46 | 47 | ActionBundlePath 48 | /System/Library/Automator/Run AppleScript.action 49 | ActionName 50 | Run AppleScript 51 | ActionParameters 52 | 53 | source 54 | on run {input, parameters} tell application "System Events" set theAppName to name of the first process whose frontmost is true end tell tell application "System Events" keystroke "s" using command down --save file tell process theAppName set theFilePath to the value of attribute "AXDocument" of window 1 set textencoded to do shell script "php -r 'echo substr(trim(urldecode(" & "\"" & theFilePath & "" & "\")), 7);'" return textencoded end tell end tell return theFilePath end run 55 | 56 | BundleIdentifier 57 | com.apple.Automator.RunScript 58 | CFBundleVersion 59 | 1.0.2 60 | CanShowSelectedItemsWhenRun 61 | 62 | CanShowWhenRun 63 | 64 | Category 65 | 66 | AMCategoryUtilities 67 | 68 | Class Name 69 | RunScriptAction 70 | InputUUID 71 | EBE9653F-9D9A-49D4-8A71-BD3D19D942D2 72 | Keywords 73 | 74 | Run 75 | 76 | OutputUUID 77 | 56D8A2F3-BA2D-4371-BE18-D9E6E0677FC2 78 | ShowWhenRun 79 | 80 | UUID 81 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 82 | UnlocalizedApplications 83 | 84 | Automator 85 | 86 | arguments 87 | 88 | 0 89 | 90 | default value 91 | on run {input, parameters} 92 | 93 | (* Your script goes here *) 94 | 95 | return input 96 | end run 97 | name 98 | source 99 | required 100 | 0 101 | type 102 | 0 103 | uuid 104 | 0 105 | 106 | 107 | isViewVisible 108 | 109 | location 110 | 338.500000:316.000000 111 | nibPath 112 | /System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib 113 | 114 | isViewVisible 115 | 116 | 117 | 118 | action 119 | 120 | AMAccepts 121 | 122 | Container 123 | List 124 | Optional 125 | 126 | Types 127 | 128 | com.apple.cocoa.string 129 | 130 | 131 | AMActionVersion 132 | 2.0.3 133 | AMApplication 134 | 135 | Automator 136 | 137 | AMParameterProperties 138 | 139 | COMMAND_STRING 140 | 141 | CheckedForUserDefaultShell 142 | 143 | inputMethod 144 | 145 | shell 146 | 147 | source 148 | 149 | 150 | AMProvides 151 | 152 | Container 153 | List 154 | Types 155 | 156 | com.apple.cocoa.string 157 | 158 | 159 | ActionBundlePath 160 | /System/Library/Automator/Run Shell Script.action 161 | ActionName 162 | Run Shell Script 163 | ActionParameters 164 | 165 | COMMAND_STRING 166 | #!/bin/bash 167 | cd "$( dirname "$1" )" 168 | filename=$(basename "$1") 169 | export PATH=/Library/TeX/Distributions/Programs/texbin:$PATH 170 | /usr/local/bin/pandoc --standalone -t context "$filename" -o "$filename.tex" 171 | context --silent --purgeall "$filename.tex" 172 | rm "$filename.tex" 173 | CheckedForUserDefaultShell 174 | 175 | inputMethod 176 | 1 177 | shell 178 | /bin/bash 179 | source 180 | 181 | 182 | BundleIdentifier 183 | com.apple.RunShellScript 184 | CFBundleVersion 185 | 2.0.3 186 | CanShowSelectedItemsWhenRun 187 | 188 | CanShowWhenRun 189 | 190 | Category 191 | 192 | AMCategoryUtilities 193 | 194 | Class Name 195 | RunShellScriptAction 196 | InputUUID 197 | 20F8F47A-7A69-4825-846D-95E450C47976 198 | Keywords 199 | 200 | Shell 201 | Script 202 | Command 203 | Run 204 | Unix 205 | 206 | OutputUUID 207 | 9C8F360F-E095-46EE-B54D-3A3A4478AFF0 208 | ShowWhenRun 209 | 210 | UUID 211 | 6EBA3A23-739B-4522-AF92-377C2DC09263 212 | UnlocalizedApplications 213 | 214 | Automator 215 | 216 | arguments 217 | 218 | 0 219 | 220 | default value 221 | 0 222 | name 223 | inputMethod 224 | required 225 | 0 226 | type 227 | 0 228 | uuid 229 | 0 230 | 231 | 1 232 | 233 | default value 234 | 235 | name 236 | source 237 | required 238 | 0 239 | type 240 | 0 241 | uuid 242 | 1 243 | 244 | 2 245 | 246 | default value 247 | 248 | name 249 | CheckedForUserDefaultShell 250 | required 251 | 0 252 | type 253 | 0 254 | uuid 255 | 2 256 | 257 | 3 258 | 259 | default value 260 | 261 | name 262 | COMMAND_STRING 263 | required 264 | 0 265 | type 266 | 0 267 | uuid 268 | 3 269 | 270 | 4 271 | 272 | default value 273 | /bin/sh 274 | name 275 | shell 276 | required 277 | 0 278 | type 279 | 0 280 | uuid 281 | 4 282 | 283 | 284 | isViewVisible 285 | 286 | location 287 | 338.500000:499.000000 288 | nibPath 289 | /System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib 290 | 291 | isViewVisible 292 | 293 | 294 | 295 | connectors 296 | 297 | 473227DC-8E2C-4E9F-A69A-55553CD8C8FE 298 | 299 | from 300 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 - 7BAF485E-44A5-4384-9219-1A953A5CD0D1 301 | to 302 | 6EBA3A23-739B-4522-AF92-377C2DC09263 - 6EBA3A23-739B-4522-AF92-377C2DC09263 303 | 304 | 305 | workflowMetaData 306 | 307 | serviceInputTypeIdentifier 308 | com.apple.Automator.nothing 309 | serviceOutputTypeIdentifier 310 | com.apple.Automator.nothing 311 | serviceProcessesInput 312 | 0 313 | workflowTypeIdentifier 314 | com.apple.Automator.servicesMenu 315 | 316 | 317 | 318 | -------------------------------------------------------------------------------- /Pandoc LaTeX PDF with Template.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 417 7 | AMApplicationVersion 8 | 2.6 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.applescript.object 25 | 26 | 27 | AMActionVersion 28 | 1.0.2 29 | AMApplication 30 | 31 | Automator 32 | 33 | AMParameterProperties 34 | 35 | source 36 | 37 | 38 | AMProvides 39 | 40 | Container 41 | List 42 | Types 43 | 44 | com.apple.applescript.object 45 | 46 | 47 | ActionBundlePath 48 | /System/Library/Automator/Run AppleScript.action 49 | ActionName 50 | Run AppleScript 51 | ActionParameters 52 | 53 | source 54 | on run {input, parameters} tell application "System Events" set theAppName to name of the first process whose frontmost is true end tell tell application "System Events" keystroke "s" using command down --save file tell process theAppName set theFilePath to the value of attribute "AXDocument" of window 1 set textencoded to do shell script "php -r 'echo substr(trim(urldecode(\"" & theFilePath & "\")), 7);'" tell application "Finder" set directory to do shell script "php -r 'echo dirname(\"" & textencoded & "\");'" set contextTemplate to (directory & "/template.tex" as POSIX file) try contextTemplate as alias set found to true on error set found to false end try end tell if not found then display dialog "You need to create a file named template.tex in the same directory." tell me to quit end if return textencoded end tell end tell return theFilePath end run 55 | 56 | BundleIdentifier 57 | com.apple.Automator.RunScript 58 | CFBundleVersion 59 | 1.0.2 60 | CanShowSelectedItemsWhenRun 61 | 62 | CanShowWhenRun 63 | 64 | Category 65 | 66 | AMCategoryUtilities 67 | 68 | Class Name 69 | RunScriptAction 70 | InputUUID 71 | EBE9653F-9D9A-49D4-8A71-BD3D19D942D2 72 | Keywords 73 | 74 | Run 75 | 76 | OutputUUID 77 | 56D8A2F3-BA2D-4371-BE18-D9E6E0677FC2 78 | ShowWhenRun 79 | 80 | UUID 81 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 82 | UnlocalizedApplications 83 | 84 | Automator 85 | 86 | arguments 87 | 88 | 0 89 | 90 | default value 91 | on run {input, parameters} 92 | 93 | (* Your script goes here *) 94 | 95 | return input 96 | end run 97 | name 98 | source 99 | required 100 | 0 101 | type 102 | 0 103 | uuid 104 | 0 105 | 106 | 107 | isViewVisible 108 | 109 | location 110 | 338.500000:316.000000 111 | nibPath 112 | /System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib 113 | 114 | isViewVisible 115 | 116 | 117 | 118 | action 119 | 120 | AMAccepts 121 | 122 | Container 123 | List 124 | Optional 125 | 126 | Types 127 | 128 | com.apple.cocoa.string 129 | 130 | 131 | AMActionVersion 132 | 2.0.3 133 | AMApplication 134 | 135 | Automator 136 | 137 | AMParameterProperties 138 | 139 | COMMAND_STRING 140 | 141 | CheckedForUserDefaultShell 142 | 143 | inputMethod 144 | 145 | shell 146 | 147 | source 148 | 149 | 150 | AMProvides 151 | 152 | Container 153 | List 154 | Types 155 | 156 | com.apple.cocoa.string 157 | 158 | 159 | ActionBundlePath 160 | /System/Library/Automator/Run Shell Script.action 161 | ActionName 162 | Run Shell Script 163 | ActionParameters 164 | 165 | COMMAND_STRING 166 | #!/bin/bash 167 | cd "$( dirname "$1" )" 168 | filename=$(basename "$1") 169 | export PATH=/Library/TeX/Distributions/Programs/texbin:$PATH 170 | /usr/local/bin/pandoc "$filename" --template template.tex -o "$filename.pdf" 171 | CheckedForUserDefaultShell 172 | 173 | inputMethod 174 | 1 175 | shell 176 | /bin/bash 177 | source 178 | 179 | 180 | BundleIdentifier 181 | com.apple.RunShellScript 182 | CFBundleVersion 183 | 2.0.3 184 | CanShowSelectedItemsWhenRun 185 | 186 | CanShowWhenRun 187 | 188 | Category 189 | 190 | AMCategoryUtilities 191 | 192 | Class Name 193 | RunShellScriptAction 194 | InputUUID 195 | 20F8F47A-7A69-4825-846D-95E450C47976 196 | Keywords 197 | 198 | Shell 199 | Script 200 | Command 201 | Run 202 | Unix 203 | 204 | OutputUUID 205 | 9C8F360F-E095-46EE-B54D-3A3A4478AFF0 206 | ShowWhenRun 207 | 208 | UUID 209 | 6EBA3A23-739B-4522-AF92-377C2DC09263 210 | UnlocalizedApplications 211 | 212 | Automator 213 | 214 | arguments 215 | 216 | 0 217 | 218 | default value 219 | 0 220 | name 221 | inputMethod 222 | required 223 | 0 224 | type 225 | 0 226 | uuid 227 | 0 228 | 229 | 1 230 | 231 | default value 232 | 233 | name 234 | source 235 | required 236 | 0 237 | type 238 | 0 239 | uuid 240 | 1 241 | 242 | 2 243 | 244 | default value 245 | 246 | name 247 | CheckedForUserDefaultShell 248 | required 249 | 0 250 | type 251 | 0 252 | uuid 253 | 2 254 | 255 | 3 256 | 257 | default value 258 | 259 | name 260 | COMMAND_STRING 261 | required 262 | 0 263 | type 264 | 0 265 | uuid 266 | 3 267 | 268 | 4 269 | 270 | default value 271 | /bin/sh 272 | name 273 | shell 274 | required 275 | 0 276 | type 277 | 0 278 | uuid 279 | 4 280 | 281 | 282 | isViewVisible 283 | 284 | location 285 | 338.500000:499.000000 286 | nibPath 287 | /System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib 288 | 289 | isViewVisible 290 | 291 | 292 | 293 | connectors 294 | 295 | FC641CE7-B721-435A-82FB-5856291A431A 296 | 297 | from 298 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 - 7BAF485E-44A5-4384-9219-1A953A5CD0D1 299 | to 300 | 6EBA3A23-739B-4522-AF92-377C2DC09263 - 6EBA3A23-739B-4522-AF92-377C2DC09263 301 | 302 | 303 | workflowMetaData 304 | 305 | serviceInputTypeIdentifier 306 | com.apple.Automator.nothing 307 | serviceOutputTypeIdentifier 308 | com.apple.Automator.nothing 309 | serviceProcessesInput 310 | 0 311 | workflowTypeIdentifier 312 | com.apple.Automator.servicesMenu 313 | 314 | 315 | 316 | -------------------------------------------------------------------------------- /Pandoc ConTeXt PDF with Template.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 417 7 | AMApplicationVersion 8 | 2.6 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.applescript.object 25 | 26 | 27 | AMActionVersion 28 | 1.0.2 29 | AMApplication 30 | 31 | Automator 32 | 33 | AMParameterProperties 34 | 35 | source 36 | 37 | 38 | AMProvides 39 | 40 | Container 41 | List 42 | Types 43 | 44 | com.apple.applescript.object 45 | 46 | 47 | ActionBundlePath 48 | /System/Library/Automator/Run AppleScript.action 49 | ActionName 50 | Run AppleScript 51 | ActionParameters 52 | 53 | source 54 | on run {input, parameters} tell application "System Events" set theAppName to name of the first process whose frontmost is true end tell tell application "System Events" keystroke "s" using command down --save file tell process theAppName set theFilePath to the value of attribute "AXDocument" of window 1 set textencoded to do shell script "php -r 'echo substr(trim(urldecode(\"" & theFilePath & "\")), 7);'" tell application "Finder" set directory to do shell script "php -r 'echo dirname(\"" & textencoded & "\");'" set contextTemplate to (directory & "/contextTemplate.tex" as POSIX file) try contextTemplate as alias set found to true on error set found to false end try end tell if not found then display dialog "You need to create a file named contextTemplate.tex in the same directory." tell me to quit end if return textencoded end tell end tell return theFilePath end run 55 | 56 | BundleIdentifier 57 | com.apple.Automator.RunScript 58 | CFBundleVersion 59 | 1.0.2 60 | CanShowSelectedItemsWhenRun 61 | 62 | CanShowWhenRun 63 | 64 | Category 65 | 66 | AMCategoryUtilities 67 | 68 | Class Name 69 | RunScriptAction 70 | InputUUID 71 | EBE9653F-9D9A-49D4-8A71-BD3D19D942D2 72 | Keywords 73 | 74 | Run 75 | 76 | OutputUUID 77 | 56D8A2F3-BA2D-4371-BE18-D9E6E0677FC2 78 | ShowWhenRun 79 | 80 | UUID 81 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 82 | UnlocalizedApplications 83 | 84 | Automator 85 | 86 | arguments 87 | 88 | 0 89 | 90 | default value 91 | on run {input, parameters} 92 | 93 | (* Your script goes here *) 94 | 95 | return input 96 | end run 97 | name 98 | source 99 | required 100 | 0 101 | type 102 | 0 103 | uuid 104 | 0 105 | 106 | 107 | isViewVisible 108 | 109 | location 110 | 338.500000:316.000000 111 | nibPath 112 | /System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib 113 | 114 | isViewVisible 115 | 116 | 117 | 118 | action 119 | 120 | AMAccepts 121 | 122 | Container 123 | List 124 | Optional 125 | 126 | Types 127 | 128 | com.apple.cocoa.string 129 | 130 | 131 | AMActionVersion 132 | 2.0.3 133 | AMApplication 134 | 135 | Automator 136 | 137 | AMParameterProperties 138 | 139 | COMMAND_STRING 140 | 141 | CheckedForUserDefaultShell 142 | 143 | inputMethod 144 | 145 | shell 146 | 147 | source 148 | 149 | 150 | AMProvides 151 | 152 | Container 153 | List 154 | Types 155 | 156 | com.apple.cocoa.string 157 | 158 | 159 | ActionBundlePath 160 | /System/Library/Automator/Run Shell Script.action 161 | ActionName 162 | Run Shell Script 163 | ActionParameters 164 | 165 | COMMAND_STRING 166 | #!/bin/bash 167 | cd "$( dirname "$1" )" 168 | filename=$(basename "$1") 169 | export PATH=/Library/TeX/Distributions/Programs/texbin:$PATH 170 | /usr/local/bin/pandoc --standalone -t context "$filename" --template contextTemplate.tex -o "$filename.tex" 171 | #if you wanna get rid of temp files use context's --purgeall option 172 | context --silent "$filename.tex" 173 | rm "$filename.tex" 174 | CheckedForUserDefaultShell 175 | 176 | inputMethod 177 | 1 178 | shell 179 | /bin/bash 180 | source 181 | 182 | 183 | BundleIdentifier 184 | com.apple.RunShellScript 185 | CFBundleVersion 186 | 2.0.3 187 | CanShowSelectedItemsWhenRun 188 | 189 | CanShowWhenRun 190 | 191 | Category 192 | 193 | AMCategoryUtilities 194 | 195 | Class Name 196 | RunShellScriptAction 197 | InputUUID 198 | 20F8F47A-7A69-4825-846D-95E450C47976 199 | Keywords 200 | 201 | Shell 202 | Script 203 | Command 204 | Run 205 | Unix 206 | 207 | OutputUUID 208 | 9C8F360F-E095-46EE-B54D-3A3A4478AFF0 209 | ShowWhenRun 210 | 211 | UUID 212 | 6EBA3A23-739B-4522-AF92-377C2DC09263 213 | UnlocalizedApplications 214 | 215 | Automator 216 | 217 | arguments 218 | 219 | 0 220 | 221 | default value 222 | 0 223 | name 224 | inputMethod 225 | required 226 | 0 227 | type 228 | 0 229 | uuid 230 | 0 231 | 232 | 1 233 | 234 | default value 235 | 236 | name 237 | source 238 | required 239 | 0 240 | type 241 | 0 242 | uuid 243 | 1 244 | 245 | 2 246 | 247 | default value 248 | 249 | name 250 | CheckedForUserDefaultShell 251 | required 252 | 0 253 | type 254 | 0 255 | uuid 256 | 2 257 | 258 | 3 259 | 260 | default value 261 | 262 | name 263 | COMMAND_STRING 264 | required 265 | 0 266 | type 267 | 0 268 | uuid 269 | 3 270 | 271 | 4 272 | 273 | default value 274 | /bin/sh 275 | name 276 | shell 277 | required 278 | 0 279 | type 280 | 0 281 | uuid 282 | 4 283 | 284 | 285 | isViewVisible 286 | 287 | location 288 | 338.500000:499.000000 289 | nibPath 290 | /System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib 291 | 292 | isViewVisible 293 | 294 | 295 | 296 | connectors 297 | 298 | 93730869-5159-4D9A-811F-6128F8662403 299 | 300 | from 301 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 - 7BAF485E-44A5-4384-9219-1A953A5CD0D1 302 | to 303 | 6EBA3A23-739B-4522-AF92-377C2DC09263 - 6EBA3A23-739B-4522-AF92-377C2DC09263 304 | 305 | 306 | workflowMetaData 307 | 308 | serviceInputTypeIdentifier 309 | com.apple.Automator.nothing 310 | serviceOutputTypeIdentifier 311 | com.apple.Automator.nothing 312 | serviceProcessesInput 313 | 0 314 | workflowTypeIdentifier 315 | com.apple.Automator.servicesMenu 316 | 317 | 318 | 319 | -------------------------------------------------------------------------------- /Pandoc HTML.workflow/Contents/document.wflow: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AMApplicationBuild 6 | 417 7 | AMApplicationVersion 8 | 2.6 9 | AMDocumentVersion 10 | 2 11 | actions 12 | 13 | 14 | action 15 | 16 | AMAccepts 17 | 18 | Container 19 | List 20 | Optional 21 | 22 | Types 23 | 24 | com.apple.applescript.object 25 | 26 | 27 | AMActionVersion 28 | 1.0.2 29 | AMApplication 30 | 31 | Automator 32 | 33 | AMParameterProperties 34 | 35 | source 36 | 37 | 38 | AMProvides 39 | 40 | Container 41 | List 42 | Types 43 | 44 | com.apple.applescript.object 45 | 46 | 47 | ActionBundlePath 48 | /System/Library/Automator/Run AppleScript.action 49 | ActionName 50 | Run AppleScript 51 | ActionParameters 52 | 53 | source 54 | on run {input, parameters} tell application "System Events" set theAppName to name of the first process whose frontmost is true end tell tell application "System Events" keystroke "s" using command down --save file tell process theAppName set theFilePath to the value of attribute "AXDocument" of window 1 set textencoded to do shell script "php -r 'echo substr(trim(urldecode(" & "\"" & theFilePath & "" & "\")), 7);'" return textencoded end tell end tell return theFilePath end run 55 | 56 | ActionRuntimeParameters 57 | 58 | source 59 | on run {input, parameters} tell application "System Events" set theAppName to name of the first process whose frontmost is true end tell tell application "System Events" keystroke "s" using command down --save file tell process theAppName set theFilePath to the value of attribute "AXDocument" of window 1 set textencoded to do shell script "php -r 'echo substr(trim(urldecode(" & "\"" & theFilePath & "" & "\")), 7);'" return textencoded end tell end tell return theFilePath end run 60 | temporary items path 61 | /var/folders/0k/77ys3x4j3hd0gvwwgxdnpdh40000gn/T/4735455A-843E-406B-B13C-FA256A27FC8A/1/com.apple.Automator.RunScript 62 | 63 | BundleIdentifier 64 | com.apple.Automator.RunScript 65 | CFBundleVersion 66 | 1.0.2 67 | CanShowSelectedItemsWhenRun 68 | 69 | CanShowWhenRun 70 | 71 | Category 72 | 73 | AMCategoryUtilities 74 | 75 | Class Name 76 | RunScriptAction 77 | InputUUID 78 | EBE9653F-9D9A-49D4-8A71-BD3D19D942D2 79 | Keywords 80 | 81 | Run 82 | 83 | OutputUUID 84 | 56D8A2F3-BA2D-4371-BE18-D9E6E0677FC2 85 | ShowWhenRun 86 | 87 | UUID 88 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 89 | UnlocalizedApplications 90 | 91 | Automator 92 | 93 | arguments 94 | 95 | 0 96 | 97 | default value 98 | on run {input, parameters} 99 | 100 | (* Your script goes here *) 101 | 102 | return input 103 | end run 104 | name 105 | source 106 | required 107 | 0 108 | type 109 | 0 110 | uuid 111 | 0 112 | 113 | 114 | isViewVisible 115 | 116 | location 117 | 338.500000:496.000000 118 | nibPath 119 | /System/Library/Automator/Run AppleScript.action/Contents/Resources/Base.lproj/main.nib 120 | 121 | isViewVisible 122 | 123 | 124 | 125 | action 126 | 127 | AMAccepts 128 | 129 | Container 130 | List 131 | Optional 132 | 133 | Types 134 | 135 | com.apple.cocoa.string 136 | 137 | 138 | AMActionVersion 139 | 2.0.3 140 | AMApplication 141 | 142 | Automator 143 | 144 | AMParameterProperties 145 | 146 | COMMAND_STRING 147 | 148 | CheckedForUserDefaultShell 149 | 150 | inputMethod 151 | 152 | shell 153 | 154 | source 155 | 156 | 157 | AMProvides 158 | 159 | Container 160 | List 161 | Types 162 | 163 | com.apple.cocoa.string 164 | 165 | 166 | ActionBundlePath 167 | /System/Library/Automator/Run Shell Script.action 168 | ActionName 169 | Run Shell Script 170 | ActionParameters 171 | 172 | COMMAND_STRING 173 | #!/bin/bash 174 | cd "$( dirname "$1" )" 175 | filename=$(basename "$1") 176 | /usr/local/bin/pandoc "$filename" -t html5 -s --template $HOME/.pandoc/templates/default.html -o "$filename.html" 177 | CheckedForUserDefaultShell 178 | 179 | inputMethod 180 | 1 181 | shell 182 | /bin/bash 183 | source 184 | 185 | 186 | BundleIdentifier 187 | com.apple.RunShellScript 188 | CFBundleVersion 189 | 2.0.3 190 | CanShowSelectedItemsWhenRun 191 | 192 | CanShowWhenRun 193 | 194 | Category 195 | 196 | AMCategoryUtilities 197 | 198 | Class Name 199 | RunShellScriptAction 200 | InputUUID 201 | 20F8F47A-7A69-4825-846D-95E450C47976 202 | Keywords 203 | 204 | Shell 205 | Script 206 | Command 207 | Run 208 | Unix 209 | 210 | OutputUUID 211 | 9C8F360F-E095-46EE-B54D-3A3A4478AFF0 212 | ShowWhenRun 213 | 214 | UUID 215 | 6EBA3A23-739B-4522-AF92-377C2DC09263 216 | UnlocalizedApplications 217 | 218 | Automator 219 | 220 | arguments 221 | 222 | 0 223 | 224 | default value 225 | 0 226 | name 227 | inputMethod 228 | required 229 | 0 230 | type 231 | 0 232 | uuid 233 | 0 234 | 235 | 1 236 | 237 | default value 238 | 239 | name 240 | source 241 | required 242 | 0 243 | type 244 | 0 245 | uuid 246 | 1 247 | 248 | 2 249 | 250 | default value 251 | 252 | name 253 | CheckedForUserDefaultShell 254 | required 255 | 0 256 | type 257 | 0 258 | uuid 259 | 2 260 | 261 | 3 262 | 263 | default value 264 | 265 | name 266 | COMMAND_STRING 267 | required 268 | 0 269 | type 270 | 0 271 | uuid 272 | 3 273 | 274 | 4 275 | 276 | default value 277 | /bin/sh 278 | name 279 | shell 280 | required 281 | 0 282 | type 283 | 0 284 | uuid 285 | 4 286 | 287 | 288 | isViewVisible 289 | 290 | location 291 | 338.500000:679.000000 292 | nibPath 293 | /System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib 294 | 295 | isViewVisible 296 | 297 | 298 | 299 | connectors 300 | 301 | 6423F740-DCF6-4E0D-A0BF-6B71569C5E02 302 | 303 | from 304 | 7BAF485E-44A5-4384-9219-1A953A5CD0D1 - 7BAF485E-44A5-4384-9219-1A953A5CD0D1 305 | to 306 | 6EBA3A23-739B-4522-AF92-377C2DC09263 - 6EBA3A23-739B-4522-AF92-377C2DC09263 307 | 308 | 309 | workflowMetaData 310 | 311 | serviceInputTypeIdentifier 312 | com.apple.Automator.nothing 313 | serviceOutputTypeIdentifier 314 | com.apple.Automator.nothing 315 | serviceProcessesInput 316 | 0 317 | workflowTypeIdentifier 318 | com.apple.Automator.servicesMenu 319 | 320 | 321 | 322 | --------------------------------------------------------------------------------