Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
af1f8db5
Commit
af1f8db5
authored
Dec 25, 2013
by
Mikhail Sobolev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove trailing whitespaces
parent
a5e8e10b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
docsite/Makefile
+1
-1
hacking/module_formatter.py
+4
-4
hacking/templates/rst.j2
+1
-1
No files found.
docsite/Makefile
View file @
af1f8db5
...
...
@@ -27,6 +27,6 @@ clean:
.PHONEY
:
docs clean
modules
:
$(FORMATTER) ../hacking/templates/rst.j2
PYTHONPATH
=
../lib
$(FORMATTER)
-t
rst
--template-dir
=
../hacking/templates
--module-dir
=
../library
-o
rst/
PYTHONPATH
=
../lib
$(FORMATTER)
-t
rst
--template-dir
=
../hacking/templates
--module-dir
=
../library
-o
rst/
hacking/module_formatter.py
View file @
af1f8db5
...
...
@@ -146,7 +146,7 @@ def generate_parser():
p
.
add_option
(
"-M"
,
"--module-dir"
,
action
=
"store"
,
dest
=
"module_dir"
,
default
=
MODULEDIR
,
help
=
"Ansible library path"
)
p
.
add_option
(
"-T"
,
"--template-dir"
,
action
=
"store"
,
dest
=
"template_dir"
,
default
=
"hacking/templates"
,
help
=
"directory containing Jinja2 templates"
)
p
.
add_option
(
"-t"
,
"--type"
,
action
=
'store'
,
dest
=
'type'
,
choices
=
[
'html'
,
'latex'
,
'man'
,
'rst'
,
'json'
,
'markdown'
,
'js'
],
default
=
'latex'
,
help
=
"Document type"
)
p
.
add_option
(
"-v"
,
"--verbose"
,
action
=
'store_true'
,
default
=
False
,
help
=
"Verbose"
)
p
.
add_option
(
"-v"
,
"--verbose"
,
action
=
'store_true'
,
default
=
False
,
help
=
"Verbose"
)
p
.
add_option
(
"-o"
,
"--output-dir"
,
action
=
"store"
,
dest
=
"output_dir"
,
default
=
None
,
help
=
"Output directory for module files"
)
p
.
add_option
(
"-I"
,
"--includes-file"
,
action
=
"store"
,
dest
=
"includes_file"
,
default
=
None
,
help
=
"Create a file containing list of processed modules"
)
p
.
add_option
(
'-V'
,
action
=
'version'
,
help
=
'Show version number and exit'
)
...
...
@@ -241,7 +241,7 @@ def process_category(category, categories, options, env, template, outputname):
category_file_path
=
os
.
path
.
join
(
options
.
output_dir
,
"list_of_
%
s_modules.rst"
%
category
)
category_file
=
open
(
category_file_path
,
"w"
)
print
"*** recording category
%
s in
%
s ***"
%
(
category
,
category_file_path
)
print
"*** recording category
%
s in
%
s ***"
%
(
category
,
category_file_path
)
# TODO: start a new category file
...
...
@@ -300,14 +300,14 @@ def main():
last_category
=
None
category_names
=
categories
.
keys
()
category_names
.
sort
()
category_list_path
=
os
.
path
.
join
(
options
.
output_dir
,
"modules_by_category.rst"
)
category_list_file
=
open
(
category_list_path
,
"w"
)
category_list_file
.
write
(
"Module Index
\n
"
)
category_list_file
.
write
(
"============
\n
"
)
category_list_file
.
write
(
"
\n\n
"
)
category_list_file
.
write
(
".. toctree::
\n
"
)
for
category
in
category_names
:
category_list_file
.
write
(
" list_of_
%
s_modules
\n
"
%
category
)
process_category
(
category
,
categories
,
options
,
env
,
template
,
outputname
)
...
...
hacking/templates/rst.j2
View file @
af1f8db5
...
...
@@ -15,7 +15,7 @@
{% endif %}
{% for desc in description -%}
@{ desc | convert_symbols_to_format }@
@{ desc | convert_symbols_to_format }@
{% endfor %}
{% if options -%}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment