You can define directorys to search for lua files (containing RST comments) and define a TOC where to put the found files (conatining RST comments) in. Defining is made in extract.py:
The tocs defined here (second argument in each line) have to be present as a file. Currently there are three predefined TOC files available:
auxiliary.rst.org (renamed from auxiliary.rst.in)
lua_world.rst.org
lua_tribes.rst.org
I have to work more on extract.py to give the variables a better name.
Is this something you can work with? If we could say 'each RST in files living under doc/tribes and the subdirs are related to lua_tribes' we could maybe simplify defining lua_dirs to search for 'main folder including subfolders' so one doesn't have to define each directory in lua_dirs.
There is one remaining warning about a double defined function (text_line()):
/home/kaputtnik/Quellcode/widelands-repo/sphinx_changes/doc/sphinx/source/autogen_lua_world_format_editor.rst:14: WARNING: duplicate object description of text_line, other instance in /home/kaputtnik/Quellcode/widelands-repo/sphinx_changes/doc/sphinx/source/autogen_lua_tribes_building_help.rst, use :noindex: for one of them
Current state...
You can define directorys to search for lua files (containing RST comments) and define a TOC where to put the found files (conatining RST comments) in. Defining is made in extract.py:
# (src_dir, toc_to_ place_found_ RSTs_in) scripting' , 'auxiliary'), scripting/ editor' , 'lua_world'), scripting/ win_conditions' , 'lua_world'), tribes/ scripting/ help', 'lua_tribes'), tribes/ buildings/ militarysites/ atlanteans/ castle' , 'lua_tribes'),
lua_dirs = (
('data/
('data/
('data/
('data/tribes', 'lua_tribes'),
('data/
('data/
)
The tocs defined here (second argument in each line) have to be present as a file. Currently there are three predefined TOC files available:
auxiliary.rst.org (renamed from auxiliary.rst.in)
lua_world.rst.org
lua_tribes.rst.org
I have to work more on extract.py to give the variables a better name.
Is this something you can work with? If we could say 'each RST in files living under doc/tribes and the subdirs are related to lua_tribes' we could maybe simplify defining lua_dirs to search for 'main folder including subfolders' so one doesn't have to define each directory in lua_dirs.
There is one remaining warning about a double defined function (text_line()):
/home/kaputtnik /Quellcode/ widelands- repo/sphinx_ changes/ doc/sphinx/ source/ autogen_ lua_world_ format_ editor. rst:14: WARNING: duplicate object description of text_line, other instance in /home/kaputtnik /Quellcode/ widelands- repo/sphinx_ changes/ doc/sphinx/ source/ autogen_ lua_tribes_ building_ help.rst, use :noindex: for one of them