Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Markdown update - use ports
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bryan Fink  
View profile  
 More options May 11 2007, 8:42 am
From: Bryan Fink <bryan.f...@gmail.com>
Date: Fri, 11 May 2007 12:42:21 -0000
Local: Fri, May 11 2007 8:42 am
Subject: Markdown update - use ports
Hi all.  I just wanted to mention that I found an easy way to get
Markdown support in Erlyweb - use ports.

I'm not at my development machine right now, so I don't have the code
available to post, but I think anyone here could easily follow these
directions to get their own version running:

1. Grab a copy of the Python Markdown implementation
<http://www.freewisdom.org/projects/python-markdown/>
2. Download the source for the port-writing tutorial on trapexit
<http://wiki.trapexit.org/index.php/
Writing_an_Erlang_Port_using_OTP_Principles>
3. Change the echo.py script to accept multiple lines, terminated by a
"separator line".  Once you have the lines you need, call
markdown.markdown(Lines).  Return the result the same way the echo
script would return its result.
4. You're basically done at this point (just clean up the rough edges
I've left you with).  I also changed the "OK" that echo.py uses to
signal the end of the reply to something less likely to show up in a
normal block of text.

Now when you call echo:echo("String"), you'll get back XHTML based on
the Markdown you gave it.

I can post my code later tonight, if people want it.  I'm no Python
guru, so it would be interesting to see how many gasps of horror my
code would generate.  ;)

If you'd like proof that this is possible, and I'm not just making it
up, please check out the website I've put together at <http://
beerriot.com/>.  Comment fields accept Markdown syntax.  And, yes, the
whole site is built on Erlyweb (v0.5 - I haven't had time to try out
0.6 yet).  :)

*fingers crossed that my virtual server can handle public knowledge*
-Bryan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bryan Fink  
View profile  
 More options May 11 2007, 8:45 am
From: Bryan Fink <bryan.f...@gmail.com>
Date: Fri, 11 May 2007 12:45:26 -0000
Local: Fri, May 11 2007 8:45 am
Subject: Re: Markdown update - use ports
Doh!  I see that Google Groups doesn't understand the <url> syntax
like most mail readers.  My apologies for the resultant ugliness.

-Bryan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitrii 'Mamut' Dimandt  
View profile  
 More options May 11 2007, 10:56 am
From: "Dmitrii 'Mamut' Dimandt" <dmitr...@gmail.com>
Date: Fri, 11 May 2007 17:56:32 +0300
Local: Fri, May 11 2007 10:56 am
Subject: Re: [erlyweb-list] Re: Markdown update - use ports

Bryan Fink wrote:
> Doh!  I see that Google Groups doesn't understand the <url> syntax
> like most mail readers.  My apologies for the resultant ugliness.

> -Bryan

It works! :)

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »