[Phpfreechat-svn] SF.net SVN: phpfreechat: [1163] trunk/misc/generate-doc-from-svn.php
Status: Beta
Brought to you by:
kerphi
|
From: <ke...@us...> - 2007-08-29 20:02:48
|
Revision: 1163
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1163&view=rev
Author: kerphi
Date: 2007-08-29 13:02:51 -0700 (Wed, 29 Aug 2007)
Log Message:
-----------
Add a script to generate parameters documentation from the latest commited pfcglobalconfig.class.php in the svn. (work in progress)
Added Paths:
-----------
trunk/misc/generate-doc-from-svn.php
Added: trunk/misc/generate-doc-from-svn.php
===================================================================
--- trunk/misc/generate-doc-from-svn.php (rev 0)
+++ trunk/misc/generate-doc-from-svn.php 2007-08-29 20:02:51 UTC (rev 1163)
@@ -0,0 +1,36 @@
+<?php
+echo '<pre>';
+
+$f = 'https://phpfreechat.svn.sourceforge.net/svnroot/phpfreechat/trunk/src/pfcglobalconfig.class.php';
+$data = file_get_contents($f);
+
+$offset = 0;
+preg_match('/class pfcGlobalConfig/',$data,$matches, PREG_OFFSET_CAPTURE, $offset);
+$offset = $matches[0][1];
+
+if (preg_match('/\/\*\*/', $data, $matches1, PREG_OFFSET_CAPTURE, $offset))
+{
+ // debut de commentaire
+ $offset1 = $matches1[0][1];
+ print_r($matches);
+}
+if (preg_match('/\*\s(.*)/', $data, $matches2, PREG_OFFSET_CAPTURE, $offset))
+{
+ // dans le commentaire
+ $offset2 = $matches2[1][1];
+ print_r($matches);
+}
+if (preg_match('/\*\//', $data, $matches3, PREG_OFFSET_CAPTURE, $offset))
+{
+ // fin de commentaire
+ $offset3 = $matches3[0][1];
+ print_r($matches);
+}
+if (preg_match('/var\s+\$([a-z]+)\s+=\s+(.*);/i', $data, $matches4, PREG_OFFSET_CAPTURE, $offset))
+{
+ // analyse du parametre
+ $offset4 = $matches4[1][1];
+ print_r($matches);
+}
+
+?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|