News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Blue Parabola Blog:
On Writing CDC
March 27, 2009 @ 10:24:50

On the Blue Parabola blog Matthew Turland has written up a post about working with the CDC, the Ceres Document Checker - a project he's developed to check documents based on the Ceres document format.

If you've written or done editing for php|architect before, you're probably familiar with the custom markup format they use called Ceres, which looks a bit like Markdown. Both articles and books use it, though each has slightly different formatting requirements. Some of these requirements can be tedious to check for and easy to miss. As much as I've been working with documents in the format, I decided to write a tool to help me out.

He outlines the requirements he wanted to follow including that it could be run from the command line, that it could detect code blocks, it could perform lint checks on the code samples and it could give a rough word count excluding code. He also includes his three methods for processing - finding a file and checking it, recursing through a directory and finding files matching a regular expression.

Files are pulled in and processed line-by-line until a code block is reached. This is processed via a regular expression and the script continues on. If you're interested in the code, you can check out the latest version from the project's github page. There's also a TextMate bundle (written by Davey Shafik) for those users of the TextMate editor.

0 comments voice your opinion now!
ceres doucment checker project github process


blog comments powered by Disqus

Similar Posts

IBM developerWorks: Batch processing in PHP

CodeIgniter Blog: CodeIgniter Community Voice - HOWTO: Set up a CodeIgniter project in Subversion

Community News: Web-based Frontend for XDebuxg - Webgrind

QaFoo Blog: Tracking Changes in PHP Projects

Software Gunslinger: PHP is meant to die, continued


Community Events





Don't see your event here?
Let us know!


podcast language testing developer release wordpress interview install refactor framework configure code community laravel opinion threedevsandamaybe list introduction unittest series

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework