From ehuelsmann at common-lisp.net Tue Jun 10 19:10:36 2008 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Tue, 10 Jun 2008 15:10:36 -0400 (EDT) Subject: [py-configparser-cvs] r38 - public_html Message-ID: <20080610191036.7B36A69006@common-lisp.net> Author: ehuelsmann Date: Tue Jun 10 15:10:35 2008 New Revision: 38 Modified: public_html/index.shtml Log: Add reference to the project mailing list page. Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Tue Jun 10 15:10:35 2008 @@ -34,7 +34,7 @@

Contact

You can reach the developer(s) at the development list: - py-configparser-devel at common-lisp.net

+ py-configparser-devel at common-lisp.net

Examples:



From ehuelsmann at common-lisp.net  Tue Jun 10 20:46:09 2008
From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net)
Date: Tue, 10 Jun 2008 16:46:09 -0400 (EDT)
Subject: [py-configparser-cvs] r39 - public_html
Message-ID: <20080610204609.A8DCF6308A@common-lisp.net>

Author: ehuelsmann
Date: Tue Jun 10 16:46:08 2008
New Revision: 39

Added:
   public_html/api-docs.shtml   (contents, props changed)
Modified:
   public_html/index.shtml
   public_html/style.css   (props changed)
Log:
Add API docs (with references from the project page) and a new style sheet.

Added: public_html/api-docs.shtml
==============================================================================
--- (empty file)
+++ public_html/api-docs.shtml	Tue Jun 10 16:46:08 2008
@@ -0,0 +1,208 @@
+
+
+
+
+  py-configparser API documentation
+  
+  
+  
+
+
+
+
+
+

py-configparser API documentation

+ +

$Id$
+ Work in progress.

+ +

Please note that we're committed to supporting the same + interface as the ConfigParser module, with exceptions. + The exceptions are mostly related to maintenance of ordering + of sections and options: whereas the Python module doesn't maintain + the order encountered in the file, this implementation does.

+ + +

Functions for creation and manipulation of configurations

+ +
+
make-config + &key default sections option-name-transform-fn + section-name-transform-fn => config
+ +
+

Creates a config structure used as in-memory storage of the + configuration.

+ +

The default and sections arguments should not be + used and may + be removed in newer releases. The option-name-transform-fn and + section-name-transform-fn arguments are to be functions used to + normalise section and option names. The default value for the former + is #'string-downcase, while the default for the latter is #'identity. +

+ +
+defaults config => alist
+

Returns a of dotted lists where the car is the key and the + cdr the associated value. +

+ +
+sections config => list
+

Returns a list of section names, excluding the default section.

+ +
+has-section-p config section-name + => generalised boolean
+

Returns NIL if the specified section is not contained in the + config object. A non-NIL value is returned otherwise.

+ +

The transformation functions are applied to the section name.

+ +
+add-section config section-name
+

Adds a new section to the config object.

+ +

If the section already exists, a "duplicate-section-error" + is raised.

+

The transformation functions are applied to the section name + before checking for duplicates.

+ +
+options config section-name + => unspecified
+

Returns the list of options which are defined for the specified + section.

+

The transformation functions are applied to section-name.

+ +
+has-option-p + config section-name option-name => generalised boolean
+

Returns NIL when the specified option does not exist within the + specified section of the config object. A non-NIL value is returned + otherwise.

+ +

The transformation functions are applied to section-name and + option-name.

+ +
+get-option config section-name + option-name &key expand defaults type => value
+

Returns the value of the specified option with type "type", + if specified. Values which contain interpolations are expanded by default, + but this behaviour can be turned off by passing NIL for "expand". +

+ +

Defaults may be provided for interpolated values by passing an alist + for "defaults", where the car specifies the %()s argument + name and the cdr specifies the value to be used in its place.

+ +

The transformation functions are applied to section-name and + option-name.

+ +
+set-option config section-name + option-name value => unspecified
+

Sets the value of the specified option in the specified section + of the config object.

+ +

If the section does not exist, a "no-section-error" is + raised. If the option does not exist, it's created.

+ +
+items config section-name + &key expand defaults => alist
+

Returns an alist of items of the specified section of the given config + object. By default, values are expanded, using "defaults" when + given. The format of defaults is the same as for get-option.

+ +

The transformation functions are applied to the section name.

+ +

To disable expansion of the values, you need to specify NIL for + "expand".

+ +
+remove-option config section-name + option-name => unspecified
+

Removes the specified option from the given section of the config + object.

+ +
+remove-section config section-name + => unspecified
+

