WebGUI
      Click here to register.
      
irc://irc.freenode.net#webgui

iPhoneGuy: WebGUI is a pile of crap.
rizen: If WebGUI is such a pile of crap, why do you use it?
iPhoneGuy: Because it's the best pile of crap out there.

If this is what people who hate us are saying, imagine what people who love us will say. Come join us on IRC.

Change archive status op posts in batch

User: martink
Date: 3/28/2008 9:40 am
Views: 170
Rating: 3    Rate [
|
]

DESCRIPTION

This script allows you to archive and unarchive all posts in a user definable part of the asset tree. Additionally it is possible to set the archiveAfter flag of collaboration systems for entire parts of your site at once.

INSTALLATION

Copy csArchiver_pl.txt into your WebGUI sbin directory (if you run wre that is /data/WebGUI/sbin), rename it to csArchiver.pl. Run the script from the sbin directory.

USAGE

 csArchiver.pl - Batch process the archive properties of collaboration systems, posts and threads. 
Usage:

perl csArchiver.pl OPTIONS

Required options:

--configFile The webgui config file for the site you want to process.

Available commands (use one at at time):

--list Displays a list of all assets that are going to be affected by running
this script with another command.

--archive Archives all posts within the scope set by parentAssetId.

--unarchive Unarchives all posts within the scope set by parentAssetId.

--setArchivalPeriod Sets the archive after property of all colaboration systems in the scope.
Pass the desired period in the following format: NumUnit. Unit is either
'years', 'months', 'weeks', 'days', 'hours', 'minutes' or 'seconds' and
Num is the number of units you want the period to last. For example,
--setArchivalPeriod=1years sets the period to 1 year.

--doit This option is required when using --archive, --unarchive or
--setArchivalPeriod. Without it they will not execute.

Scope modifiers:

--parentAssetId Sets which part of your site is processed. These are all assets below and
including the asset belonging to the asset id you pass with this option.
If not given this option will default to the root and thus your entire site
will be processed.

--includePending If passed also pending assets will be processed. By default this script
only processes assets with 'approved' and 'archived' status.


Replies

Re: Change archive status op posts in batch
User: arjan
Date: 3/28/2008 9:54 am
Rating: 0    Rate [
|
]
Status: Approved

Great tool! I should have made it myself, because I've done this many times by hand.

And of course it would be great if - in a default install - Posts would not be archived. 

Kind regards,

Arjan Widlak

United Knowledge
Internet for the public sector

www.unitedknowledge.nl


Re: Change archive status op posts in batch
User: koen
Date: 3/31/2008 3:21 pm
Rating: -1    Rate [
|
]
Status: Approved

In relation to this I found these posts on the WebGUI site:

Very interesting posts to get a bit of an overview on how it all sticks together. 

Koen de Jonge - ProcoliX
http://www.procolix.com
Hosting - WebGUI - Virtualization


PreviousBackNext