Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Need a simple "save to html" workflow
-
I'm not a coder, but this seems to be quite easy. All i need is a workflow that parses the .md to a .html document in the same folder.
I.e., if I havetext.md
, I need to have a workflow which generatestext.html
in the same folder.
I tried using the save to html workflow, but not only does it generatetext.md.html
, but it creates it in the root folder instead of where the .md is, which is useless to me. I suppose I could learn enough python to fix the workflow myself, but it's 11.50 pm here, and my brain is not working in peak condition. -
Like this..?
workflowThis is a modification of my "Doc Generate" workflow.
-
Did you test that...? Because the only thing that happens here is that the formatting in the preview pane disappears. No file gets generated, no html gets generated, and nothing changes.
I might be using it incorrectly, though - all I do is select the workflow. -
Yes. The file does get generated in the same directory as the current file as a "filename.html" file. (It happens pretty quickly though. Check the folder).
The formatting disappears in the preview pane because the preview pane can only preview markdown files.
I could use a "Show html" action, but the content will not open in the same preview window as markdown text.
I would basically use a "convert markdown to html" action and a "show html" action, for the current document.
Update
Here is how it would look
-
Oh, I found the problem. It only works locally, not on Dropbox, which is all I use.
-
The "Create Document" action in this workflow(Inside of the "Generate Document" action) has a switch for Dropbox. That should allow you to save to Dropbox.
-
That works beautifully. Thanks a lot for all your help!
Edit: nope, it saves the original markdown as a html-file. It doesn't convert.
-
Hmmm. I guess I misunderstood your request.
If I have a markdown file open, the last posted workflow converts the markdown file to html, saves it with the .html extension, and opens the file.
Inside of the new file, all markdown syntax should have been replaced with its html counterpart.
I created an "HTML Editor" workflow a while ago that displays the html of a current document. It displays the converted file just fine (Uses the "Show HTML" action).
Sorry I couldn't help.