Page 1 of 1

Vidola: building documentation

Posted: Thu Jul 12, 2012 1:41 pm
by koen.h
Hope to get more feedback than with my previous library fjor :D

I've been working hard at making documentating coding efforts as easy as possible. The result is Vidola. It allows to write your in an easy format (a Markdown extension) and transfrom this to documentation for the project.

Of course I eat my own dog food. Here is an example page written for Vidola:

https://github.com/koenhoeymans/Vidola/ ... aryUse.txt

And here you can find the result after going throug the Vidola library:

http://koenhoeymans.github.com/Vidola/LibraryUse.html

I believe I'm at a stage where I can start to show what I'm working at.

Any criticism, suggestions, remarks are appreciated, about the code or anything else. :)

Re: Vidola: building documentation

Posted: Thu Jul 12, 2012 3:48 pm
by Christopher
The thing about these systems is that the reason to keep the content in markdown is so you can generate multiple outputs (e.g. HTML, PDF, Window Doc, manpage, etc.). If that's not the goal and all it does is convert markup then it is just one extra layer. So why not just use HTML?

Re: Vidola: building documentation

Posted: Thu Jul 12, 2012 11:41 pm
by koen.h
I started with HTML and it didn't feel like writing documentation should feel. I could live with writing tags but writing about code proved too annoying. Same with docbook.

Re: Vidola: building documentation

Posted: Fri Jul 13, 2012 12:48 pm
by koen.h
I've updated the documentation to try to give an answer:

http://koenhoeymans.github.com/Vidola/A ... use-vidola

Thank you for expression your view btw.

Re: Vidola: building documentation

Posted: Fri Jul 13, 2012 2:14 pm
by Christopher
I guess I was wondering why someone should add an extra build step to their documentation and also need to learn a new syntax when they already know HTML -- just because "Writing ____ in HTML is annoying."

Re: Vidola: building documentation

Posted: Fri Jul 13, 2012 2:43 pm
by koen.h
Christopher wrote:I guess I was wondering why someone should add an extra build step to their documentation and also need to learn a new syntax when they already know HTML -- just because "Writing ____ in HTML is annoying."
Hehe, I prefer this extra build step to be done programatically and not manually by typing "<" everytime. The extra build step is either using Vidola , or manually writing HTML around the documentation and converting entities when writing about PHP and/or HTML. I think in both ways this step is done.

That brings me to the second argument. I believe learning (and how much is there to learn?) Markdown is worth the effort compared to a lifetime of converting entities within code tags.

Re: Vidola: building documentation

Posted: Fri Jul 13, 2012 3:35 pm
by Christopher
Ok ... I am just pestering you to see how strong you reasons are. It looks like an interesting library. Have you separated the pure Markdown parser from the documentation part so it can be used stand-alone?

Re: Vidola: building documentation

Posted: Sat Jul 14, 2012 3:46 am
by koen.h
Yes it is separated:

https://github.com/koenhoeymans/Vidola/ ... placer.php

It uses a list of patterns, pre/post processors to get the job done. So it is customizable also. I decided on using the power of PHP DOM. Disadvantages of this approach were that it does nasty thing with entities on moments you don't want it. The speed of processing is probably also very very low.

Re: Vidola: building documentation

Posted: Mon Dec 10, 2012 6:00 am
by koen.h
For those interested: the Markdown parser will live in its own repo. Started the founding work for that.

https://github.com/koenhoeymans/AnyMark

Re: Vidola: building documentation

Posted: Mon Dec 10, 2012 10:14 pm
by Christopher
Just looked at the code a little. Does AnyMark need a dependency on Fjor? Or is there another way to achieve this outside of AnyMark?

Re: Vidola: building documentation

Posted: Tue Dec 11, 2012 1:33 am
by koen.h
Christopher wrote:Just looked at the code a little. Does AnyMark need a dependency on Fjor? Or is there another way to achieve this outside of AnyMark?
It does need Fjor. It would not be much work to wire it by hand and add this as an option. However, Fjor is also used for instantiating the patterns. I don't know if anyone could be bothered to create these manually and add them to the \AnyMark\Pattern\PatternList.

Re: Vidola: building documentation

Posted: Thu Dec 20, 2012 2:13 pm
by koen.h
Christopher wrote:Just looked at the code a little. Does AnyMark need a dependency on Fjor? Or is there another way to achieve this outside of AnyMark?
I've added to possibility to install through composer. Maybe that makes it easier not to care about Fjor since that is taken care of automatically by composer.

https://packagist.org/packages/anymark/anymark

edit:

Code: Select all

require 'vendor/autoload.php';

$text = '**a**';

$am = \AnyMark\AnyMark::setup()->get('AnyMark\\AnyMark');

var_dump($am->saveXml($am->parse($text)));