[ http://issues.apache.org/jira/browse/FOR-328?page=all ]

Ross Gardler updated FOR-328:
-----------------------------

      Component: Core operations
    Description: 
We have created an utility written in Ant (see attachment) to automatically 
build a site using forrest.
The utility automatically create site.xml and tabs.xml based on the given 
filesystem path, its structure and content.

How we use it:
The real first time we run "forrest seed" as described in 
<http://forrest.apache.org/docs/your-project.html>
We then make our changes ( in our case we use CVS to check-in our updates and 
keep the versioning)

A periodic build gets called to upload the latest documentation files (from 
CVS) and run this utility to create site.xml and tabs.xml necessary to run 
forrest.

This way content writers have their work published automatically, a sort of 
simple automated publishing solution.

We find this utility very helpful and hope it is the same for you.
Please take into account we have tested the scripts only on a Windows 
environment using Forrest 0.6
We consider this utility as a starting point for an inspiration as improvements 
can be done and as well a better integration with Forrest.

Credits:
The inspiration came from this posting:
http://issues.apache.org/eyebrowse/ReadMsg?listId=248&msgNo=502

We have also noticed (after we wrote the utility!) some similarities to the 
libre project:
http://forrest.apache.org/docs/libre-intro.html

Looking forward to hear your feedback.

Fabio del Percio ([EMAIL PROTECTED]) and Bruno Fonzi ([EMAIL PROTECTED])

The package includes:

- Build.xml
Creates the site.xml and tabs.xml of a forrest site.
The build file can be located in any directory as it reads properties from 
site.properties. 
It calls createtabs.xml and createsite.xml.

- site.properties
site.properties is the property file for our build.

- createtabs.xml
Creates tabs.xml. It creates an "Home" tab and a new tab for each directory
present in the root directory.
The root ("Home") directory and each of this directories must contain an 
index.xml
file.

- createsite.xml
Creates the site.xml. It creates an xml <tag> for each directory present in the
root directory.
For each of this directories it calls the ant file setSubTags.xml and 
setSubTagsRecursive.xml.

- setSubTags.xml and setSubTagsRecursive.xml
They generate links for each file found in the directory, creates a subdir tag
for each folder found in the directory and repeat recursively the same task for
these directories.
setSubTags.xml and setSubTagsRecursive.xml are actually the exact copy of each 
other.
It was necessary to duplicate the two scripts as ANT does not support recursive 
calls.
If anyone has a better solution I would be happy to hear from you.


Requirements:
Ant v. 1.6.x
And ant-contrib-1.0b1.jar 
http://sourceforge.net/projects/ant-contrib

  was:
We have created an utility written in Ant (see attachment) to automatically 
build a site using forrest.
The utility automatically create site.xml and tabs.xml based on the given 
filesystem path, its structure and content.

How we use it:
The real first time we run "forrest seed" as described in 
<http://forrest.apache.org/docs/your-project.html>
We then make our changes ( in our case we use CVS to check-in our updates and 
keep the versioning)

A periodic build gets called to upload the latest documentation files (from 
CVS) and run this utility to create site.xml and tabs.xml necessary to run 
forrest.

This way content writers have their work published automatically, a sort of 
simple automated publishing solution.

We find this utility very helpful and hope it is the same for you.
Please take into account we have tested the scripts only on a Windows 
environment using Forrest 0.6
We consider this utility as a starting point for an inspiration as improvements 
can be done and as well a better integration with Forrest.

Credits:
The inspiration came from this posting:
http://issues.apache.org/eyebrowse/ReadMsg?listId=248&msgNo=502

We have also noticed (after we wrote the utility!) some similarities to the 
libre project:
http://forrest.apache.org/docs/libre-intro.html

Looking forward to hear your feedback.

Fabio del Percio ([EMAIL PROTECTED]) and Bruno Fonzi ([EMAIL PROTECTED])

The package includes:

- Build.xml
Creates the site.xml and tabs.xml of a forrest site.
The build file can be located in any directory as it reads properties from 
site.properties. 
It calls createtabs.xml and createsite.xml.

- site.properties
site.properties is the property file for our build.

- createtabs.xml
Creates tabs.xml. It creates an "Home" tab and a new tab for each directory
present in the root directory.
The root ("Home") directory and each of this directories must contain an 
index.xml
file.

- createsite.xml
Creates the site.xml. It creates an xml <tag> for each directory present in the
root directory.
For each of this directories it calls the ant file setSubTags.xml and 
setSubTagsRecursive.xml.

- setSubTags.xml and setSubTagsRecursive.xml
They generate links for each file found in the directory, creates a subdir tag
for each folder found in the directory and repeat recursively the same task for
these directories.
setSubTags.xml and setSubTagsRecursive.xml are actually the exact copy of each 
other.
It was necessary to duplicate the two scripts as ANT does not support recursive 
calls.
If anyone has a better solution I would be happy to hear from you.


Requirements:
Ant v. 1.6.x
And ant-contrib-1.0b1.jar 
http://sourceforge.net/projects/ant-contrib

      Assign To:     (was: Ross Gardler)

I've done some experiments with XInclude and a directory generator to create 
this same effect. You have:

<site>
  ...
  <xi:include src="cocoon://DIRECTORY-site-snippet"/>
</site>

then you have:

<map:match "*-site-snippet">
  <map:generate type="dir" src="{lm:{1}}"/>
  <map:transform src="directory2site.xml"/>
  <map:serialize type="xml"/>
</map:match>

This works to an extend. If you add a file to the directory it is not picked up 
until you restart Forrest. I suspect that it is a caching issue with the 
directoryGenerator.

> Filesystem Automated Publishing Utility
> ---------------------------------------
>
>          Key: FOR-328
>          URL: http://issues.apache.org/jira/browse/FOR-328
>      Project: Forrest
>         Type: New Feature
>   Components: Core operations
>  Environment: OS independent, Ant v. 1.6.x, ant-contrib-1.0b1.jar
>     Reporter: Fonzi
>     Priority: Minor
>  Attachments: forrestbuild.zip, forrestbuild0.2.zip
>
> We have created an utility written in Ant (see attachment) to automatically 
> build a site using forrest.
> The utility automatically create site.xml and tabs.xml based on the given 
> filesystem path, its structure and content.
> How we use it:
> The real first time we run "forrest seed" as described in 
> <http://forrest.apache.org/docs/your-project.html>
> We then make our changes ( in our case we use CVS to check-in our updates and 
> keep the versioning)
> A periodic build gets called to upload the latest documentation files (from 
> CVS) and run this utility to create site.xml and tabs.xml necessary to run 
> forrest.
> This way content writers have their work published automatically, a sort of 
> simple automated publishing solution.
> We find this utility very helpful and hope it is the same for you.
> Please take into account we have tested the scripts only on a Windows 
> environment using Forrest 0.6
> We consider this utility as a starting point for an inspiration as 
> improvements can be done and as well a better integration with Forrest.
> Credits:
> The inspiration came from this posting:
> http://issues.apache.org/eyebrowse/ReadMsg?listId=248&msgNo=502
> We have also noticed (after we wrote the utility!) some similarities to the 
> libre project:
> http://forrest.apache.org/docs/libre-intro.html
> Looking forward to hear your feedback.
> Fabio del Percio ([EMAIL PROTECTED]) and Bruno Fonzi ([EMAIL PROTECTED])
> The package includes:
> - Build.xml
> Creates the site.xml and tabs.xml of a forrest site.
> The build file can be located in any directory as it reads properties from 
> site.properties. 
> It calls createtabs.xml and createsite.xml.
> - site.properties
> site.properties is the property file for our build.
> - createtabs.xml
> Creates tabs.xml. It creates an "Home" tab and a new tab for each directory
> present in the root directory.
> The root ("Home") directory and each of this directories must contain an 
> index.xml
> file.
> - createsite.xml
> Creates the site.xml. It creates an xml <tag> for each directory present in 
> the
> root directory.
> For each of this directories it calls the ant file setSubTags.xml and 
> setSubTagsRecursive.xml.
> - setSubTags.xml and setSubTagsRecursive.xml
> They generate links for each file found in the directory, creates a subdir tag
> for each folder found in the directory and repeat recursively the same task 
> for
> these directories.
> setSubTags.xml and setSubTagsRecursive.xml are actually the exact copy of 
> each other.
> It was necessary to duplicate the two scripts as ANT does not support 
> recursive calls.
> If anyone has a better solution I would be happy to hear from you.
> Requirements:
> Ant v. 1.6.x
> And ant-contrib-1.0b1.jar 
> http://sourceforge.net/projects/ant-contrib

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to