tag:support.markedapp.com,2011-09-11:/discussions/suggestions/46347-command-line-save-as-support-search-html-sourceMarked: Discussion 2018-06-29T20:27:11Ztag:support.markedapp.com,2011-09-11:Comment/455808342018-06-28T13:08:30Z2018-06-28T13:08:30ZCommand Line "Save As" Support, Search HTML Source<div><p>These are both nearly impossible at this point. To do anything beyond<br>
what you can already do with command line tools (like multimarkdown,<br>
kramdown, discount, pandoc, etc.) Marked has to load a web view. I could<br>
have a headless browser, but at that point I'm still replicating<br>
features that most of the existing command line tools can already pull<br>
off.</p>
<p>Search in Marked is complex, and it's built around the web view (it runs<br>
via JavaScript and HTML). It might be possible to offer a second search<br>
for the source tab, but reworking that isn't in my current roadmap. I<br>
can consider it for a future update, though.</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/455808342018-06-29T13:42:56Z2018-06-29T13:42:58ZCommand Line "Save As" Support, Search HTML Source<div><p>Thanks for the note Brett. If command line isn't an option, how about some other automation like AppleScript support?</p>
<p>I'm new to AppleScript, but this looks like it should open and save the file as HTML (my intended target):</p>
<pre>
<code>tell application "Marked 2"
activate
open POSIX file "/Users/jwright/1.1.md"
save document 1 in file "/Users/jwright/1.1.html" as "HTML"
end tell</code>
</pre>
<p>However I get an error from Marked 2:</p>
<p><code>error "Marked 2 got an error: The document cannot be exported to the \"HTML\" format." number -50</code></p>
<p>Is that a better option for automation instead of command line services?</p>
<p>Thanks!</p>
<p>-Josh</p></div>Joshua Wrighttag:support.markedapp.com,2011-09-11:Comment/455808342018-06-29T20:27:10Z2018-06-29T20:27:10ZCommand Line "Save As" Support, Search HTML Source<div><p>Marked currently has no true AppleScript library, it only implements<br>
"Open". I've focused mostly on the URL handler, but it only covers preview features, not export. Export automation is something I do intend<br>
to expand on, but at present it's not really there at all.</p>
<p>-Brett</p></div>Brett