mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-24 02:49:07 +01:00
CI: build and publish LdapSaisie.epub file
This commit is contained in:
parent
5343d793bd
commit
911543e683
5 changed files with 395 additions and 11 deletions
|
@ -88,13 +88,12 @@ tests:jessie:
|
|||
|
||||
build:doc:
|
||||
stage: build
|
||||
image: python:slim
|
||||
image: python:alpine
|
||||
before_script:
|
||||
- pip install -r doc/requirements.txt
|
||||
- apk add make
|
||||
script:
|
||||
- cd doc
|
||||
- mkdocs build -s
|
||||
- htmlark public_html/print_page/index.html -o LdapSaisie.html
|
||||
- make public_html LdapSaisie.html
|
||||
artifacts:
|
||||
paths:
|
||||
- doc/public_html/
|
||||
|
@ -113,6 +112,24 @@ build:doc:pdf:
|
|||
paths:
|
||||
- doc/LdapSaisie.pdf
|
||||
|
||||
build:doc:epub:
|
||||
stage: build
|
||||
image:
|
||||
name: pandoc/core
|
||||
entrypoint: ["/bin/sh", "-c"]
|
||||
needs:
|
||||
- build:doc
|
||||
before_script:
|
||||
- apk add make
|
||||
script:
|
||||
- cd doc
|
||||
- mkdir venv
|
||||
- touch public_html LdapSaisie.html
|
||||
- make LdapSaisie.epub
|
||||
artifacts:
|
||||
paths:
|
||||
- doc/LdapSaisie.epub
|
||||
|
||||
deploy:doc:
|
||||
stage: deploy
|
||||
image: alpine:latest
|
||||
|
@ -124,5 +141,4 @@ deploy:doc:
|
|||
- echo "$SSH_HOST_KEY" | base64 -d > ~/.ssh/known_hosts
|
||||
script:
|
||||
- rsync -atv --exclude '.git*' --delete --progress ./doc/public_html/ $SSH_USER@$SSH_HOST:./
|
||||
- rsync -atv ./doc/LdapSaisie.html $SSH_USER@$SSH_HOST:LdapSaisie.html
|
||||
- rsync -atv ./doc/LdapSaisie.pdf $SSH_USER@$SSH_HOST:LdapSaisie.pdf
|
||||
- rsync -atv ./doc/LdapSaisie.html ./doc/LdapSaisie.pdf ./doc/LdapSaisie.epub $SSH_USER@$SSH_HOST:./
|
||||
|
|
1
doc/.gitignore
vendored
1
doc/.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
public_html
|
||||
LdapSaisie.html
|
||||
LdapSaisie.pdf
|
||||
LdapSaisie.epub
|
||||
venv
|
||||
|
|
24
doc/Makefile
24
doc/Makefile
|
@ -1,6 +1,3 @@
|
|||
serve: venv
|
||||
venv/bin/mkdocs serve
|
||||
|
||||
build: venv public_html LdapSaisie.html
|
||||
|
||||
public_html: venv
|
||||
|
@ -9,12 +6,29 @@ public_html: venv
|
|||
LdapSaisie.html: venv public_html
|
||||
venv/bin/htmlark public_html/print_page/index.html -o LdapSaisie.html
|
||||
|
||||
LdapSaisie.pdf: venv LdapSaisie.html
|
||||
LdapSaisie.pdf: LdapSaisie.html
|
||||
docker run -v $(CURDIR):/workspace pink33n/html-to-pdf --url file:///workspace/LdapSaisie.html --pdf LdapSaisie.pdf
|
||||
|
||||
LdapSaisie.epub: LdapSaisie.html
|
||||
pandoc LdapSaisie.html \
|
||||
-f html \
|
||||
--toc \
|
||||
--standalone \
|
||||
--top-level-division=chapter \
|
||||
--highlight-style style/pygments.theme \
|
||||
--css style/epub.css \
|
||||
--metadata=title:"Documentation LdapSaisie" \
|
||||
--metadata=author:"Benjamin Renard" \
|
||||
--metadata=lang:"fr-FR" \
|
||||
--metadata=cover-image:"../src/images/default/logo.png" \
|
||||
-o LdapSaisie.epub
|
||||
|
||||
venv:
|
||||
python3 -m venv venv
|
||||
venv/bin/python -m pip install -r requirements.txt
|
||||
|
||||
clean:
|
||||
rm -fr venv public_html LdapSaisie.html
|
||||
rm -fr venv public_html LdapSaisie.html LdapSaisie.pdf LdapSaisie.epub
|
||||
|
||||
serve: venv
|
||||
venv/bin/mkdocs serve
|
||||
|
|
142
doc/style/epub.css
Normal file
142
doc/style/epub.css
Normal file
|
@ -0,0 +1,142 @@
|
|||
/* This defines styles and classes used in the book */
|
||||
/* body { margin: 5%; text-align: justify; font-size: medium; }
|
||||
code { font-family: monospace; }
|
||||
h1 { text-align: left; }
|
||||
h2 { text-align: left; }
|
||||
h3 { text-align: left; } */
|
||||
h4 { text-align: left; }
|
||||
h5 { text-align: left; }
|
||||
h6 { text-align: left; }
|
||||
h1.title { }
|
||||
h2.author { }
|
||||
h3.date { }
|
||||
nav#toc ol,
|
||||
nav#landmarks ol { padding: 0; margin-left: 1em; }
|
||||
nav#toc ol li,
|
||||
nav#landmarks ol li { list-style-type: none; margin: 0; padding: 0; }
|
||||
a.footnote-ref { vertical-align: super; }
|
||||
em, em em em, em em em em em { font-style: italic;}
|
||||
em em, em em em em { font-style: normal; }
|
||||
/* code{ white-space: pre-wrap; } */
|
||||
span.smallcaps{ font-variant: small-caps; }
|
||||
span.underline{ text-decoration: underline; }
|
||||
q { quotes: "“" "”" "‘" "’"; }
|
||||
div.column{ display: inline-block; vertical-align: top; width: 50%; }
|
||||
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
||||
|
||||
body {
|
||||
font-family: "DejaVu Serif", serif;
|
||||
margin: 5% 5% 20% 5%;
|
||||
text-align: justify;
|
||||
font-size: 0.75em;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: left;
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h3 {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1.title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
p.author {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: "DejaVu Sans Mono", monospace;
|
||||
background-color: #ebebeb;
|
||||
font-size: 100%;
|
||||
line-height: inherit;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: "DejaVu Sans Mono", monospace;
|
||||
padding: 1em;
|
||||
overflow: auto;
|
||||
font-size: 100%;
|
||||
line-height: inherit;
|
||||
border-radius: 0.25em;
|
||||
background-color: #ebebeb;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 0.8em;
|
||||
}
|
||||
|
||||
table, th, td {
|
||||
border: 0.06em solid black;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-style: solid solid solid solid;
|
||||
border-color: #a41434;
|
||||
border-width: medium;
|
||||
border-radius: 0.5em;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
background-color: #fcecf4;
|
||||
}
|
||||
|
||||
@media screen { /* Workaround for iBooks issue; see #6242 */
|
||||
.sourceCode {
|
||||
overflow: visible !important;
|
||||
white-space: pre-wrap !important;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Warning / Important / Note
|
||||
*/
|
||||
.admonition {
|
||||
border: .05rem solid #448aff;
|
||||
border-radius: .2rem;
|
||||
font-size: .64rem;
|
||||
margin: 1.5625em 0;
|
||||
padding: 0 .6rem;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.admonition p:first-of-type {
|
||||
font-weight: bold;
|
||||
padding: .6rem;
|
||||
margin: 0 -.6rem;
|
||||
background-color: #448aff1a;
|
||||
}
|
||||
|
||||
.admonition.warning {
|
||||
border-color: #ff9100;
|
||||
}
|
||||
|
||||
.admonition.warning p:first-of-type {
|
||||
background-color: #ff91001a;
|
||||
}
|
||||
|
||||
.admonition.note {
|
||||
border-color: #448aff;
|
||||
}
|
||||
|
||||
.admonition.note p:first-of-type {
|
||||
background-color: #448aff1a;
|
||||
}
|
211
doc/style/pygments.theme
Normal file
211
doc/style/pygments.theme
Normal file
|
@ -0,0 +1,211 @@
|
|||
{
|
||||
"text-color": null,
|
||||
"background-color": null,
|
||||
"line-number-color": "#aaaaaa",
|
||||
"line-number-background-color": null,
|
||||
"text-styles": {
|
||||
"Alert": {
|
||||
"text-color": "#ff0000",
|
||||
"background-color": null,
|
||||
"bold": true,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"Annotation": {
|
||||
"text-color": "#60a0b0",
|
||||
"background-color": null,
|
||||
"bold": true,
|
||||
"italic": true,
|
||||
"underline": false
|
||||
},
|
||||
"Attribute": {
|
||||
"text-color": "#7d9029",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"BaseN": {
|
||||
"text-color": "#40a070",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"BuiltIn": {
|
||||
"text-color": "#008000",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"Char": {
|
||||
"text-color": "#4070a0",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"Comment": {
|
||||
"text-color": "#60a0b0",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": true,
|
||||
"underline": false
|
||||
},
|
||||
"CommentVar": {
|
||||
"text-color": "#60a0b0",
|
||||
"background-color": null,
|
||||
"bold": true,
|
||||
"italic": true,
|
||||
"underline": false
|
||||
},
|
||||
"Constant": {
|
||||
"text-color": "#880000",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"ControlFlow": {
|
||||
"text-color": "#007020",
|
||||
"background-color": null,
|
||||
"bold": true,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"DataType": {
|
||||
"text-color": "#902000",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"DecVal": {
|
||||
"text-color": "#40a070",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"Documentation": {
|
||||
"text-color": "#ba2121",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": true,
|
||||
"underline": false
|
||||
},
|
||||
"Error": {
|
||||
"text-color": "#ff0000",
|
||||
"background-color": null,
|
||||
"bold": true,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"Extension": {
|
||||
"text-color": null,
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"Float": {
|
||||
"text-color": "#40a070",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"Function": {
|
||||
"text-color": "#06287e",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"Import": {
|
||||
"text-color": "#008000",
|
||||
"background-color": null,
|
||||
"bold": true,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"Information": {
|
||||
"text-color": "#60a0b0",
|
||||
"background-color": null,
|
||||
"bold": true,
|
||||
"italic": true,
|
||||
"underline": false
|
||||
},
|
||||
"Keyword": {
|
||||
"text-color": "#007020",
|
||||
"background-color": null,
|
||||
"bold": true,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"Operator": {
|
||||
"text-color": "#666666",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"Other": {
|
||||
"text-color": "#007020",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"Preprocessor": {
|
||||
"text-color": "#bc7a00",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"SpecialChar": {
|
||||
"text-color": "#4070a0",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"SpecialString": {
|
||||
"text-color": "#bb6688",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"String": {
|
||||
"text-color": "#4070a0",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"Variable": {
|
||||
"text-color": "#19177c",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"VerbatimString": {
|
||||
"text-color": "#4070a0",
|
||||
"background-color": null,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"underline": false
|
||||
},
|
||||
"Warning": {
|
||||
"text-color": "#60a0b0",
|
||||
"background-color": null,
|
||||
"bold": true,
|
||||
"italic": true,
|
||||
"underline": false
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue