?

Log in

No account? Create an account
I'm working on a wiki-like markup so that people who are posting… - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Jan. 10th, 2002|04:26 pm]
LiveJournal Client Discussions

lj_clients

[jerronimo]
I'm working on a wiki-like markup so that people who are posting using my client (JLJ) dont have to care about getting lj tags right. It just occurred to me that a lot of this might be nice to have across all of the clients, or perhaps as a markup processor within the server. (I've not done any hacking on the goat, only clients, so I wouldn't even know where to start, although I imagine that the hooks for it would be someplace close to the "preformatted" processing.

This is basically the list of tags, borrowed mostly from standards used in WikiWebs and such;

First, some notes.
- If a tag is opened on one line, but not closed on that line, it is closed for you. That is to say, that if you start text as bold, on line 3, no matter what you do, the text on line 4 will start out as not bold.
- any of the escape characters, if doubled up, get escaped.. that is to say that ~this text will be italic~ however ~~this text will be surrounded by tildes~~

=== text formatting:
*bold*               <b>bold</b>
**not bold**         *not bold*
_underline_          <u>underline</u>
~italic~             <i>italic</i>
^blue text^          <font color="blue">text</font>

=== misc html:
-----                <hr>  (five dashes)
* foo                (bulleted list items <ul>, etc)
** bar               (same thing, but one level deeper)

=== links:   first the URL, then any text to include in the link

%http... foo%        <a href="http...">foo</a>
%ftp... foo%         <a href="ftp...">foo</a>
%foo@... foo%        <a href="mailto:foo@...">foo</a>
%img:http...%        <img src="http...">

=== livejournal specific things:
%user:foo%           <lj user="foo">
%post:8673 foo%      <a href="http://www.livejour...=8673">foo</a>
-8<- frag            <lj-cut text="frag">

Obviously, there are still some issues to be worked out, but this is the standard that I'm going to be coding to. Even if no one else supports it, it should be easy to implement in my client as a series of regex'es, but obviously, I'd like for there to be some kind of standard if others of you have already implemented something like this or were thinking of doing something like this in your clients...
linkReply

Comments:
From: evan
2002-01-10 05:48 pm (UTC)
What happened to the standard called "HTML"?


If you really want to know how I feel about this sort of thing, read this.
(Reply) (Thread)
[User Picture]From: jerronimo
2002-01-10 06:23 pm (UTC)
If you want to be that way, why do we bother with Livejournal when before it, we had Blogger, or just a series of text files... Why make another journaling system for us to learn?

Why bother adding <lj user="evan"> to the livejournal keywords, when we could just do <a href="http://www.livejournal.com/users/evan">evan<a>?

...Because it's easier.

The reason for using these things is that it's quicker and easier to type ~this kind of thing~ than to have to do the italics tags. Yes, it's not much more to type it out, but if it helps just one person not lose their train of thought, or to make it quicker to edit posts, then I'm all for it. It's not like the end user will not be able to use HTML anymore, but now they'll have a choice between HTML and another formatting markup set.

Besides, who's to say that the final display rendering for our journals will be HTML? I mean, even the exporting utilities export as XML, not HTML... What if someone wants to publish their journal in book form? they'll have to convert it to something else, or they might want to use local versions of their saved entries (which my client does) to render these printable pages.

I might just as well add TeX extensions instead of Wiki extensions... It doesn't matter... either add just as much usability, but Wiki extensions are easier and quicker to type.

It's all markup... but pidgeonholing it into HTML only is just short-sightedness. Letting the user decide how they want to edit their entries should be the goal here, not limiting their choices.

If no one ever uses it, what does it matter? I just figured that more than just myself might use it, and it's simple enough to add to a client... following through on that, if it's in multiple different clients, there's no reason to have the code repeated everywhere, so it might as well be in the server so that anyone from any client can use it.

You make all your posts in the standard you want to use, I'll do mine in the standard I want to use...
(Reply) (Parent) (Thread)
From: evan
2002-01-10 06:38 pm (UTC)
You make all your posts in the standard you want to use, I'll do mine in the standard I want to use...
Agreed!
Which is why I said "how I feel about this sort of thing". :)


We shouldn't have allowed HTML from the beginning, maybe, but we're stuck with it now-- it's the least common denominator. Any conversion to book form will necessarily include a conversion from HTML for the older entries, so using HTML in the future isn't causing any more harm.
(Reply) (Parent) (Thread)
From: ex_cerebrate131
2002-01-10 06:34 pm (UTC)

Of course, whose Wiki extensions do you use?

I'd speculated on the possibility of doing something similar in my hypothetical .NET client, either that or more WYSIWYG editing, but the set of escapes I'd be using - derived from my Wiki.NET project, which in turn derives them from TWiki and the c2 wiki - only tangentially resembles yours...

