Subject:
|
Re: [faq FAQ How do I format an entry in the Lugnet FAQ?]
|
Newsgroups:
|
lugnet.faq
|
Date:
|
Thu, 15 Jul 1999 19:13:45 GMT
|
Viewed:
|
6146 times
|
| |
 | |
In lugnet.faq, Todd Lehman writes:
> Wouldn't it be cool if there were something other than HTML that was
> actually readable as plaintext but which also looked great when converted to
> HTML?
It's interesting you said that. For my own purposes (and this is unrelated to
LUGNET) I've developed a few simple ASCII tags that I use in my web page source
files. My web pages (on http://www.mrob.com/ ) are all typed in as plain ASCII
text files. I use a fairly simple Perl script to convert them to HTML using the
following rules:
A bunch of characters with *asterisks* on either side is put into *italics*.
Similarly, #sharp signs# become #boldface# and =equals signs= generate =H1
style headers= (these are usually by themselves on a line).
An A NAME anchor appears by itself on a line followed by two colons, like this:
anchor1::
An A HREF anchor appears like this: [lugnet|www.lugnet.com]. The first part
inside the brackets is the text and the second part is the URL. The "http://"
is optional.
An A HREF that points to an A NAME elsewhere on the same page is like this
[section 1|#section1]. The script is smart enough to treat a reference to a
local label as a special case and it doesn't try to stick "http://" in front of
it.
Any lines that appear with blank spaces in front of them are treated as part of
a BLOCKQUOTE block. Any blank lines (consisting of only whitespace) are treated
as paragraph breaks and generate the appropriate P tags.
I don't have a symbol for the other tags like DD and DT but it would be easy to
add them. You'd have to use characters that aren't commonly used or recognize
then only when they appear at the beginning of a line. For example, a
bullet-item could be a line starting with whitespace, a lone "*" and more
whitespace. Other characters to use would be @, %, &, maybe _, |, {, }.
Finally, any line with ":::" is not processed at all. This is to handle those
rare cases where the text has to include characters that would otherwise be
treated as formatting. And, the script converts < and > into < and >
unless they're part of an HTML tag. It also notices the PRE tag and leaves
anything alone if it's inside a PRE block.
If you were willing to use a method like this process the text, then you could
make the submission format much simpler.
- Robert Munafo
|
|
Message has 2 Replies:  | | Re: [faq FAQ How do I format an entry in the Lugnet FAQ?]
|
| (...) Hee hee! COOL! Say, I wonder if math-geeks have a strong natural affinity toward custom tools like that? Why design a special tool and a custom markup when HTML already exists? Answer: Because it's easy, more pleasant to work with for lots of (...) (26 years ago, 18-Jul-99, to lugnet.faq)
|
Message is in Reply To:
86 Messages in This Thread:         
         ![[faq FAQ How do I format an entry in the Lugnet FAQ?] -Robert Munafo (13-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Jacob Sparre Andersen (14-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Robert Munafo (14-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Matthew Miller (14-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Luis Villa (14-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Jeremy H. Sproat (14-Jul-99 to lugnet.faq)](/news/x.gif)
              ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Todd Lehman (14-Jul-99 to lugnet.faq)](/news/x.gif)
            ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Jeremy H. Sproat (14-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Todd Lehman (14-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Jeremy H. Sproat (15-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Todd Lehman (15-Jul-99 to lugnet.faq)](/news/x.gif)
              ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Matthew Miller (15-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Jeremy H. Sproat (15-Jul-99 to lugnet.faq)](/news/x.gif)
            ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Todd Lehman (14-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Matthew Miller (15-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Todd Lehman (15-Jul-99 to lugnet.faq)](/news/x.gif)    ![Good read (Was: [faq FAQ How do I format an entry in the Lugnet FAQ?]) -Jeremy H. Sproat (15-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: Good read (Was: [faq FAQ How do I format an entry in the Lugnet FAQ?]) -Todd Lehman (16-Jul-99 to lugnet.off-topic.geek)](/news/x.gif)  ![Re: Good read (Was: [faq FAQ How do I format an entry in the Lugnet FAQ?]) -Robert Munafo (17-Jul-99 to lugnet.off-topic.geek)](/news/x.gif)  ![Re: Good read (Was: [faq FAQ How do I format an entry in the Lugnet FAQ?]) -Todd Lehman (17-Jul-99 to lugnet.off-topic.geek)](/news/x.gif)
              ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Todd Lehman (18-Jul-99 to lugnet.faq)](/news/x.gif)        
                   
                   
                    
                      
                     
                     
                          
                        
                       
                    
                     
                   
               ![The way of the Math Geek (was Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Robert Munafo (19-Jul-99 to lugnet.faq, lugnet.off-topic.geek)](/news/x.gif)
               ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Robert Munafo (21-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Jeremy H. Sproat (21-Jul-99 to lugnet.faq)](/news/x.gif)
             ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Matthew Miller (15-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Todd Lehman (15-Jul-99 to lugnet.faq)](/news/x.gif)
           
         ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Todd Lehman (14-Jul-99 to lugnet.faq)](/news/x.gif)  ![Re: [faq FAQ How do I format an entry in the Lugnet FAQ?] -Robert Munafo (15-Jul-99 to lugnet.faq)](/news/x.gif)
      
        
         
           
     
   
       
     
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|