wiki:IniFileStreamEditorScript

Edit ini style files en masse

Description

This inised script can update the trac.ini file for the Trac environments at the command line. It is written in Python and depends just on ConfigObj - you will find it at in Debian/Ubuntu: package python-ponfigobj.

You can edit every ini-style file. inised can also remove keys from sections, but an empty sections will stay left.

Bugs/Feature Requests

Existing bugs and feature requests for IniFileStreamEditorScript are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out IniFileStreamEditorScript from here using Subversion, or browse the source with Trac.

Example

The syntax for inised is as follows:

inised <file.ini> <add-key|remove-key> <section> <key> <value>

In a script it can be used as follows:

for file in */conf/trac.ini ; do \
     inised $file add-key components iniadmin.iniadmin.iniadminplugin enabled \
done

Examples:

inised conf/trac.ini add-key components iniadmin.iniadmin.iniadminplugin enabled
inised conf/trac.ini remove-key components iniadmin.iniadmin.iniadminplugin enabled

Recent Changes

2307 by tac on 2007-06-15 00:26:19
IniFileStreamEditorScript:

initial release

2306 by tac on 2007-06-15 00:20:17
New hack IniFileStreamEditorScript, created by tac
(more)

Author/Contributors

Author: tac
Maintainer: tac
Contributors:

Last modified 8 months ago Last modified on Nov 9, 2015, 2:32:27 PM