Removes the specified section from the config object.

+

If the default section ("DEFAULT") is specified, + an error is raised, because it can't be removed.

+ +
+read-files config filenames => list
+

Reads the files in the filenames list, incrementally adding and + overwriting values in the config object.

+ +

Returns the list of files succesfully read. Note however that + files can only be succesfully skipped by non-existance. If an error + occurs while parsing one of the files, further reading will be + aborted, raising the error instead.

+ +
+read-stream config stream + &key stream-name => config
+

Returns the config object with the sections and options read from + the stream overwriting any pre-existing values.

+

All characters on the stream are read. If an error occurs, + processing stops and the error is raised.

+ +
+ +

Classes

+ +

none

+ +

Variables / constants

+ +

none

+ +

Conditions

+ +

To be documented

+ +

How do I ...

+ +

To be written

+ + +
+Back to Common-lisp.net. +
+
+ Valid XHTML 1.0 Strict +
+ + Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Tue Jun 10 16:46:08 2008 @@ -36,6 +36,19 @@

You can reach the developer(s) at the development list: py-configparser-devel at common-lisp.net

+

API description

+ +

There's a separate page describing the + package public API. + +

Source code online

+ +

The sources for releases may be downloaded (see below); the + current (active) development may be browsed online + through the WebSVN service.

+

Examples:

 


From ehuelsmann at common-lisp.net  Tue Jun 10 20:48:18 2008
From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net)
Date: Tue, 10 Jun 2008 16:48:18 -0400 (EDT)
Subject: [py-configparser-cvs] r40 - public_html
Message-ID: <20080610204818.0CE736308A@common-lisp.net>

Author: ehuelsmann
Date: Tue Jun 10 16:48:17 2008
New Revision: 40

Modified:
   public_html/index.shtml
Log:
XHTML compliance fix.

Modified: public_html/index.shtml
==============================================================================
--- public_html/index.shtml	(original)
+++ public_html/index.shtml	Tue Jun 10 16:48:17 2008
@@ -39,7 +39,7 @@
  

API description

There's a separate page describing the - package public API. + package public API.

Source code online

From ehuelsmann at common-lisp.net Tue Jun 10 20:50:45 2008 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Tue, 10 Jun 2008 16:50:45 -0400 (EDT) Subject: [py-configparser-cvs] r41 - public_html Message-ID: <20080610205045.D5F4B6D07A@common-lisp.net> Author: ehuelsmann Date: Tue Jun 10 16:50:45 2008 New Revision: 41 Modified: public_html/api-docs.shtml Log: Another XHTML compliance fix. Modified: public_html/api-docs.shtml ============================================================================== --- public_html/api-docs.shtml (original) +++ public_html/api-docs.shtml Tue Jun 10 16:50:45 2008 @@ -53,7 +53,7 @@
make-config - &key default sections option-name-transform-fn + &key default sections option-name-transform-fn section-name-transform-fn => config
@@ -114,7 +114,7 @@
get-option config section-name - option-name &key expand defaults type => value
+ option-name &key expand defaults type => value

Returns the value of the specified option with type "type", if specified. Values which contain interpolations are expanded by default, but this behaviour can be turned off by passing NIL for "expand". @@ -138,7 +138,7 @@

items config section-name - &key expand defaults => alist
+ &key expand defaults => alist

Returns an alist of items of the specified section of the given config object. By default, values are expanded, using "defaults" when given. The format of defaults is the same as for get-option.

@@ -173,7 +173,7 @@
read-stream config stream - &key stream-name => config
+ &key stream-name => config

Returns the config object with the sections and options read from the stream overwriting any pre-existing values.

