publish_examples("http://tmate.org/svn"); function publish_examples($url){ $docURL = "http://72.9.228.230:8080/svn/jsvn/branches/0.9.0/doc/examples/src/org/tmatesoft/svn/examples"; $examplesPath = array($docURL."/repository/",$docURL."/wc/"); $packageDescription = array(); $packageDescription[$examplesPath[0]] = "
This package contains examples on how to use a low-level API from the org.tmatesoft.svn.core.io ". "package to work directly with a repository. ". "The major point of this API - the SVNRepository class which provides a developer the interface ". "to interact with a repository. Note that the low-level API itself knows nothing about working copies, ". "it only allows you to work with a Subversion repository."; $packageDescription[$examplesPath[1]] = "
This package contains examples on how to use a high-level API from the org.tmatesoft.svn.core.wc package ". "to manage working copies. Each command of the native Subversion command line client is reflected in SVN*Client ". "classes. These \"clients\" relies upon the low-level API (org.tmatesoft.svn.core.io) when an access to a repository is needed."; $result = array(); for($k = 0; $k < count($examplesPath); $k++){ $result[$examplesPath[$k]] = collect_examples($examplesPath[$k]); } if(count($result)<1){ return $url; } $examplesListFrameFile = $_SERVER["DOCUMENT_ROOT"] . "/svn/examples/ExamplesList.html"; $fhandle = fopen($examplesListFrameFile, "w+"); fwrite($fhandle, "
".
"The following examples may help you
".
"to become more familiar with the
".
"JavaSVN API:
");
for($k = 0; $k < count($examplesPath); $k++) {
$matches = array();
$exampleDirectory = $examplesPath[$k];
if(ereg("org/tmatesoft/svn/examples/[^/]+", $examplesPath[$k], $matches)){
$exampleDirectory = str_replace("/", ".", $matches[0]);
}
fwrite($fhandle, "