[fossil-users] FYI: JSON ajax test code is now in the source tree...

2011-09-22 Thread Stephan Beal
Yo!

After i accidentally deleted my JSON/AJAX test code last night, i was lucky
enough to still have a copy laying around on my test server and went ahead
and committed it in the json branch to avoid a future catastrophy. For
anyone running Apache who would like to try it out, please see ajax/README
for instructions on how to set it up. It's ugly, but it does the job. As new
requests are implemented i add buttons/fields for them in ajax/index.html,
so just looking at that page should give you a good idea of what's currently
implemented.

Happy Hacking!

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Prototype JSON wiki editor demo online

2011-09-22 Thread Stephan Beal
Hi, all!

http://fossil.wanderinghorse.net/repos/fossil-sgb/json/wiki-editor.html

(In the source tree: ajax/wiki-editor.html. See ajax/README for Apache
install/config instructions.)

Achtung:

1) It's ugly as sin.

2) It's non-intuitive (see below for instructions)

3) It cannot yet save, but adding that should be easy to implement by
copying the wiki import code.

To try it out:

1) Click the login button to log in as the test user.
2) Click the wiki/list button to update the page list.
3) Click on one of the page names to show the page's content.

Happy Hacking!

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Prototype JSON wiki editor demo online

2011-09-22 Thread Stephan Beal
On Thu, Sep 22, 2011 at 7:13 PM, Stephan Beal sgb...@googlemail.com wrote:

 http://fossil.wanderinghorse.net/repos/fossil-sgb/json/wiki-editor.html

 1) It's ugly as sin.

2) It's non-intuitive (see below for instructions)


Points 1 and 2 still apply, but...


 3) It cannot yet save


saving now works. The test user doesn't have the rights to do so, so you
won't be able to try it out on that repo. Just believe me when i say the
Save button actually does something useful if your login has rights :).

With this we now have all of the features we need to implement custom wiki
editors/renderers for fossil:

- Authentication
- Fetch list of pages
- Fetch content for page
- Save page

 :-D

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Prototype JSON wiki editor demo online

2011-09-22 Thread Stephan Beal
On Thu, Sep 22, 2011 at 8:03 PM, Stephan Beal sgb...@googlemail.com wrote:

 With this we now have all of the features we need to implement custom wiki
 editors/renderers for fossil:

 - Authentication
 - Fetch list of pages
 - Fetch content for page
 - Save page


Create-new-page was just added, too. i plan on adding a createIfNotExists
flag to save, which will obviate create-new, though. /json/timeline/wiki was
added as well (to assist in testing the save/create support), but there's
still some work to do on the timeline bits.

It didn't occur to me until a few minutes ago, but this support also allows
the creation of custom Wiki-only sites which just happen to use Fossil for
storage, versioning, and user management. In such a case, the wiki could
hold any text content type you care to use, and use client-side rendering.

So there's the markdown support some of you have been asking for. :)

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Prototype JSON wiki editor demo online

2011-09-22 Thread Baptiste Daroussin
 So there's the markdown support some of you have been asking for. :)

Sorry for stupid question but does that mean that you bundled a
markdown library? if yes which one?

Or how do you render the markdown?

regards,
Bapt
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Prototype JSON wiki editor demo online

2011-09-22 Thread Martin S. Weber

On 09/22/11 18:14, Baptiste Daroussin wrote:

So there's the markdown support some of you have been asking for. :)


Sorry for stupid question but does that mean that you bundled a
markdown library? if yes which one?

Or how do you render the markdown?


You should have quoted one more sentence of context:

On 09/22/11 16:31, Stephan Beal wrote:
 (...) In such a case, the
 wiki could hold any text content type you care to use, and use
 client-side rendering.

 So there's the markdown support some of you have been asking for. :)

The critical info is ...and use client-side rendering.

So the infrastructure is there now. All you need is to find and get a 
client-side markdown (or whichever wiki dialect you prefer) library and throw 
it at the content you're getting back from the json interface.


HTH,
-Martin
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Prototype JSON wiki editor demo online

2011-09-22 Thread Stephan Beal
On Fri, Sep 23, 2011 at 12:14 AM, Baptiste Daroussin 
baptiste.darous...@gmail.com wrote:

  So there's the markdown support some of you have been asking for. :)

 Sorry for stupid question but does that mean that you bundled a
 markdown library? if yes which one?

 Or how do you render the markdown?


i meant figuratively - all the features needed for doing so are now there,
but you'd have to provide:

a) The HTML/JS app to fetch/render/navigate the pages.
b) The markdown/whatever parser to render the incoming wiki pages.

My whiki project was written to do just that, but now that fossil can do it
to, i can swap out my custom back-end for fossil (which would give me
versioning and compression, two features mine doesn't have).

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Prototype JSON wiki editor demo online

2011-09-22 Thread Stephan Beal
On Fri, Sep 23, 2011 at 12:32 AM, Martin S. Weber martin.we...@nist.govwrote:

 So the infrastructure is there now. All you need is to find and get a
 client-side markdown (or whichever wiki dialect you prefer) library and
 throw it at the content you're getting back from the json interface.


In fact, the wiki content doesn't _have_ to be plain text in this model. You
can, e.g., store structured JSON documents. e.g. containing wiki text in
their content field and the name of the renderer in the contentType or
renderer field, and client-defined tags in another (array) field. In
practice, the trickiest part of the client-side rendering is turning the
wiki links into something usable by the application. But it's certainly
doable (==has been done). And it inherits fossil's access roles, another
feature my current back-end doesn't have.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users