2 of 3
2
Markdown Sugar
Posted: 26 March 2009 12:54 AM   [ Ignore ]   [ # 16 ]
Sr. Member
RankRankRankRank
Total Posts:  232
Joined  2008-11-19
Alan Hogan - 26 March 2009 12:50 AM
2) I feel like an idiot but how the heck do I install a sugar?

Stick it in ~/Library/Application Support/Espresso/Sugars

Profile
 
 
Posted: 26 March 2009 12:56 AM   [ Ignore ]   [ # 17 ]
Moderator
RankRankRankRank
Total Posts:  1249
Joined  2008-10-28
Alan Hogan - 26 March 2009 12:50 AM
2) I feel like an idiot but how the heck do I install a sugar?

Move the Sugar into ~/Library/Application Support/Espresso/Sugars to install it and relaunch Espresso (it only loads Sugars on launch currently).  I can’t remember if Jan implemented double click installs for Sugars or not, but drag and drop into that folder will always work regardless.

Edit: D’oh!  Donut’s quicker on the draw than I.  :-)

 Signature 

Ian Beck
MacRabbit Support

Follow us on Twitter, or try my custom themes: Quiet Light & Earthworm

Profile
 
 
Posted: 26 March 2009 05:05 AM   [ Ignore ]   [ # 18 ]
Sr. Member
RankRankRankRank
Total Posts:  232
Joined  2008-11-05
Alan Hogan - 26 March 2009 12:50 AM
1) If you could add “text” as an extension, that’d be great.  Gruber (who is of course the creator of Markdown) uses .text for his own markdown documents: http://daringfireball.net/projects/markdown/index.text

I have to throw in my minus one on this one. I use .txt and .text for non-styled US-ASCII/UTF-8 plaintext documents.

I suggest the more common ones: .md, .mkdn, or .markdown (these are the ones that GitHub supports; I personally use .markdown).

 Signature 

Ruby.sugar | Rails.sugar? | Haml.sugar | SASS.sugar | Sugar Manager.sugar | Git.sugar | Regex.sugar | ERb.sugar | RSpec.sugar

http://elliottcable.name/contact.xhtml

Profile
 
 
Posted: 26 March 2009 04:48 PM   [ Ignore ]   [ # 19 ]
Jr. Member
RankRank
Total Posts:  43
Joined  2008-10-29

I definitely won’t add .txt and .text. Wait for the new version to come, you’ll see more formats. The new version is coming as soon as possible. :)

 Signature 

Markdown.sugar – The super-awesome Markdown for Espresso.

