<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 22 May 2013 22:16:03 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Blue Parabola Blog:  On Writing CDC]]></title>
      <guid>http://www.phpdeveloper.org/news/12223</guid>
      <link>http://www.phpdeveloper.org/news/12223</link>
      <description><![CDATA[<p>
On the Blue Parabola blog <i>Matthew Turland</i> has <a href="http://blueparabola.com/blog/writing-cdc">written up a post</a> about working with the CDC, the <a href="http://github.com/elazar/cdc/tree/master">Ceres Document Checker</a> - a project he's developed to check documents based on the <a href="http://phparch.com/c/phpa/magazine/about/authors,how_the_system_works">Ceres document format</a>.
</p>
<blockquote>
If you've written or done editing for php|architect before, you're probably familiar with the custom markup format they use called <a href="http://phparch.com/c/phpa/magazine/about/authors,how_the_system_works">Ceres</a>, which looks a bit like <a href="http://en.wikipedia.org/wiki/Markdown">Markdown</a>. Both <a href="http://phparch.com/c/phpa/magazine/about/authors,magazine_articles">articles</a> and <A href="http://phparch.com/c/phpa/magazine/about/authors,book_chapters">books</a> 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.
</blockquote>
<p>
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. 
</p>
<p>
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 <a href="http://github.com/elazar/cdc/tree/master">the project's github page</a>. There's also a <a href="http://pixelated-dreams.com/archives/459-phparchitects-ceres-syntax-textmate-bundle.html">TextMate bundle</a> (written by <i>Davey Shafik</i>) for those users of the TextMate editor.
</p>]]></description>
      <pubDate>Fri, 27 Mar 2009 10:24:50 -0500</pubDate>
    </item>
  </channel>
</rss>
