Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
diapotb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Remote Modules
diapotb
Commits
185c1626
Commit
185c1626
authored
3 years ago
by
Abdussalam SALEH MGHIR
Browse files
Options
Downloads
Patches
Plain Diff
ENH : Update creation of the wiki
parent
99f477a2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!52
Merge for v1.1.0
,
!44
Simplify and Boost generation of the wiki
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
doc_cookbook/README.md
+7
-1
7 additions, 1 deletion
doc_cookbook/README.md
doc_cookbook/script_doc_sphinx.sh
+25
-12
25 additions, 12 deletions
doc_cookbook/script_doc_sphinx.sh
with
33 additions
and
13 deletions
.gitignore
+
1
−
0
View file @
185c1626
...
...
@@ -9,3 +9,4 @@
*.pyc
.\#*
\#*\#
/doc_cookbook/rst_tmp/*
This diff is collapsed.
Click to expand it.
doc_cookbook/README.md
+
7
−
1
View file @
185c1626
...
...
@@ -22,10 +22,16 @@ cd <diapotb_root_path>/doc_cookbook
```
<diapotb_root_path>
: root path of the repository diapotb
-
The temporary repertory used to store all the source files is created:
```
shell
mkdir
-p
rst_tmp
cp
-R
rst/
*
rst_tmp
```
-
Then, the rst files are generated:
```
shell
python otbGenerateWrappersRstDoc.py rst
python otbGenerateWrappersRstDoc.py rst
_tmp
```
3.
The new wiki is generated:
...
...
This diff is collapsed.
Click to expand it.
doc_cookbook/script_doc_sphinx.sh
+
25
−
12
View file @
185c1626
#!/bin/bash
# Output Path where the wiki for the diapotb will be generated
wiki_output_path
=
$1
#check number of arguments
if
[[
$#
-ne
1
]]
then
echo
"Illegal number of parameters"
>
&2
exit
2
fi
# Path directory of the current script
path_dir
=
$(
dirname
$0
)
# Creation if non existant of the repository used to generate the wiki
mkdir
-p
rst_tmp
mkdir
-p
$path_dir
/
rst_tmp
# Copy of the C++ source files and the static files to the temporary repository from which will be generated the wiki
cp
-R
rst/
*
rst_tmp
cp
-R
$path_dir
/rst/
*
$path_dir
/
rst_tmp
# Generate the source files for the python scripts of the processing chains
sphinx-apidoc
-f
-o
.
/rst_API_Python/ ../python_src/
sphinx-apidoc
-f
-o
$path_dir
/rst_API_Python/
$path_dir
/
../python_src/
# Copy of the interesting source files to rst_tmp
# Deletion of some lines uninteresting inside utils.rst
line_submodule_utils_start
=
$(
grep
-wn
'Submodules'
.
/rst_API_Python/utils.rst |
cut
-d
:
-f1
)
line_submodule_utils_start
=
$(
grep
-wn
'Submodules'
$path_dir
/rst_API_Python/utils.rst |
cut
-d
:
-f1
)
line_submodule_utils_end
=
$((
$line_submodule_utils_start
+
1
))
line_modcont_utils_start
=
$(
grep
-wn
'Module contents'
.
/rst_API_Python/utils.rst |
cut
-d
:
-f1
)
line_modcont_utils_start
=
$(
grep
-wn
'Module contents'
$path_dir
/rst_API_Python/utils.rst |
cut
-d
:
-f1
)
line_modcont_utils_end
=
$((
$line_modcont_utils_start
+
6
))
# Copy of the modified utils.rst to rst_tmp
sed
"
${
line_submodule_utils_start
}
,
${
line_submodule_utils_end
}
d;
${
line_modcont_utils_start
}
,
${
line_modcont_utils_end
}
d"
rst_API_Python/utils.rst
>
rst_tmp/PythonAPI/utils.rst
sed
"
${
line_submodule_utils_start
}
,
${
line_submodule_utils_end
}
d;
${
line_modcont_utils_start
}
,
${
line_modcont_utils_end
}
d"
$path_dir
/
rst_API_Python/utils.rst
>
$path_dir
/
rst_tmp/PythonAPI/utils.rst
# Deletion of some lines uninteresting inside processings.rst
line_submodule_processing_start
=
$(
grep
-wn
'Submodules'
.
/rst_API_Python/processings.rst |
cut
-d
:
-f1
)
line_submodule_processing_start
=
$(
grep
-wn
'Submodules'
$path_dir
/rst_API_Python/processings.rst |
cut
-d
:
-f1
)
line_submodule_processing_end
=
$((
$line_submodule_processing_start
+
1
))
line_modcont_processing_start
=
$(
grep
-wn
'Module contents'
.
/rst_API_Python/processings.rst |
cut
-d
:
-f1
)
line_modcont_processing_start
=
$(
grep
-wn
'Module contents'
$path_dir
/rst_API_Python/processings.rst |
cut
-d
:
-f1
)
line_modcont_processing_end
=
$((
$line_modcont_processing_start
+
6
))
# Copy of the modified processings.rst to rst_tmp
sed
"
${
line_submodule_processing_start
}
,
${
line_submodule_processing_end
}
d;
${
line_modcont_processing_start
}
,
${
line_modcont_processing_end
}
d"
rst_API_Python/processings.rst
>
rst_tmp/PythonAPI/processings.rst
sed
"
${
line_submodule_processing_start
}
,
${
line_submodule_processing_end
}
d;
${
line_modcont_processing_start
}
,
${
line_modcont_processing_end
}
d"
$path_dir
/
rst_API_Python/processings.rst
>
$path_dir
/
rst_tmp/PythonAPI/processings.rst
# Generate the wiki repository from the source repository
sphinx-build
-M
markdown ./rst_tmp/
$wiki_output_path
/diapotb_wiki/
-c
.
#sphinx-build -b html ./rst_tmp/ $wiki_output_path/diapotb_wiki_html/ -c .
rm
-r
rst_tmp
sphinx-build
-M
markdown
$path_dir
/rst_tmp/
$wiki_output_path
/diapotb_wiki/
-c
$path_dir
#sphinx-build -b html $path_dir/rst_tmp/ $wiki_output_path/diapotb_wiki_html/ -c $path_dir
if
[[
-d
"
${
path_dir
}
/rst_tmp"
]]
then
rm
-r
$path_dir
/rst_tmp
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment