Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OSUG
RESIF
ws-sacpz-resp
Commits
bdcc2b66
Commit
bdcc2b66
authored
Apr 23, 2021
by
Jerome Touvier
Browse files
documentation howto
parent
86e19f0e
Pipeline
#65270
passed with stage
in 3 minutes and 17 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/utils.py
View file @
bdcc2b66
...
...
@@ -35,7 +35,7 @@ def is_valid_float(dimension, mini=sys.float_info.epsilon, maxi=sys.float_info.m
def
is_valid_datetime
(
date
):
for
df
in
(
"%Y-%m-%d"
,
"%Y-%m-%dT%H:%M:%S"
,
"%Y-%m-%dT%H:%M:%S.%f"
):
try
:
return
datetime
.
strptime
(
date
,
df
)
return
datetime
.
strptime
(
date
.
replace
(
"Z"
,
""
)
,
df
)
except
(
ValueError
,
TypeError
):
pass
...
...
docs/README.md
0 → 100755
View file @
bdcc2b66
### The HTML documentation located in "templates/" directory is generated as follows:
1) Modify your markdown files: USAGE_
*
.md
2) Run md2html.sh script:
bash md2html.sh "markdown file name" "html file name" "html page title"
### Examples:
bash md2html.sh USAGE_RESP_FR.md resp_doc.html "RESIF: RESIFWS: Resp Docs: v1"
bash md2html.sh USAGE_RESP_EN.md resp_doc_en.html "RESIF: RESIFWS: Resp Docs: v1"
bash md2html.sh USAGE_SACPZ_FR.md sacpz_doc.html "RESIF: RESIFWS: Sacpz Docs: v1"
bash md2html.sh USAGE_SACPZ_EN.md sacpz_doc_en.html "RESIF: RESIFWS: Sacpz Docs: v1"
### Requirements:
pandoc
docs/md2html.sh
0 → 100755
View file @
bdcc2b66
README
=
$1
FILE
=
$2
TITLE
=
$3
pandoc
-f
markdown
-t
html
-s
"
$README
"
-o
"
$FILE
"
--metadata
title
=
"
$TITLE
"
perl
-i
-0pe
's/__\*__/<strong>\*<\/strong>/s'
$FILE
perl
-i
-0pe
's/loc=\–/loc=--/s'
$FILE
perl
-i
-0pe
's/<header.*<\/header>/<p style="text-align:center;"> <img src=".\/static\/images\/logoresif.png" alt="logoresif" width="341" height="95"><\/p>/s'
$FILE
if
[[
$FILE
==
*
doc.html
]]
;
then
perl
-i
-0pe
's/<\/head>/<link rel="stylesheet" href=".\/static\/resifws.css"\/>
<a href=".\/local=en"> <img src=".\/static\/images\/en.png" alt="Français - Anglais"> <\/a>\n<\/head>/gms'
$FILE
elif
[[
$FILE
==
*
doc_en.html
]]
;
then
perl
-i
-0pe
's/<\/head>/<link rel="stylesheet" href=".\/static\/resifws.css"\/>
<a href=".\/local=fr"> <img src=".\/static\/images\/fr.png" alt="Anglais - Français"> <\/a>\n<\/head>/gms'
$FILE
fi
# perl -i -0pe
# -i in-place
# -0 read entire file in one shot (without the multiline searches failed).
# -p run Perl code
# -e Perl will not look for a script filename in the argument list.
Write
Preview
Supports
Markdown
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