15 Commits

Author SHA1 Message Date
Christian Berendt
d781310e04 [autogenerate_config_docs] use filename tags to mark filenames
According to the markup conventions the filename tag should be
used to mark filenames.

Change-Id: I658b060df81ac62d68e6aafe3db40d71cb7e79cb
2015-03-02 10:14:22 +01:00
Gauvain Pocentek
7a1046484b autohelp: don't specify encoding in the base xml
Specifying the encoding and working with unicode strings in not
supported in lxml. The BASE_XML string is only used to init the XML tree
and does not need a specific encoding. The utf-8 encoding is explicitely
added when the final XML is written to file.

Change-Id: I74e0a316cf718ad9768a690f8ccc4a1cc9a9fc7e
2015-01-31 12:26:14 +01:00
Tom Fifield
a2970b1d39 Add <option> tags to options in autogenerateconfig
By marking options as <option>option_name</option>, we get
more flexibility in how to handle them.

In particular, currently these thousands of automatically generated
options are polluting the translation's common resource.
Marking these strings as <option> might allow us to
say "don't translate this".

Change-Id: I0282545d1a2c3ca3d14a5c411c2f5457fbd09780
2014-12-31 16:17:20 +08:00
Gauvain Pocentek
ecc3744a72 Fix extract_swift_flags.py
The renaming of the swift-conf-changes.xml in the openstack-manual
repository broke a test in the extract_swift_flags.py script. This patch
changes the test to make the script work again.

Change-Id: I71b6960801163c2d2c52253d0c9a45ec2bf02b0d
2014-10-07 07:07:06 +02:00
Andreas Jaeger
ef07792647 Update XML root elements
Write our root elements in a consistent way.

Change-Id: I3f74cc7fd0346c44b2cf445bb4f8638af4c70e4b
2014-07-10 08:39:55 +02:00
Gauvain Pocentek
05fcf72428 Use lxml to handle the XML data
Use lxml to read/write the docbook data. This avoids dealing with
manually indented string.

Change-Id: Ia4e30105f5197214144a0391d0908c94a5397983
2014-06-29 19:41:56 +02:00
Gauvain Pocentek
30bd471792 extract_swift_flags.py: implement a 'dump' argument
This argument dumps the list of swift config options discovered by the
script. The options are stored as oslo.config options and the dump
format is the same as the autohelp dump format. The goal is to support
swift in the diff_branches.py script.

Part of the script as been refactored to first store the options, then
write/dump them, instead of doing both at the same time.

Change-Id: Ie11f0eb352c79b7a5126599adb96ac1307f2956f
2014-06-21 20:46:51 +02:00
Jenkins
cd10913a77 Merge "Bump hacking to 0.9.x series" 2014-06-17 15:28:30 +00:00
Gauvain Pocentek
cb214b9370 Provide CLI options for extract_swift_flags.py
3 options:
  - location of the swift repo
  - location of the manuals repo
  - verbosity

The defaults should be sane to use with the soon-to-be-updated
autohelp-wrapper.

Change-Id: I2395aa5c6bfdb30990ec7f930a9277cdef6d3777
2014-06-13 22:10:04 +02:00
Christian Berendt
d449a6bcd2 Bump hacking to 0.9.x series
Require at least 0.9.1 because 0.9.0. had a minor bug.

This change also fixes all found issues.

Rewrote some docstrings to fit H405.

Change-Id: Ifeef11b783dbe70b2652d2b9ea29d5b20f69f2ce
2014-06-12 09:17:22 +02:00
Christian Berendt
dfa10c5c5d fixed several pep8 issues
* E129 visually indented line with same indent as next logical line
  * E129 visually indented line with same indent as next logical line
  * E265 block comment should start with '# '
  * E713 test for membership should be 'not in'

Change-Id: I8488f7ad4399153d99325806fe87919c0b4cda7e
2014-05-17 08:37:07 +02:00
Gauvain Pocentek
8b6edc10fe extract_swift_flags: Improve the output
Since we need to edit the generated tables manually, a nicer
output will help a little. I hope...

Change-Id: I85222cb52d6f4ed2523729e7c31ddb7efaaab979
2014-04-25 23:21:10 +02:00
Gauvain Pocentek
5dcedd48d3 extract_swift_flags: fix the tables parsing
The code for parsing existing tables didn't find all the options because
of spaces and new lines. This patch should now handle those characters.

Change-Id: If6a5d8812e6e6f46e14944578cc5eb94d8374ccf
2014-04-25 23:07:50 +02:00
Andreas Jaeger
a742f8b023 Add period at end of help string
Use same style for our self-generated help string as we do for others
and add "." at end of them.

Change-Id: Iedd89712384fcb7c8900a22f99c7da49665048b9
2014-03-09 10:14:13 +01:00
Andreas Jaeger
b226f80820 Rename autogenerate-config-docs to autogenerate_config_docs
Minus signs are not allowed in python package names, thus rename the
directory.

Change-Id: Ie4b7cdff301673fdc0afe49c5b7211ee003871e5
2014-01-21 17:00:22 +01:00