[fossil-users] asciidoc-fossil-backend

50 views
Skip to first unread message

Gour

unread,
Mar 22, 2012, 3:12:30 AM3/22/12
to fossil...@lists.fossil-scm.org
Hello!

In our search for adequate markup to be used for our upcoming
open-source project, we stumbled upon AsciiDoc
(http://www.methods.co.nz/asciidoc/) and, so far, like it very
much and decided to use it instead of reST/Sphinx, markdown etc.

However, the best part is that there is asciidoc-fossil-backend
(https://github.com/srackham/asciidoc-fossil-backend) which enables one
to write his/her documentation in AsciiDoc and still display it nicely
on the site using Fossil's wiki mechanism.

I was not able to add new page following documentation @github, but the
following works:

asciidoc -b fossil -o - asciidoc.txt | fossil wiki create AsciiDoc

to add new page to the wiki, while:

fossil wiki export AsciiDoc AsciiDoc.wiki

created embedded doc (which seems to be favoured nowadaysa).

Remembering that I was complaining a lot about Fossil' not using some
'standard' markup (reST/markdown/...), I did accept this design choise
believing that Fossil offer so much more, but now I was graced by even
better solution. :-)

AsciiDoc is very rich semantically and able to cope with the whole
books, it produces excellent PDF output (we use dblatex toolchain),
generates several flavours of HTML (html4, xhtml, html5) and can be used
for generating man pages as well as EPUB, DocBook output etc., but it is
still possible to get decent Fossil wiki output without putting too much
weight on the server by installing DocBook toolchain tools.

I did not find any post about this backend here, but only in the
AsciiDoc mailing list, so hope it might be of some use for Fossil users.


Sincerely,
Gour

--
One who knows the transcendental nature of My appearance and
activities does not, upon leaving the body, take his birth again
in this material world, but attains My eternal abode, O Arjuna.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810

signature.asc

Leo Razoumov

unread,
Mar 22, 2012, 9:01:17 AM3/22/12
to Fossil SCM user's discussion
On Thu, Mar 22, 2012 at 03:12, Gour <go...@atmarama.net> wrote:
> Hello!
>
> In our search for adequate markup to be used for our upcoming
> open-source project, we stumbled upon AsciiDoc
> (http://www.methods.co.nz/asciidoc/) and, so far, like it very
> much and decided to use it instead of reST/Sphinx, markdown etc.
>
> However, the best part is that there is asciidoc-fossil-backend
> (https://github.com/srackham/asciidoc-fossil-backend) which enables one
> to write his/her documentation in AsciiDoc and still display it nicely
> on the site using Fossil's wiki mechanism.
>

Gour,
could you, please, provide a demo so that one can see AsciiDoc +
Fossil in action.

--Leo--
_______________________________________________
fossil-users mailing list
fossil...@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Gour

unread,
Mar 22, 2012, 10:39:07 AM3/22/12
to fossil...@lists.fossil-scm.org
On Thu, 22 Mar 2012 09:01:17 -0400
Leo Razoumov <slon...@gmail.com> wrote:

> Gour,
> could you, please, provide a demo so that one can see AsciiDoc +
> Fossil in action.

http://fossil.atmarama.net/cgi-bin/ascii-fossil.fsl


Sincerely,
Gour

--
One is understood to be in full knowledge whose every endeavor
is devoid of desire for sense gratification. He is said by sages
to be a worker for whom the reactions of work have been burned
up by the fire of perfect knowledge.

signature.asc

Bill Burdick

unread,
Mar 22, 2012, 11:05:59 AM3/22/12
to Fossil SCM user's discussion
On Thu, Mar 22, 2012 at 9:52 AM, Ephrim Khong <dr.khon...@gmail.com> wrote:
Am 22.03.2012 15:39, schrieb Gour:

On Thu, 22 Mar 2012 09:01:17 -0400
Leo Razoumov<slon...@gmail.com>  wrote:

Gour,
could you, please, provide a demo so that one can see AsciiDoc +
Fossil in action.

http://fossil.atmarama.net/cgi-bin/ascii-fossil.fsl

I'm also very interested in a demonstration backend for using a different wiki markup language. There is a blog post about the AsciiDoc-fossil-backend which describes it in more detail:

 http://srackham.wordpress.com/2011/08/30/fossil-backend-for-asciidoc/

It seems, though, that the AsciiDoc-Backend simply translates text from AsciiDoc-Markup to Fossil-Markup. There is no real integration in fossil, and it seems that it can not be used from within fossil as a markup substitute. @Gour: Is that correct, or did I miss something here?

So far, fossil is the almost perfect distributed wiki and note collection system (distributed, portable, integrated HTTP-Server, offline, MathJax-compatible, stable, supported). The only drawback is the wiki syntax, which is somewhat limited. Some way of changing that markup would be very, very appreciated. I'm currently trying my luck with editing the fossil source code, but this is a less then optimal solution (as forking breaks portability a bit, and doesn't sync the markup between the repositories). Maybe including some (sandboxed) scripting language interpreter in fossil would help - one could then change the markup script similar to the Header/Footer/CSS.

Of course, I might be missing some obvious solution, so correct me if I'm wrong :)



Bill

Stephan Beal

unread,
Mar 22, 2012, 11:15:07 AM3/22/12
to Fossil SCM user's discussion
On Thu, Mar 22, 2012 at 3:52 PM, Ephrim Khong <dr.khon...@gmail.com> wrote:
I'm also very interested in a demonstration backend for using a different wiki markup language.


(click on the README link in the left menu for details)

That demo currently uses the fossil wiki parsing back-end, but now that the core is working more or less how i want, the next step is to add a client-side renderer (or multiples - we could use client-side rules to render different wiki pages differently). i hope to get a version done this weekend which uses the Google Code wiki syntax (my personal favourite). AsciiDoc sounds intriguing, though, and i will also be looking for a JS implementation of it. i have all the code to handle the client-side rendering, i just have to plug it in to the fossil back-end (it currently uses a custom back-end using a JSON API very similar to fossil's, and the port will be straightforward).

breaks portability a bit, and doesn't sync the markup between the repositories). Maybe including some (sandboxed) scripting language interpreter in fossil would help - one could then change the markup script similar to the Header/Footer/CSS.

AFAIK there is a branch which integrates jimtcl into fossil, allowing the full range of tcl features via the built-in th1 script language. i "thought" this had made its way to the trunk, but i don't remember for certain.

--
----- stephan beal
http://wanderinghorse.net/home/stephan/

Gour

unread,
Mar 22, 2012, 11:16:38 AM3/22/12
to fossil...@lists.fossil-scm.org
On Thu, 22 Mar 2012 15:52:12 +0100
Ephrim Khong <dr.khon...@gmail.com>
wrote:

> It seems, though, that the AsciiDoc-Backend simply translates text
> from AsciiDoc-Markup to Fossil-Markup.

Correct.

> There is no real integration in fossil, and it seems that it can not
> be used from within fossil as a markup substitute.

Well, considering that even Fossil itself is moving/moved towards
embedded docs, I do not see a problem using AsciiDoc as markup for our
documentation, keep 'em as source under Fossil and use ascii-fossil
backend to render them on the server without any need for heavy
Docbook-based toolchain.


Sincerely,
Gour

--
One who is able to withdraw his senses from sense objects,
as the tortoise draws its limbs within the shell,
is firmly fixed in perfect consciousness.

signature.asc

Gour

unread,
Mar 22, 2012, 11:58:06 AM3/22/12
to fossil...@lists.fossil-scm.org
On Thu, 22 Mar 2012 16:15:07 +0100
Stephan Beal <sgb...@googlemail.com> wrote:

> AsciiDoc sounds intriguing, though, and i will also be looking for a
> JS implementation of it.

It is indeed...very capable to write complete books with index,
bibliography, glossary...plus rich semantic. I like it much more than
reST...Markdown is, anyway, not the same league.

Otoh, I'm not aware of any JS implementation 'cause it's very much tied
to DocBook. Iow, AsciiDoc has very rich markup and it's not, imho, just
question of rendering.


Sincerely,
Gour


--
What is night for all beings is the time of awakening
for the self-controlled; and the time of awakening for
all beings is night for the introspective sage.

signature.asc

Leo Razoumov

unread,
Mar 22, 2012, 7:01:53 PM3/22/12
to Fossil SCM user's discussion
On Thu, Mar 22, 2012 at 11:16, Gour <go...@atmarama.net> wrote:
> On Thu, 22 Mar 2012 15:52:12 +0100
> Ephrim Khong <dr.khon...@gmail.com>
> wrote:
>
>> It seems, though, that the AsciiDoc-Backend simply translates text
>> from AsciiDoc-Markup to Fossil-Markup.
>
> Correct.
>

I think it would be better to produce HTML from AsciiDoc and set
fossil wiki to "Use HTML as wiki markup language" from
Admin->Configuration. Full HTML is so much more powerful than what
fossil wiki syntax allows.

Leo Razoumov

unread,
Mar 22, 2012, 7:26:40 PM3/22/12
to er...@deptj.eu, Fossil SCM user's discussion
On Thu, Mar 22, 2012 at 19:20, Eric <er...@deptj.eu> wrote:

>
> On Thu, March 22, 2012 11:01 pm, Leo Razoumov wrote:
>> On Thu, Mar 22, 2012 at 11:16, Gour <go...@atmarama.net> wrote:
>>> On Thu, 22 Mar 2012 15:52:12 +0100
>>> Ephrim Khong <dr.khon...@gmail.com>
>>> wrote:
>>>
>>>> It seems, though, that the AsciiDoc-Backend simply translates text
>>>> from AsciiDoc-Markup to Fossil-Markup.
>>>
>>> Correct.
>>>
>>
>> I think it would be better to produce HTML from AsciiDoc and set
>> fossil wiki to  "Use HTML as wiki markup language" from
>> Admin->Configuration.  Full HTML is so much more powerful than what
>> fossil wiki syntax allows.
>
> It's already pretty much Asciidoc's html4 backend wrapped in <nowiki>.
>

Even inside <nowiki> scope you are limited to only white-listed tags
and attributes.

Stephan Beal

unread,
Mar 22, 2012, 11:52:17 PM3/22/12
to Fossil SCM user's discussion
On Thu, Mar 22, 2012 at 4:15 PM, Stephan Beal <sgb...@googlemail.com> wrote:
different wiki pages differently). i hope to get a version done this weekend which uses the Google Code wiki syntax (my personal favourite). AsciiDoc sounds intriguing, though, and i will also be looking for a JS ...
 
Here it is:


That uses fossil to manage the wiki pages but a Google Code syntax parser client-side to do the rendering.

To see it in action:

- Click the README link in the left.
- Somewhere down that page is a "download" link - click that.
- At the bottom of that page is a link back to the README - click on that.
- You can use the editor tab to peruse the page sources.

Adding a preview plugin for Markdown and friends would be fairly trivial. All of the markup-specific logic is encapsulated in the previewer plugin and the main app configures the wiki page list plugin to filter out names not matching *.goco (because i have several fossil-format pages in that same repo).

Happy Hacking!

Stephan Beal

unread,
Mar 24, 2012, 5:03:52 AM3/24/12
to Fossil SCM user's discussion
On Sat, Mar 24, 2012 at 12:40 AM, Martin Gagnon <eme...@gmail.com> wrote:

    "That will copy the repository to cson.fsl, which you can then open with:"

    It's need a:  s/cson/fwiki

Indeed (i copy the [download] page between all my sites). Fixed now.

Thanks, Martin,

Stephan Beal

unread,
Mar 24, 2012, 9:47:00 PM3/24/12
to Fossil SCM user's discussion
On Sun, Mar 25, 2012 at 1:05 AM, Christopher Berardi <cber...@natoufa.com> wrote:
I don't see why Fossil can't use any markup engine. For example, there
are a number of settable commands, such as pgp command, diff command,
editor, gmerge command, etc. Would it really be that difficult to
basically add a markup command so a user could use whatever markup
language/engine they wanted?

While the principal is a good one, i think, it would come with the cost of portability. All people who clone the repo would have to install and configure that back-end for their clone (and their platform).

Christopher Berardi

unread,
Mar 25, 2012, 9:31:06 AM3/25/12
to fossil...@lists.fossil-scm.org
On Sun, Mar 25, 2012 at 03:47:00AM +0200, Stephan Beal wrote:
> On Sun, Mar 25, 2012 at 1:05 AM, Christopher Berardi
> <cber...@natoufa.com> wrote:
>
> I don't see why Fossil can't use any markup engine. For example, there
> are a number of settable commands, such as pgp command, diff command,
> editor, gmerge command, etc. Would it really be that difficult to
> basically add a markup command so a user could use whatever markup
> language/engine they wanted?
>
> While the principal is a good one, i think, it would come with the cost of
> portability. All people who clone the repo would have to install and
> configure that back-end for their clone (and their platform).

That is very true. However, is it really that different of a scenario
than the choice of programming language used in a repo (I'm assuming the
majority of Fossil users are using it for source code versioning).
Anyone who clones the repo or who wishes to contribute to the project
will have to install whatever compiler, interpreter, and/or buildtools
that are required to make the project.

--
Christopher Berardi
http://www.natoufa.com/

May grace and peace by yours in abundance.

Reply all
Reply to author
Forward
0 new messages