Carlos-Sz Posted March 22, 2013 Share Posted March 22, 2013 (edited) Overview The workflow converts a markdown text to a forum BBCode and copy it to the clipboard. Usage Select the text to be converted in your Markdown Editor (such as Byword). Bring Alfred and type the keyword mark then hit Return key. You can also use a hotkey instead of the keyword. Markdown Syntax Headers # Header Level 1 ## Header Level 2 ### Header Level 3 Font Styles *Italic* or _Italic_ **Bold** or __Bold__ ***Italic and Bold*** or ___Italic and Bold___ ~~Strike Through~~ ~~~Underline~~~ LinkMultiple links per line utilizing the following format: [Example](http://www.example.com) ImageMultiple images per line utilizing the following format: ![Example](http://www.example.com/example.png) Image LinkSingle image link (that points to an URL) per line utilizing the following format: [![Example](http://www.example.com/example.png)](http://www.example.com) Unsorted ListUp to 2 levels utilizing one asterisk then a space at the beginning for level 1 and a tab plus an asterisk and a space at the beginning for level 2: * item at level 1 * item at level 2 * another item at level 1 Numeric ListUp to 2 levels utilizing a number followed by a dot and a space at the beginning for level 1 and a tab plus a number followed by a dot and a space at the beginning for level 2: 1. item at level 1 1. item at level 2 2. second item at level 1 Code spanEnclose the words with back ticks e.g. `inline code` Unlike code block you may need to escape a markdown character using a backslash. Code block Type 3 back ticks in the first line alone and another 3 in the last line alone: ``` Code Line 1 Code Line 2 Code Line 3 ``` The workflow will ignore any Markdown syntax within a code block. There is no need to escape a character. Quote Just start a line with a greater-than sign followed by a space as seen below: > quoted text here The workflow also supports multiple lines in a quote. Just add two spaces at the end of the line (in the example below space is represented by "{space}"): > quoted text line 1{space}{space} > quoted text line 2 Horizontal ruleIn a line alone you may type one of the following options: --- - - - *** * * * ___ EscapingTo type a markdown character that is part of a syntax without being recognized as a markdown one type a backslash ("\") in front of it. A link (any kind) requires only a single backslash at the beginning of the link. Download Version: 2.0 Release Date: 04 Mar 2014 OSX 10.9.2 Download Now What's New Up to 2 levels in a simple list Up to 2 levels in a numeric list Support to an image that points to an URL Horizontal rule Strike Through Underline Quote, including multiple lines Improved code span or inline code Support to escaping Added keyword mark Added Help keyword mark? New icon Edited March 4, 2014 by Carlos-Sz jarhead and palobo 2 Link to comment
Carlos-Sz Posted March 23, 2013 Author Share Posted March 23, 2013 Markdown to BBCodeWhat’s new? Up to 3 header levels (more than this is not visually relevant when translated to BBCode) Support for multiple links per paragraph Support for header + text style (e.g. bold) Markdow code span will be translated to BBCode text underline: enclose the word with a single backtick e.g. `backtick` Removed unecessary blank lines at the end of the text Support for code block by starting a line with tab (see below) Here is a code block. Start each line of it using a tab DownloadDownload version 1.4 here.PS: post wrote with Byword and converted using Markdown to BBCode workflow Link to comment
Carlos-Sz Posted March 31, 2013 Author Share Posted March 31, 2013 Version 1.5 is out: Improved URL handling Alleyoop support Link to comment
Carlos-Sz Posted April 9, 2013 Author Share Posted April 9, 2013 Version 1.7 is out: General improvements Alleyoop 2.0 support Link to comment
smarthero Posted April 12, 2013 Share Posted April 12, 2013 Awesome workflow! Does it support reference links or just inline? Link to comment
Carlos-Sz Posted April 12, 2013 Author Share Posted April 12, 2013 Awesome workflow! Does it support reference links or just inline? Thank you. Just inline: [Link](URL) ![image](URL) Link to comment
vdesabou Posted April 22, 2013 Share Posted April 22, 2013 Just a big thanks for this workflow! Link to comment
Carlos-Sz Posted April 23, 2013 Author Share Posted April 23, 2013 Just a big thanks for this workflow! I’m glad you like it! Link to comment
vitor Posted June 25, 2013 Share Posted June 25, 2013 Small request/suggestion. Code blocks like on github (i.e., the first and last lines consist of three consecutive backticks). ``` Some code here And more code ``` Link to comment
Carlos-Sz Posted June 27, 2013 Author Share Posted June 27, 2013 Small request/suggestion. Code blocks like on github (i.e., the first and last lines consist of three consecutive backticks). ``` Some code here And more code ``` Thank you for your feedback. I’ll add it sooner or later. Link to comment
Carlos-Sz Posted June 27, 2013 Author Share Posted June 27, 2013 Small request/suggestion. Code blocks like on github (i.e., the first and last lines consist of three consecutive backticks). ``` Some code here And more code ``` Here is a build to test: Download Link to comment
vitor Posted June 27, 2013 Share Posted June 27, 2013 Seems to be working without a problem. Thank you. Link to comment
albertkinng Posted June 27, 2013 Share Posted June 27, 2013 Can you make this workflow to be use with Writedown? http://bit.ly/1crWkKF Link to comment
vitor Posted June 27, 2013 Share Posted June 27, 2013 (edited) Can you make this workflow to be use with Writedown? http://bit.ly/1crWkKF The code isn’t editor-specific, you can write it wherever you want. As long as you can select it, you can convert it with this. Edited June 27, 2013 by Vítor Link to comment
vitor Posted September 1, 2013 Share Posted September 1, 2013 The link in the update.json file is broken. Carlos-Sz 1 Link to comment
Carlos-Sz Posted September 1, 2013 Author Share Posted September 1, 2013 The link in the update.json file is broken. Thank you. I'll have to update all Json files from all my workflows eventually. Link to comment
vdesabou Posted November 23, 2013 Share Posted November 23, 2013 Hello, I use this workflow very often, it works perfectly, i've just noticed something that is not possible to do using markdown: [![Download Workflow](https://raw.github.com/vdesabou/alfred-spotify-mini-player/master/images/alfred-workflow-icon.png)](https://raw.github.com/vdesabou/alfred-spotify-mini-player/master/SpotifyMiniPlayer.alfredworkflow) It gives as an output: markdowtobbcode.scpt: execution error: Can’t get text item 1 of "". (-1728) Any idea what's going on? Cheers Link to comment
vitor Posted November 26, 2013 Share Posted November 26, 2013 Hello, I use this workflow very often, it works perfectly, i've just noticed something that is not possible to do using markdown: [![Download Workflow](https://raw.github.com/vdesabou/alfred-spotify-mini-player/master/images/alfred-workflow-icon.png)](https://raw.github.com/vdesabou/alfred-spotify-mini-player/master/SpotifyMiniPlayer.alfredworkflow) It gives as an output: markdowtobbcode.scpt: execution error: Can’t get text item 1 of "". (-1728) Any idea what's going on? Cheers The workflow is not taking that possible substitution into account, so its getting confused and failing on that. This workflow will work with that (disclaimer — its mine). Link to comment
vdesabou Posted November 26, 2013 Share Posted November 26, 2013 The workflow is not taking that possible substitution into account, so its getting confused and failing on that. This workflow will work with that (disclaimer — its mine). Hi Vitor, I've just tried your workflow and can confirm this is working for this specific link, but there are some other issues that I don't get with this workflow. I've replied in your workflow thread. Cheers Link to comment
vitor Posted November 26, 2013 Share Posted November 26, 2013 but there are some other issues that I don't get with this workflow. I've replied in your workflow thread. Thank you for the heads up, those are now fixed. Link to comment
Carlos-Sz Posted November 27, 2013 Author Share Posted November 27, 2013 Thank you for the heads up, those are now fixed. Hello, I use this workflow very often, it works perfectly, i've just noticed something that is not possible to do using markdown: [![Download Workflow](https://raw.github.com/vdesabou/alfred-spotify-mini-player/master/images/alfred-workflow-icon.png)](https://raw.github.com/vdesabou/alfred-spotify-mini-player/master/SpotifyMiniPlayer.alfredworkflow) It gives as an output: markdowtobbcode.scpt: execution error: Can’t get text item 1 of "". (-1728) Any idea what's going on? Cheers The workflow does not support this kind of link, at least not yet. But I see Vitor was kind, kind enough to not only point that out but also link to his workflow. Link to comment
vitor Posted November 28, 2013 Share Posted November 28, 2013 (edited) The workflow does not support this kind of link, at least not yet. But I see Vitor was kind, kind enough to not only point that out but also link to his workflow. I apologise for the offense (I truly do, in all honesty). I actually considered not posting that, has I did not want to hijack the thread, and truth is I really like your workflow, and many others of yours that I continue to use (the imgur one being the most used). I did not mean to devalue your work in any way. This workflow (yours) is made with a specific use case in mind, that you even state in your goal — write the text on a text editor, convert it and bring it back. Even though that’s a perfectly valid objective, it is not mine (I want to write my text directly on the forum’s reply box). That, coupled with the fact that some substitutions are not to my liking (a complete matter of personal preference), made me decide to write my own. When seeing a fellow user struggling with some limitations, I pointed him (her?) to a working solution. I’ve never been shy to use the best references I have to point users on these forums to answers to difficulties they’re having, be them helping with code, or pointing to a relevant workflow that might solve the issue, even your own (specially your own, since I’ve been using them for a while). This time, the only workflow alternative I’m aware of for this task, happens to be the one I’ve built. I was not trying to be malicious. I did, however, as mentioned, think twice about posting, so in doubt I should’ve checked with you first since it’s your thread, and I do apologise. Again, this is sincere, I’m not being facetious in any way. I have not removed the link, as editing it after the fact would look like I was trying to avoid blame, but if you so wish, I’ll remove it and/or the posts themselves. Edited November 28, 2013 by Vítor Link to comment
Carlos-Sz Posted March 3, 2014 Author Share Posted March 3, 2014 I apologise for the offense (I truly do, in all honesty). I actually considered not posting that, has I did not want to hijack the thread, and truth is I really like your workflow, and many others of yours that I continue to use (the imgur one being the most used). I did not mean to devalue your work in any way. This workflow (yours) is made with a specific use case in mind, that you even state in your goal — write the text on a text editor, convert it and bring it back. Even though that’s a perfectly valid objective, it is not mine (I want to write my text directly on the forum’s reply box). That, coupled with the fact that some substitutions are not to my liking (a complete matter of personal preference), made me decide to write my own. When seeing a fellow user struggling with some limitations, I pointed him (her?) to a working solution. I’ve never been shy to use the best references I have to point users on these forums to answers to difficulties they’re having, be them helping with code, or pointing to a relevant workflow that might solve the issue, even your own (specially your own, since I’ve been using them for a while). This time, the only workflow alternative I’m aware of for this task, happens to be the one I’ve built. I was not trying to be malicious. I did, however, as mentioned, think twice about posting, so in doubt I should’ve checked with you first since it’s your thread, and I do apologise. Again, this is sincere, I’m not being facetious in any way. I have not removed the link, as editing it after the fact would look like I was trying to avoid blame, but if you so wish, I’ll remove it and/or the posts themselves. OK Vitor. Congratulations for your workflow. Nice use of regular expression. Link to comment
Carlos-Sz Posted March 4, 2014 Author Share Posted March 4, 2014 Version 2.0 is out! Download Now What’s new? Up to 2 levels in a simple list Up to 2 levels in a numeric list Support to an image that points to an URL Horizontal rule Strike Through Underline Quote, including multiple lines Improved code span or inline code Support to escaping Added keyword mark Added Help keyword mark? New icon See initial post for details about the supported Markdown syntax. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now