PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Nov 28, 2014 8:09 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Thu Jul 12, 2012 1:41 pm 
Offline
Forum Contributor

Joined: Sat May 03, 2008 8:43 am
Posts: 268
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. :)


Top
 Profile  
 
PostPosted: Thu Jul 12, 2012 3:48 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 12697
Location: New York, NY, US
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?

_________________
(#10850)


Top
 Profile  
 
PostPosted: Thu Jul 12, 2012 11:41 pm 
Offline
Forum Contributor

Joined: Sat May 03, 2008 8:43 am
Posts: 268
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.


Top
 Profile  
 
PostPosted: Fri Jul 13, 2012 12:48 pm 
Offline
Forum Contributor

Joined: Sat May 03, 2008 8:43 am
Posts: 268
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.


Top
 Profile  
 
PostPosted: Fri Jul 13, 2012 2:14 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 12697
Location: New York, NY, US
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."

_________________
(#10850)


Top
 Profile  
 
PostPosted: Fri Jul 13, 2012 2:43 pm 
Offline
Forum Contributor

Joined: Sat May 03, 2008 8:43 am
Posts: 268
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.


Top
 Profile  
 
PostPosted: Fri Jul 13, 2012 3:35 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 12697
Location: New York, NY, US
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?

_________________
(#10850)


Top
 Profile  
 
PostPosted: Sat Jul 14, 2012 3:46 am 
Offline
Forum Contributor

Joined: Sat May 03, 2008 8:43 am
Posts: 268
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.


Top
 Profile  
 
PostPosted: Mon Dec 10, 2012 7:00 am 
Offline
Forum Contributor

Joined: Sat May 03, 2008 8:43 am
Posts: 268
For those interested: the Markdown parser will live in its own repo. Started the founding work for that.

https://github.com/koenhoeymans/AnyMark


Top
 Profile  
 
PostPosted: Mon Dec 10, 2012 11:14 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 12697
Location: New York, NY, US
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?

_________________
(#10850)


Top
 Profile  
 
PostPosted: Tue Dec 11, 2012 2:33 am 
Offline
Forum Contributor

Joined: Sat May 03, 2008 8:43 am
Posts: 268
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.


Top
 Profile  
 
PostPosted: Thu Dec 20, 2012 3:13 pm 
Offline
Forum Contributor

Joined: Sat May 03, 2008 8:43 am
Posts: 268
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:

Syntax: [ Download ] [ Hide ]
require 'vendor/autoload.php';

$text = '**a**';

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

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group