Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit add957eb authored by Jerome Touvier's avatar Jerome Touvier
Browse files

Merge branch 'update' into 'master'

documentation howto

See merge request !1
parents b79c4b3d b7b345c3
Pipeline #65275 passed with stage
in 1 minute and 13 seconds
......@@ -24,8 +24,8 @@ ORDERBY = (
)
# error message constants
DOCUMENTATION_URI = "http://ws.resif.fr/resifws/ph5ws/availability/1/"
SERVICE = "resifws-ph5-availability"
DOCUMENTATION_URI = "http://ph5ws.resif.fr/fdsnws/availability/1/"
SERVICE = "ph5ws-availability"
VERSION = "1.0.0"
......
......@@ -41,7 +41,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
......
### 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_FR.md doc.html "RESIF: RESIFWS: PH5-availability Docs: v1"
bash md2html.sh USAGE_EN.md doc_en.html "RESIF: RESIFWS: PH5-availability Docs: v1"
### Requirements:
pandoc
......@@ -60,16 +60,16 @@ query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01
## Sample Queries
### with /extent
<a href="http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01</a>
<a href="http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01</a>
<a href="http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&show=latestupdate&orderby=timespancount">http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&show=latestupdate&orderby=timespancount</a>
<a href="http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&show=latestupdate&orderby=timespancount">http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&show=latestupdate&orderby=timespancount</a>
### with /query
<a href="http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01</a>
<a href="http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01</a>
<a href="http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&merge=samplerate&mergegaps=36000">http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&merge=samplerate&mergegaps=36000</a>
<a href="http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&merge=samplerate&mergegaps=36000">http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&merge=samplerate&mergegaps=36000</a>
## Detailed descriptions of each query parameter
......
......@@ -60,16 +60,16 @@ Au moins une station ou un réseau doit être précisé.
## Exemples de requêtes
### avec /extent
<a href="http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01</a>
<a href="http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01</a>
<a href="http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&show=latestupdate&orderby=timespancount">http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&show=latestupdate&orderby=timespancount</a>
<a href="http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&show=latestupdate&orderby=timespancount">http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&show=latestupdate&orderby=timespancount</a>
### avec /query
<a href="http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01</a>
<a href="http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01</a>
<a href="http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&merge=samplerate&mergegaps=36000">http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&merge=samplerate&mergegaps=36000</a>
<a href="http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&merge=samplerate&mergegaps=36000">http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&merge=samplerate&mergegaps=36000</a>
## Descriptions détaillées de chaque paramètre de la requête
......
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.
......@@ -61,11 +61,11 @@ format-options :: [format=&lt;TEXT|geocsv|json|request|zip&gt;]
les valeurs par défaut sont en majuscules</code></pre>
<h2 id="exemples-de-requêtes">Exemples de requêtes</h2>
<h3 id="avec-extent">avec /extent</h3>
<p><a href="http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01</a></p>
<p><a href="http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&show=latestupdate&orderby=timespancount">http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01&amp;show=latestupdate&amp;orderby=timespancount</a></p>
<p><a href="http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01</a></p>
<p><a href="http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&show=latestupdate&orderby=timespancount">http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01&amp;show=latestupdate&amp;orderby=timespancount</a></p>
<h3 id="avec-query">avec /query</h3>
<p><a href="http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01</a></p>
<p><a href="http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&merge=samplerate&mergegaps=36000">http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01&amp;merge=samplerate&amp;mergegaps=36000</a></p>
<p><a href="http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01</a></p>
<p><a href="http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&merge=samplerate&mergegaps=36000">http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01&amp;merge=samplerate&amp;mergegaps=36000</a></p>
<h2 id="descriptions-détaillées-de-chaque-paramètre-de-la-requête">Descriptions détaillées de chaque paramètre de la requête</h2>
<h3 id="format-autorisé-pour-la-station">Format autorisé pour la station</h3>
<p>Les quatre paramètres (network, station, location, channel) déterminent les canaux d’intérêt.</p>
......
......@@ -60,11 +60,11 @@ format-options :: [format=&lt;TEXT|geocsv|json|request|zip&gt;]</code></p
<pre><code>default values are uppercase</code></pre>
<h2 id="sample-queries">Sample Queries</h2>
<h3 id="with-extent">with /extent</h3>
<p><a href="http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01</a></p>
<p><a href="http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&show=latestupdate&orderby=timespancount">http://ws.resif.fr/resifws/ph5-availability/1/extent?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01&amp;show=latestupdate&amp;orderby=timespancount</a></p>
<p><a href="http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01</a></p>
<p><a href="http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&show=latestupdate&orderby=timespancount">http://ph5ws.resif.fr/fdsnws/availability/1/extent?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01&amp;show=latestupdate&amp;orderby=timespancount</a></p>
<h3 id="with-query">with /query</h3>
<p><a href="http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01</a></p>
<p><a href="http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&merge=samplerate&mergegaps=36000">http://ws.resif.fr/resifws/ph5-availability/1/query?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01&amp;merge=samplerate&amp;mergegaps=36000</a></p>
<p><a href="http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01">http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01</a></p>
<p><a href="http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&sta=N02,N08&start=2019-01-01&end=2020-01-01&merge=samplerate&mergegaps=36000">http://ph5ws.resif.fr/fdsnws/availability/1/query?net=3C&amp;sta=N02,N08&amp;start=2019-01-01&amp;end=2020-01-01&amp;merge=samplerate&amp;mergegaps=36000</a></p>
<h2 id="detailed-descriptions-of-each-query-parameter">Detailed descriptions of each query parameter</h2>
<h3 id="station-code-details">Station code details</h3>
<p>The four parameters (network, station, location, channel) determine channels of interest.</p>
......
<?xml version="1.0" encoding="UTF-8"?>
<application>
<doc title="RESIF ph5-availability web service 1.0"/>
<resources base="http://ws.resif.fr/resifws/ph5ws/availability/1">
<resources base="http://ph5ws.resif.fr/fdsnws/availability/1">
<resource path="/">
<method name="GET">
<response>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment