Jump to content

Recommended Posts

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~~~
Link

Multiple links per line utilizing the following format:

[Example](http://www.example.com)
Image

Multiple images per line utilizing the following format:

![Example](http://www.example.com/example.png)
Image Link

Single 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 List

Up 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 List

Up 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 span

Enclose 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 rule

In a line alone you may type one of the following options:

---
- - - 
***
* * *
___
Escaping

To 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 by Carlos-Sz

Share this post


Link to post

Markdown to BBCode

What’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

Download

Download version 1.4 here.

PS: post wrote with Byword and converted using Markdown to BBCode workflow

Share this post


Link to post

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
```

Share this post


Link to post

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.

Share this post


Link to post

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 by Vítor

Share this post


Link to post

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

Share this post


Link to post

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).

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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 by Vítor

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...