All characters on the stream are read. If an error occurs, From ehuelsmann at common-lisp.net Sat Jun 14 08:11:02 2008 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Sat, 14 Jun 2008 04:11:02 -0400 (EDT) Subject: [py-configparser-cvs] r42 - trunk Message-ID: <20080614081102.3B0C41B01A@common-lisp.net> Author: ehuelsmann Date: Sat Jun 14 04:11:01 2008 New Revision: 42 Modified: trunk/parser.lisp Log: Fix missing files treatment (by ignoring them). Found by: Ury Marshak Modified: trunk/parser.lisp ============================================================================== --- trunk/parser.lisp (original) +++ trunk/parser.lisp Sat Jun 14 04:11:01 2008 @@ -190,7 +190,7 @@ Returns as values the configuration and the list of files actually read." (let (files-read) - (dolist (filename (mapcar #'probe-file filenames) + (dolist (filename (remove-if-not #'probe-file filenames) (values config files-read)) (with-open-file (s filename :direction :input From ehuelsmann at common-lisp.net Fri Jun 20 21:58:54 2008 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Fri, 20 Jun 2008 17:58:54 -0400 (EDT) Subject: [py-configparser-cvs] r43 - branches/1.0.x Message-ID: <20080620215854.B3FF7191BF@common-lisp.net> Author: ehuelsmann Date: Fri Jun 20 17:58:52 2008 New Revision: 43 Modified: branches/1.0.x/parser.lisp Log: Backport r42 (Fix missing files treatment) from trunk. Modified: branches/1.0.x/parser.lisp ============================================================================== --- branches/1.0.x/parser.lisp (original) +++ branches/1.0.x/parser.lisp Fri Jun 20 17:58:52 2008 @@ -190,7 +190,7 @@ Returns as values the configuration and the list of files actually read." (let (files-read) - (dolist (filename (mapcar #'probe-file filenames) + (dolist (filename (remove-if-not #'probe-file filenames) (values config files-read)) (with-open-file (s filename :direction :input From ehuelsmann at common-lisp.net Fri Jun 20 22:04:32 2008 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Fri, 20 Jun 2008 18:04:32 -0400 (EDT) Subject: [py-configparser-cvs] r45 - branches/1.0.x Message-ID: <20080620220432.98B7647005@common-lisp.net> Author: ehuelsmann Date: Fri Jun 20 18:04:29 2008 New Revision: 45 Modified: branches/1.0.x/py-configparser.asd Log: Bump version number. Modified: branches/1.0.x/py-configparser.asd ============================================================================== --- branches/1.0.x/py-configparser.asd (original) +++ branches/1.0.x/py-configparser.asd Fri Jun 20 18:04:29 2008 @@ -10,7 +10,7 @@ (defsystem py-configparser :name "py-configparser" :author "Erik Huelsmann" - :version "1.0.3-dev" + :version "1.0.4-dev" :license "MIT" :description "Common Lisp implementation of the Python ConfigParser module" :depends-on (#:parse-number) From ehuelsmann at common-lisp.net Fri Jun 20 22:04:07 2008 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Fri, 20 Jun 2008 18:04:07 -0400 (EDT) Subject: [py-configparser-cvs] r44 - tags/1.0.3 Message-ID: <20080620220407.A83A91136@common-lisp.net> Author: ehuelsmann Date: Fri Jun 20 18:04:04 2008 New Revision: 44 Added: tags/1.0.3/ (props changed) - copied from r42, branches/1.0.x/ tags/1.0.3/parser.lisp - copied unchanged from r43, branches/1.0.x/parser.lisp Modified: tags/1.0.3/py-configparser.asd Log: Tag 1.0.3. Modified: tags/1.0.3/py-configparser.asd ============================================================================== --- branches/1.0.x/py-configparser.asd (original) +++ tags/1.0.3/py-configparser.asd Fri Jun 20 18:04:04 2008 @@ -10,7 +10,7 @@ (defsystem py-configparser :name "py-configparser" :author "Erik Huelsmann" - :version "1.0.3-dev" + :version "1.0.3" :license "MIT" :description "Common Lisp implementation of the Python ConfigParser module" :depends-on (#:parse-number) From ehuelsmann at common-lisp.net Fri Jun 20 22:11:39 2008 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Fri, 20 Jun 2008 18:11:39 -0400 (EDT) Subject: [py-configparser-cvs] r46 - in public_html: . releases Message-ID: <20080620221139.D556E81000@common-lisp.net> Author: ehuelsmann Date: Fri Jun 20 18:11:39 2008 New Revision: 46 Added: public_html/releases/py-configparser-1.0.3.tar.gz (contents, props changed) Modified: public_html/index.shtml Log: Publish 1.0.3. Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Fri Jun 20 18:11:39 2008 @@ -66,6 +66,7 @@

Releases

+

The 1.0.3 release fixes the behaviour where READ-FILES was supposed to ignore non-existing files.

The 1.0.2 release fixes a function name typo, a problem with (non-)expansion in the ITEMS function and the return value of ENSURE-SECTION.

The 1.0.1 release fixes compilation problems with at least SBCL and a packaging problem. Next to that, it adds better error messages.

The 1.0 release can be downloaded from http://common-lisp.net/project/py-configparser/releases/py-configparser-1.0.tar.gz

Added: public_html/releases/py-configparser-1.0.3.tar.gz ============================================================================== Binary file. No diff available.