Also, do you plan to allow HTML pass-through?
(Reply) (Thread)
[User Picture]From: jerronimo
2002-01-10 07:44 pm (UTC)

Re: Of course, whose Wiki extensions do you use?

well WYSIWYG is not an option for my client, being that it is a text-only based client.

And of course, I will allow all HTML to pass through. If the user enables the wiki formatting support, then it will still allow HTML to pass through, but will also convert the wiki tags to HTML before it sends it off to the server.
(Reply) (Parent) (Thread)
[User Picture]From: jerronimo
2002-01-10 07:46 pm (UTC)

Re: Of course, whose Wiki extensions do you use?

and can you throw me links to the wiki's you mentioned?

all of the wikis that i have found use the tags I used above... although I did add a few, since people will want to have named links rather than just the url display in their journal.
(Reply) (Parent) (Thread)
From: ex_cerebrate131
2002-01-11 06:41 am (UTC)

Re: Of course, whose Wiki extensions do you use?

Well, TWiki is at http://twiki.org/, and has probably the most comprehensive set of Wiki formatting tags http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules, which is why I'm using it as a model for my Wiki project. The principle thing I'm adding is a [[[data]]] syntax for arbitrary plug-ins.

The other Wiki (which is, I believe, the *original* Wiki), is at http://c2.com/cgi/wiki. From it, I'm borrowing the multi-line emphasis rules <a href="http://c2.com/cgi/wiki?TextFormattingRules>http://c2.com/cgi/wiki?TextFormattingRules</a>, as TWiki only has formatting syntax for individual words, and "*" at least is too common a character to be overloaded, IMO. Possibly also inlining images, as other syntax and if need be the &lt;img&gt; tag lets people override this for the less common use.
(Reply) (Parent) (Thread)
[User Picture]From: jerronimo
2002-01-11 12:25 pm (UTC)

Re: Of course, whose Wiki extensions do you use?

Thanks muchly for the info! :]
(Reply) (Parent) (Thread)
[User Picture]From: suppafly
2002-01-10 07:36 pm (UTC)
thats harder to remember than html not to mention its basically not standard.. if you want to add something that is easy for the user, add a wysiwyg interface, otherwise just stick with the markup language everyone on the internet knows..
(Reply) (Thread)
[User Picture]From: jerronimo
2002-01-10 07:50 pm (UTC)
All of the wikis that i've seen use the tags above, aside from a few that i created.

A WYSIWYG interface is out of the question, since my client is text only. If the user wants a mouse driven WYSIWYG interface, they will use another client.

The reason I posed this here is to get the input of the other client developers.

I _WILL_ be doing this. If people have suggestions for better WIKI tagsets I'm open to suggestion...

If i end up having the only client that supports this, and I'm the only person on the planet that uses this feature, then so be it. ;)
(Reply) (Parent) (Thread)
[User Picture]From: sapphirecat
2002-01-16 12:33 pm (UTC)

Tagness.

Actually, I've been thinking about doing something like that in my own client; I have code already from another project to turn things *bold*, /italic/, and _underline_, with links as <[protocol://]address> This was based on my understanding at the time of Usenet posting conventions. The link notation was influenced by Slashdot--there's deliberately no way to do <A HREF=someserver/wow.cgi>This is more informative</A>, although that could easily be fixed. URLs and LJ usernames aren't allowed to contain spaces, so it could become <address followed by link text> instead.

The main advantage of /italic/ notation over ~italic~ is that / is in a standard location on the keyboard--with moving ~ and backspace, switching between Slowlaris and PC keyboards is hell.

I had a thought on blockquoting, but using ""blockquoted text"" would break your current rules on doubling escapes to remove their special meaning. Speaking of the escapes--what happens to ~~~decorated text~~~, Wal*Mart (or UN*X), and _stuff near punctuation_?
(Reply) (Thread)
[User Picture]From: jerronimo
2002-01-16 12:59 pm (UTC)

Re: Tagness.

I used to use /italics/ but switched my own usage over to ~italics~ after using a few wikis. In retrospect /italics/ makes more sense.. i agree with your reasoning there.

as for the tags, your format makes a lot more sense than what i did. I didn;'t have anything to base mine on at the time, so i just pulled something out of my butt. i like your format better...

blockquoting: good idea. i'll add that in.

~~~foo~~~ becomes (to use the above notation ;] ) ~/foo/~

Wal*Mart, with nothing else on the line, retains its splat. Wal*mart and un*x would end up with the text between them being bold. you could always do: wal**mart to be sure of the results

and stuff near punctuation works fine, since i use regex'en to find the patterns. (yes, i have a simple implementation of this already which i'm trying out for the next release.

thanks for the link stuff. it'll make it a lot easier to write the source text.
(Reply) (Parent) (Thread)