Red Hat Bugzilla – Bug 799821
0.22.0 Release Tracker
Last modified: 2013-06-06 21:31:26 EDT
This release has a large amount of changes. It includes removing the server and redoing the client.
I've updated the CSProcessor to a new version (0.22.0). With this new Version there are a few major changes. The first being that there no longer is a CSProcessor server to connect to, the client now does all of the required actions. As such I'm afraid that none of your current configurations will work, however I've attached a basic example so all you'll have to do is put in your Username and base directory for content specs. Below is a list of changes, I'll explain the new commands afterwards.
Note: I'll update the Docspace page today so you can wait and read that if you prefer. I also believe Josh is going to update the CSProcessor Guide when he has the free time (I'll see what I can do to help him).
List of Changes:
- Rewrote the entire client from scratch.
- Added the Assemble Command.
- Added the Preview Command.
- Added the Create Command (used to be push -cn).
- Added the Checkout Command.
- Added the Status Command.
- Changed the Push Command so it now only pushes edited specs.
- Added the ability to create csprocessor.cfg files when you create a Content Specification on the server,
- Added the ability to read from csprocessor.cfg for all relevant commands.
- Made the push command update your local copy once the command finishes successfully.
- Made the pull command make a backup of your local Content Spec so you don't lose data.
- Added some shutdown mechanisms so that killing the program is much less likely to cause issues.
Content Spec Based:
- Added 4 new attributes:
Bug Links = (On|Off)
BZComponent = <COMPONENT>
BZProduct = <PRODUCT>
BZVersion = <VERSION>
Note: For JBoss and other brands that require the BUGZILLA information in the .ent file. The builder will first try to use these attributes and if they don't exist it will default back to the default which is the PRODUCT variable and "documentation" for the component.
- Removed the need for a CSProcessor Server you now can connect directly to Skynet.
- Added the pretty URL feature that Matt implemented to the builder.
- Made the builder read from the Bugzilla properties per topic or default back to the new CSP attributes.
- Added the ability to add new tags to existing topics.
- Fixed a few issues with Processes.
- Made processes able to be at the chapter level.
The client was rewritten because to be honest it was a mess. As such I've incorporated the functionality of Josh's scripts and extended them a little. The -c option is now default for all commands. The new functionality is described below.
With the addition of the csprocessor.cfg files I've added an option to the csprocessor.ini that lets you specify where all the content specifications will be created. If this is left blank then it will use your Current Working Directory.
The create command is used to create a Content Specification on a server. When you create a spec on the server the command will create a directory for the spec based on the root directory from csprocessor.ini. The directory will be the escaped name of the Content Specification. In the directory a local csprocessor.cfg file and post processed content specification will be created.
The syntax is pretty simple:"csprocessor create <FILE>" where file is the name and location of the file. ie "csprocessor create Content_Spec_Processor_Guide.txt"
While I doubt many will use this is, it is a valid option that should still be handy. The assemble command will Build a book (based on an ID) into a ZIP archive, save it, unzip the directory and then build it using publican. This command will either read ID from the csprocessor.cfg file in your current working directory or an ID passed via the command line. The place that the output is saved depends on if you pace an ID or use a csprocessor.cfg file. You can stop the building if you already have the zip file from a previous build by using the "--no-build" option.
If you use the csprocessor.cfg file then it will create the following directory structure:
If you pass an ID then it will use the following:
Note: You can alter the publican build parameters via the csprocessor.ini config file.
The preview command will do the same as the assemble command however it will open the html-single instance for previewing once it completes. You can stop the assembly by using the "--no-assemble" option. You can change which file is opened byt editing the "preview.format" options in the csprocessor.ini config file.
The checkout command lets you pull down a Content Specification that already exists and create the csprocessor.cfg and post processed content specification. This is done in the same way as the create command however it doesn't push anything to the server.
The status command checks to see if the local copy of the content specification is up to date with the copy on the server.
The push command will push an edited Content Specification to the server and if it is successful then it will update the local copy with the new checksum.
Note: This command will not create a new content specification anymore. Todo that you need to use the create command.
The pull command will pull a Content Specification from the server. This command really hasn't changed much with the exception of creating backups and also being able to read from a csprocessor.cfg file.
Multiple Servers in the csprocessor.ini:
The processor now allows for multiple server setups in the csprocessor.ini file. These can be used in a csprocessor.cfg (see below for an example) to specify the server that should be connected to for different content specifications. There must always be a default server setup as this is what is used when no Server is specified via the command line or csprocessor.cfg. In saying that though if a Server is specified in a csprocessor.cfg then it won't be matched to the default server settings. (You'll notice in my example below that the default is localhost however I have a local server setup as well)
# All content specs will get stored in this directory
root = /home/lnewson/csprocessor/
# The build parameters that publican should use when assembling
build.parameters = --langs=en-US --format=html-single,html
# The format that should be opened by the preview command
preview.format = html
# Default server settings
default.url = http://localhost:8080/TopicIndex/
default.username = lnewson
# Production server settings
production.url = http://skynet.cloud.lab.eng.bne.redhat.com:8080/TopicIndex/
# Test server settings
test.url = http://skynet.usersys.redhat.com:8080/TopicIndex/
# Local server settings with a different username the the default
local.url = http://localhost:8080/TopicIndex/
local.username = admin
A Sample csprocessor.cfg file:
Just as a side note if it helps you to remember the commands better they are based on an equilivancy to git/svn. eg:
| SVN | CSProcessor |
| import | create |
| checkout/export | checkout |
| update | pull |
| checkin | push |
If you have any questions don't hesitate to ask.
Update with release 0.22.1:
Version 0.22.0 didn't support Java SE6 due to the use of Named Capture Groups. As such I've replaced this functionality with the library at http://code.google.com/p/named-regexp/. This library did have a few bugs with non named capturing groups but I have fixed it up so this shouldn't cause any issues.
Closing and setting as current release as no QA was performed by the original reporter. If there is still an issue with this bug still than please re-open it.