Profile
 
 
Posted: 27 March 2009 11:49 PM   [ Ignore ]   [ # 20 ]
Sr. Member
RankRankRankRank
Total Posts:  232
Joined  2008-11-05

Regarding the lookaheads: I was confused. It’s lookbehinds that completely fail to work, lookaheads work fine. Ignore me! d-:

 Signature 

Ruby.sugar | Rails.sugar? | Haml.sugar | SASS.sugar | Sugar Manager.sugar | Git.sugar | Regex.sugar | ERb.sugar | RSpec.sugar

http://elliottcable.name/contact.xhtml

Profile
 
 
Posted: 12 April 2009 06:02 AM   [ Ignore ]   [ # 21 ]
Moderator
RankRankRankRank
Total Posts:  1249
Joined  2008-10-28

I’ve been wanting to figure out what’s what with syntax Sugars and I like Markdown, so I’ve forked this project and am currently revising it to use Elliott’s Sugar standard (and revising the regex a bit along the way to make them a bit more specifically targeted).

David, I’m hoping to be ready to send you a pull request in a couple days, and then you can review my changes and do with them what you will.

 Signature 

Ian Beck
MacRabbit Support

Follow us on Twitter, or try my custom themes: Quiet Light & Earthworm

Profile
 
 
Posted: 13 April 2009 08:58 PM   [ Ignore ]   [ # 22 ]
Jr. Member
RankRank
Total Posts:  43
Joined  2008-10-29

Sure, looking forward :) Thanks!

 Signature 

Markdown.sugar – The super-awesome Markdown for Espresso.

Profile
 
 
Posted: 17 April 2009 05:06 PM   [ Ignore ]   [ # 23 ]
Moderator
RankRankRankRank
Total Posts:  1249
Joined  2008-10-28

My updates to the Markdown.sugar are now merged into the main project here:

http://github.com/dc/markdown.sugar/tree

I didn’t make any changes to the extensions, but the syntax itself should be quite a bit more accurate (it’s able to process everything in the Daring Fireball syntax docs, and will embed HTML correctly in most cases).  Please note that every selector has changed to conform better with the Espresso Sugar Standard.  There’s probably a little wonkiness left, but overall it should be much more in line with the naming scheme being followed by other Sugars.  You’ll need to update any Markdown specific items you have in themes, and also note that the placeholder theme name is now “markdown” instead of “text.markdown”.

Let us know if you have any problems with the new version of the Sugar!  This is still David’s project, but I’ll definitely help out as I can.

 Signature 

Ian Beck
MacRabbit Support

Follow us on Twitter, or try my custom themes: Quiet Light & Earthworm

Profile
 
 
Posted: 28 April 2009 08:11 PM   [ Ignore ]   [ # 24 ]
Jr. Member
RankRank
Total Posts:  43
Joined  2008-10-29

Version 0.3.1 is on Github, thank you, Ian!

Snippets added. :)

And another note for further releases: Markdown Sugars maybe becomes a Cocoa Sugar so you can transform Markdown into HTML right in Espresso and preview your Markdown file in a seperate window.

Some features that would be awesome but hard to realize:
“Shorten Link” Toolbar item that interacts with URL shortening services via curl.
“Insert Image” Toolbar item that loads up the image to a file sharing system and inserts a Markdown image tag.

 Signature 

Markdown.sugar – The super-awesome Markdown for Espresso.

Profile
 
 
Posted: 28 April 2009 09:30 PM   [ Ignore ]   [ # 25 ]
Moderator
RankRankRankRank
Total Posts:  1249
Joined  2008-10-28

Custom toolbar items for Sugars haven’t been enabled in Espresso yet, but “shorten link” and “insert image” menu items would not be too hard to realize; actually, you wouldn’t necessarily need compiled Objective-C, either.  You could run custom actions through TEA using Python (to use TEA’s helper functions) or any other language that can be executed on the command line (Ruby, PHP, etc.).

Unfortunately, there currently isn’t an API call for displaying rendered HTML code in Espresso, so that would either take a custom preview UI or else need to wait on MacRabbit adding such a call.

 Signature 

Ian Beck
MacRabbit Support

Follow us on Twitter, or try my custom themes: Quiet Light & Earthworm

Profile
 
 
Posted: 28 April 2009 11:37 PM   [ Ignore ]   [ # 26 ]
Jr. Member
RankRank
Total Posts:  43
Joined  2008-10-29

Thanks for the help! :)
If it’s possible with Perl (I don’t do perl so I have to ask someone else) we could use the original Markdown file.
PHP is great too because I know PHP and it’s very easy and there is a PHP Markdown.
Seems like I have a new target in coding… I just need to find some time.

# Preview: I thought about an extra window (compiled obj-c). HUD or something like that. Would be awesome if I can do it. Let’s see… ;)

 Signature 

Markdown.sugar – The super-awesome Markdown for Espresso.

Profile
 
 
Posted: 29 April 2009 04:49 PM   [ Ignore ]   [ # 27 ]
Jr. Member
RankRank
Total Posts:  43
Joined  2008-10-29

Please help: Does anyone know how to embed a PHP script in the Sugar? Any link or hint?

Thanks in advance! :)

edit: Thanks, I managed it somehow:

#!/usr/bin/php
<?php
… 

 Signature 

Markdown.sugar – The super-awesome Markdown for Espresso.

Profile
 
 
Posted: 30 April 2009 10:04 AM   [ Ignore ]   [ # 28 ]
Jr. Member
RankRank
Total Posts:  43
Joined  2008-10-29

Version 0.3.2 is out:

Actually, it was not that hard to implement the URL shortening. ;)
Another feature / action added: Convert Markdown to HTML.

Download

 Signature 

Markdown.sugar – The super-awesome Markdown for Espresso.

Profile
 
 
Posted: 30 April 2009 04:08 PM   [ Ignore ]   [ # 29 ]
Sr. Member
RankRankRankRank
Total Posts:  205
Joined  2008-10-28

Fantastic. Going to try this out right now!

 Signature 

PHP.sugar

“Quick! Get in the Tardis!”

Profile
 
 
Posted: 30 April 2009 04:34 PM   [ Ignore ]   [ # 30 ]
Jr. Member
RankRank
Total Posts:  43
Joined  2008-10-29

I hope it works, fresh from the lab ^^ ;)

 Signature 

Markdown.sugar – The super-awesome Markdown for Espresso.

Profile
 
 
   
2 of 3
2