wiki:AdvParseArgsPlugin

Version 3 (modified by martin_s, 6 years ago) (diff)

--

Advanced Argument Parser for Trac Macros

Description

This plug-in provides an advanced version of the parse_args function for Trac macros.

Documentation

(pending)

Parameters

args
The argument string; 'content' in `expand_macro.
strict
Enables strict checking of keys.
multi
Enables folding of muliple given keys into list.
If set to True, values of multiple given keys will be returned as list, but single given keys will return a scalar.
If set to a list, only the values of the listed keys will be returned as list, but always as list even when there is only one value.
If this list contains '*', all values are always returned as list.
listonly
If true only a list is returned, no directionary.
minlen
Extend returned list to given minimum length. Only used when listonly=True.

Parser parameters

quotechar
The quote character to be used.
escchar
The escape character to be used.
delim
The delimiter character to be used.
delquotes
Selects if quotes should be removed.

Bugs/Feature Requests

Existing bugs and feature requests for AdvParseArgsPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

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

Example

from tracadvparseargs import parse_args

Recent Changes

[13612] by rjollos on 2014-01-24 01:45:47
Changed license to BSD 3-Clause with permission of author (comment:1:ticket:11500). Fixes #11500.
[8541] by martin_s on 2010-08-30 23:57:20
Added encoding meta-comment and declared SVN keywords as unicode to avoid issues with non-english locales.
[8416] by martin_s on 2010-08-23 13:11:20
Removed outdated variable rev from setup file.

Author/Contributors

Author: martin_s
Contributors: