Compare commits
11 commits
a0279653f5
...
80ae5e188a
Author | SHA1 | Date | |
---|---|---|---|
80ae5e188a | |||
53c9766297 | |||
8cf80d9c09 | |||
d4924377fe | |||
6a2abc6235 | |||
2a607d6f21 | |||
a8b755a7c9 | |||
8ad5e1ff47 | |||
0fea694575 | |||
0249d0e85c | |||
ff82c631b4 |
26 changed files with 467 additions and 123 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -17,3 +17,5 @@ tmp*
|
|||
vendor/bundle
|
||||
*.zip
|
||||
mkdocs.yml
|
||||
.aider*
|
||||
.env
|
||||
|
|
|
@ -5,7 +5,7 @@ build: theme.css
|
|||
|
||||
%.css: %.scss
|
||||
cd .. \
|
||||
&& npx sass --no-error-css --no-source-map .marp/$<:.marp/$@ \
|
||||
&& npx sass --no-error-css --no-source-map --style=expanded .marp/$<:.marp/$@ \
|
||||
|| ( rm -f .marp/$@ && exit 1 )
|
||||
|
||||
.PHONY: build
|
||||
|
|
|
@ -7,10 +7,12 @@ $tertiaryColor: #241c1c;
|
|||
$textColor: #111111;
|
||||
|
||||
body {
|
||||
/*
|
||||
--primary-color: $primaryColor;
|
||||
--secondary-color: $secondaryColor;
|
||||
--tertiary-color: $tertiaryColor;
|
||||
--text-color: $textColor;
|
||||
*/
|
||||
}
|
||||
|
||||
section {
|
||||
|
@ -257,3 +259,28 @@ p img:only-child[alt*="center"] {
|
|||
margin-right: auto;
|
||||
}
|
||||
|
||||
section {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
section > h2:nth-child(2),
|
||||
section > h3:nth-child(2),
|
||||
section > h4:nth-child(2),
|
||||
section > h5:nth-child(2),
|
||||
section > h6:nth-child(2),
|
||||
section > p:nth-child(2),
|
||||
section > bc-row:nth-child(2),
|
||||
section > ul:nth-child(2) > li:first-child > p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
section bc-footer {
|
||||
position: absolute;
|
||||
bottom: 80px;
|
||||
}
|
||||
|
||||
section bc-footer *:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
43
Makefile
43
Makefile
|
@ -16,53 +16,54 @@ CACHE_DIR=_cache
|
|||
|
||||
## Internal directories
|
||||
CACHE_SLIDES_DIR=$(CACHE_DIR)/slides
|
||||
CACHE_DOCS_DIR=$(CACHE_DIR)/docs
|
||||
|
||||
## Output directories
|
||||
BUILD_SLIDES_DIR=$(BUILD_DIR)/slides
|
||||
BUILD_DOCS_DIR=$(BUILD_DIR)/docs
|
||||
BUILD_IMAGES_DIR=images
|
||||
|
||||
BUILD_VERSION=v$(shell date "+%Y%m%d-%H%M")
|
||||
BUILD_VERSION := v$(shell date "+%Y%m%d-%H%M")
|
||||
|
||||
## Ports
|
||||
DOCS_PORT=5100
|
||||
SLIDES_PORT=5200
|
||||
|
||||
## Find .md slides
|
||||
SLIDES_MDPP=$(shell find -L $(SLIDES_DIR) -regextype sed \( -name '*.mdpp' ! -regex '.*/_.*' \))
|
||||
SLIDES_MDPP_MD=$(patsubst $(SLIDES_DIR)/%.mdpp,$(CACHE_SLIDES_DIR)/%.mdpp.md,$(SLIDES_MDPP))
|
||||
SLIDES_MDPP_MD_PDF=$(patsubst $(CACHE_SLIDES_DIR)/%.mdpp.md,$(BUILD_SLIDES_DIR)/%.pdf,$(SLIDES_MDPP_MD))
|
||||
SLIDES_MDPP_MD_PPTX=$(patsubst $(CACHE_SLIDES_DIR)/%.mdpp.md,$(BUILD_SLIDES_DIR)/%.pptx,$(SLIDES_MDPP_MD))
|
||||
SLIDES_MDPP := $(shell find -L $(SLIDES_DIR) -regextype sed \( -name '*.mdpp' ! -regex '.*/_.*' \))
|
||||
SLIDES_MDPP_MD := $(patsubst $(SLIDES_DIR)/%.mdpp,$(CACHE_SLIDES_DIR)/%.mdpp.md,$(SLIDES_MDPP))
|
||||
SLIDES_MDPP_MD_PDF := $(patsubst $(CACHE_SLIDES_DIR)/%.mdpp.md,$(BUILD_SLIDES_DIR)/%.pdf,$(SLIDES_MDPP_MD))
|
||||
SLIDES_MDPP_MD_PPTX := $(patsubst $(CACHE_SLIDES_DIR)/%.mdpp.md,$(BUILD_SLIDES_DIR)/%.pptx,$(SLIDES_MDPP_MD))
|
||||
|
||||
SLIDES_MD=$(shell find -L $(SLIDES_DIR) -regextype sed \( -name '*.md' ! -regex '.*/_.*' \)) $(SLIDES_MDPP_MD)
|
||||
SLIDES_MD_PDF=$(patsubst $(SLIDES_DIR)/%.md,$(BUILD_SLIDES_DIR)/%.pdf,$(SLIDES_MD))
|
||||
SLIDES_MD_PPTX=$(patsubst $(SLIDES_DIR)/%.md,$(BUILD_SLIDES_DIR)/%.pptx,$(SLIDES_MD))
|
||||
SLIDES_MD := $(shell find -L $(SLIDES_DIR) -regextype sed \( -name '*.md' ! -regex '.*/_.*' \)) $(SLIDES_MDPP_MD)
|
||||
SLIDES_MD_PDF := $(patsubst $(SLIDES_DIR)/%.md,$(BUILD_SLIDES_DIR)/%.pdf,$(SLIDES_MD))
|
||||
SLIDES_MD_PPTX := $(patsubst $(SLIDES_DIR)/%.md,$(BUILD_SLIDES_DIR)/%.pptx,$(SLIDES_MD))
|
||||
|
||||
SLIDES_MD_ALL=$(SLIDES_MDPP_MD) $(SLIDES_MD) $(SLIDES_DIR)/autoslide.md
|
||||
SLIDES_PDF_ALL=$(SLIDES_MDPP_MD_PDF) $(SLIDES_MD_PDF) $(BUILD_SLIDES_DIR)/autoslide.pdf
|
||||
SLIDES_PPTX_ALL=$(SLIDES_MDPP_MD_PPTX) $(SLIDES_MD_PPTX) $(BUILD_SLIDES_DIR)/autoslide.pptx
|
||||
SLIDES_MD_ALL := $(SLIDES_MDPP_MD) $(SLIDES_MD) $(SLIDES_DIR)/autoslide.md
|
||||
SLIDES_PDF_ALL := $(SLIDES_MDPP_MD_PDF) $(SLIDES_MD_PDF) $(BUILD_SLIDES_DIR)/autoslide.pdf
|
||||
SLIDES_PPTX_ALL := $(SLIDES_MDPP_MD_PPTX) $(SLIDES_MD_PPTX) $(BUILD_SLIDES_DIR)/autoslide.pptx
|
||||
|
||||
DOCS_MD=$(shell find -L $(DOCS_DIR) -regextype sed \( -name '*.md' ! -regex '.*/_.*' \))
|
||||
|
||||
## Find .uml graphs
|
||||
DOCS_IMAGES_UML=$(shell find -L $(IMAGES_DIR) -regextype sed \( -name '*.uml' ! -regex '.*/_.*' \))
|
||||
DOCS_IMAGES_UML_SVG=$(patsubst $(IMAGES_DIR)/%.uml,$(BUILD_IMAGES_DIR)/%.uml.svg,$(DOCS_IMAGES_UML))
|
||||
DOCS_IMAGES_UML := $(shell find -L $(IMAGES_DIR) -regextype sed \( -name '*.uml' ! -regex '.*/_.*' \))
|
||||
DOCS_IMAGES_UML_SVG := $(patsubst $(IMAGES_DIR)/%.uml,$(BUILD_IMAGES_DIR)/%.uml.svg,$(DOCS_IMAGES_UML))
|
||||
|
||||
## Find .dot graphs
|
||||
DOCS_IMAGES_DOT=$(shell find -L $(IMAGES_DIR) -regextype sed \( -name '*.dot' ! -regex '.*/_.*' \))
|
||||
DOCS_IMAGES_DOT_SVG=$(patsubst $(IMAGES_DIR)/%.dot,$(BUILD_IMAGES_DIR)/%.dot.svg,$(DOCS_IMAGES_DOT))
|
||||
DOCS_IMAGES_DOT := $(shell find -L $(IMAGES_DIR) -regextype sed \( -name '*.dot' ! -regex '.*/_.*' \))
|
||||
DOCS_IMAGES_DOT_SVG := $(patsubst $(IMAGES_DIR)/%.dot,$(BUILD_IMAGES_DIR)/%.dot.svg,$(DOCS_IMAGES_DOT))
|
||||
|
||||
## Find .circo graphs
|
||||
DOCS_IMAGES_CIRCO=$(shell find -L $(IMAGES_DIR) -regextype sed \( -name '*.circo' ! -regex '.*/_.*' \))
|
||||
DOCS_IMAGES_CIRCO_SVG=$(patsubst $(IMAGES_DIR)/%.circo,$(BUILD_IMAGES_DIR)/%.circo.svg,$(DOCS_IMAGES_CIRCO))
|
||||
DOCS_IMAGES_CIRCO := $(shell find -L $(IMAGES_DIR) -regextype sed \( -name '*.circo' ! -regex '.*/_.*' \))
|
||||
DOCS_IMAGES_CIRCO_SVG := $(patsubst $(IMAGES_DIR)/%.circo,$(BUILD_IMAGES_DIR)/%.circo.svg,$(DOCS_IMAGES_CIRCO))
|
||||
|
||||
## Find .ora images
|
||||
DOCS_IMAGES_ORA=$(shell find -L $(IMAGES_DIR) -regextype sed \( -name '*.ora' ! -regex '.*/_.*' \))
|
||||
DOCS_IMAGES_ORA_PNG=$(patsubst $(IMAGES_DIR)/%.ora,$(BUILD_IMAGES_DIR)/%.ora.png,$(DOCS_IMAGES_ORA))
|
||||
DOCS_IMAGES_ORA := $(shell find -L $(IMAGES_DIR) -regextype sed \( -name '*.ora' ! -regex '.*/_.*' \))
|
||||
DOCS_IMAGES_ORA_PNG := $(patsubst $(IMAGES_DIR)/%.ora,$(BUILD_IMAGES_DIR)/%.ora.png,$(DOCS_IMAGES_ORA))
|
||||
|
||||
## Merge all lists
|
||||
DOCS_IMAGES_SVG=$(DOCS_IMAGES_DOT_SVG) $(DOCS_IMAGES_CIRCO_SVG) $(DOCS_IMAGES_UML_SVG)
|
||||
DOCS_IMAGES_PNG=$(DOCS_IMAGES_ORA_PNG)
|
||||
DOCS_IMAGES_SVG := $(DOCS_IMAGES_DOT_SVG) $(DOCS_IMAGES_CIRCO_SVG) $(DOCS_IMAGES_UML_SVG)
|
||||
DOCS_IMAGES_PNG := $(DOCS_IMAGES_ORA_PNG)
|
||||
export
|
||||
|
||||
all: help
|
||||
|
|
|
@ -2,14 +2,34 @@
|
|||
version: "3.4"
|
||||
|
||||
services:
|
||||
app:
|
||||
# app:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: docker/Dockerfile
|
||||
# image: glenux/teaching-boilerplate
|
||||
# environment: {}
|
||||
# ports:
|
||||
# - 5100:5100
|
||||
# - 5200:5200
|
||||
|
||||
slides:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile
|
||||
image: glenux/teaching-boilerplate
|
||||
dockerfile: docker/Dockerfile.slides
|
||||
image: glenux/docmachine-slides:latest
|
||||
environment: {}
|
||||
ports:
|
||||
- 5200:5200
|
||||
|
||||
docs:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile.docs
|
||||
image: glenux/docmachine-docs:latest
|
||||
environment: {}
|
||||
ports:
|
||||
- 5100:5100
|
||||
- 5200:5200
|
||||
|
||||
# proxy:
|
||||
|
||||
#
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
FROM node:18-bookworm-slim
|
||||
LABEL maintainer="Glenn ROLLAND glenux@glenux.net"
|
||||
|
||||
ENV DOCMACHINE_DOCS_ENABLE=1
|
||||
ENV DOCMACHINE_SLIDES_ENABLE=1
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends python3 python3-pip pipenv \
|
||||
&& apt-get install -y --no-install-recommends python3 python3-pip python-is-python3 pipenv python3-pypandoc \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
&& truncate -s 0 /var/log/*log
|
||||
|
@ -16,7 +19,7 @@ RUN apt-get update \
|
|||
|
||||
# Tools for building pdfs
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends make pdftk m4 chromium \
|
||||
&& apt-get install -y --no-install-recommends make m4 chromium pandoc ghc libghc-pandoc-dev lmodern texlive-xetex texlive-fonts-extra texlive-fonts-recommended librsvg2-bin fonts-noto-mono \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
&& truncate -s 0 /var/log/*log
|
||||
|
@ -24,7 +27,7 @@ RUN apt-get update \
|
|||
# External tools
|
||||
# yq => manage YML
|
||||
RUN curl -sSL -o /usr/local/bin/yq \
|
||||
https://github.com/mikefarah/yq/releases/download/v4.18.1/yq_linux_amd64 \
|
||||
https://github.com/mikefarah/yq/releases/download/v4.44.6/yq_linux_amd64 \
|
||||
&& chmod +x /usr/local/bin/yq
|
||||
|
||||
COPY . /app
|
||||
|
@ -36,8 +39,7 @@ ENV LANG=C.UTF-8 \
|
|||
PIPENV_HIDE_EMOJIS=1 \
|
||||
PIPENV_VENV_IN_PROJECT=1
|
||||
|
||||
RUN ln -sf python3 /usr/bin/python \
|
||||
&& make prepare SYSTEM_INSTALL=1
|
||||
RUN make prepare SYSTEM_INSTALL=1
|
||||
|
||||
ENTRYPOINT ["/app/docker/entrypoint.sh"]
|
||||
CMD ["watch"]
|
||||
|
|
44
docker/Dockerfile.docs
Normal file
44
docker/Dockerfile.docs
Normal file
|
@ -0,0 +1,44 @@
|
|||
FROM node:18-bookworm-slim
|
||||
LABEL maintainer="Glenn ROLLAND glenux@glenux.net"
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends python3 python3-pip pipenv python3-pypandoc \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
&& truncate -s 0 /var/log/*log
|
||||
|
||||
# Tools for running the common parts
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends make build-essential inotify-tools gosu unzip curl rsync \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
&& truncate -s 0 /var/log/*log
|
||||
|
||||
# Tools for building pdfs
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends make m4 chromium pandoc ghc libghc-pandoc-dev lmodern texlive-latex-recommended texlive-latex-base texlive-latex-extra \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
&& truncate -s 0 /var/log/*log
|
||||
|
||||
# External tools
|
||||
# yq => manage YML
|
||||
RUN curl -sSL -o /usr/local/bin/yq \
|
||||
https://github.com/mikefarah/yq/releases/download/v4.44.6/yq_linux_amd64 \
|
||||
&& chmod +x /usr/local/bin/yq
|
||||
|
||||
COPY . /app
|
||||
COPY .marp /app/.marp
|
||||
WORKDIR /app
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PIPENV_HIDE_EMOJIS=1 \
|
||||
PIPENV_VENV_IN_PROJECT=1
|
||||
|
||||
RUN ln -sf python3 /usr/bin/python \
|
||||
&& make prepare SYSTEM_INSTALL=1
|
||||
|
||||
ENTRYPOINT ["/app/docker/entrypoint.sh"]
|
||||
CMD ["watch"]
|
||||
|
44
docker/Dockerfile.slides
Normal file
44
docker/Dockerfile.slides
Normal file
|
@ -0,0 +1,44 @@
|
|||
FROM node:18-bookworm-slim
|
||||
LABEL maintainer="Glenn ROLLAND glenux@glenux.net"
|
||||
|
||||
# RUN apt-get update \
|
||||
# && apt-get install -y --no-install-recommends python3 python3-pip pipenv python3-pypandoc \
|
||||
# && apt-get clean \
|
||||
# && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
# && truncate -s 0 /var/log/*log
|
||||
|
||||
# # Tools for running the common parts
|
||||
# RUN apt-get update \
|
||||
# && apt-get install -y --no-install-recommends make build-essential inotify-tools gosu unzip curl rsync \
|
||||
# && apt-get clean \
|
||||
# && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
# && truncate -s 0 /var/log/*log
|
||||
|
||||
# Tools for building pdfs
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends make m4 chromium \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
&& truncate -s 0 /var/log/*log
|
||||
|
||||
# External tools
|
||||
# yq => manage YML
|
||||
RUN curl -sSL -o /usr/local/bin/yq \
|
||||
https://github.com/mikefarah/yq/releases/download/v4.44.6/yq_linux_amd64 \
|
||||
&& chmod +x /usr/local/bin/yq
|
||||
|
||||
COPY . /app
|
||||
COPY .marp /app/.marp
|
||||
WORKDIR /app
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
PIPENV_HIDE_EMOJIS=1 \
|
||||
PIPENV_VENV_IN_PROJECT=1
|
||||
|
||||
RUN ln -sf /usr/bin/python3 /usr/bin/python \
|
||||
&& make prepare SYSTEM_INSTALL=1
|
||||
|
||||
ENTRYPOINT ["/app/docker/entrypoint.sh"]
|
||||
CMD ["watch"]
|
||||
|
|
@ -6,15 +6,22 @@ set -e
|
|||
ARGS="$*"
|
||||
echo "Arguments: $ARGS"
|
||||
|
||||
EXT_UID=${EXT_UID:-999}
|
||||
EXT_GID=${EXT_GID:-999}
|
||||
EXT_UID="${EXT_UID:-999}"
|
||||
EXT_GID="${EXT_GID:-999}"
|
||||
DOCMACHINE_DOCS_ENABLE="${DOCMACHINE_DOCS_ENABLE:-1}"
|
||||
DOCMACHINE_SLIDES_ENABLE="${DOCMACHINE_SLIDES_ENABLE:-1}"
|
||||
|
||||
gx_workdir_prepare() {
|
||||
# Create missing directories
|
||||
mkdir -p _cache
|
||||
mkdir -p _build
|
||||
if [ "$DOCMACHINE_SLIDES_ENABLE" = "1" ]; then
|
||||
mkdir -p .marp
|
||||
fi
|
||||
mkdir -p /home/appuser
|
||||
}
|
||||
|
||||
gx_users_prepare() {
|
||||
# Create user with given ID if needed
|
||||
if ! grep -q "^[^:]*:[^:]*:$EXT_UID:" /etc/group ; then
|
||||
groupadd -g "$EXT_GID" appuser
|
||||
|
@ -25,15 +32,17 @@ if ! grep -q "^[^:]*:[^:]*:$EXT_UID:" /etc/passwd ; then
|
|||
useradd -r -u "$EXT_UID" -g appuser appuser
|
||||
fi
|
||||
|
||||
chown -R "$EXT_UID:$EXT_GID" _cache
|
||||
chown -R "$EXT_UID:$EXT_GID" _build
|
||||
chown -R "$EXT_UID:$EXT_GID" .marp
|
||||
chown -R "$EXT_UID:$EXT_GID" /home/appuser
|
||||
chown -R "$EXT_UID:$EXT_GID" slides
|
||||
chown -R "$EXT_UID:$EXT_GID" docs
|
||||
# echo "Setting permissions to $EXT_UID:$EXT_GID"
|
||||
# chown -R "$EXT_UID:$EXT_GID" _cache
|
||||
# chown -R "$EXT_UID:$EXT_GID" _build
|
||||
# chown -R "$EXT_UID:$EXT_GID" .marp
|
||||
# chown -R "$EXT_UID:$EXT_GID" /home/appuser
|
||||
# chown -R "$EXT_UID:$EXT_GID" slides
|
||||
# chown -R "$EXT_UID:$EXT_GID" docs
|
||||
}
|
||||
|
||||
gx_docs_configure() {
|
||||
# Patch mkdocs configuration
|
||||
# set -x
|
||||
if [ -f mkdocs-patch.yml ]; then
|
||||
# patch reference mkdocs with user-provided options
|
||||
yq eval-all '. as $item ireduce ({}; . * $item)' \
|
||||
|
@ -44,10 +53,20 @@ else
|
|||
# use reference mkdocs only (no options)
|
||||
ln -s mkdocs-source.yml mkdocs.yml
|
||||
fi
|
||||
# set +x
|
||||
}
|
||||
|
||||
##
|
||||
## Main
|
||||
##
|
||||
gx_workdir_prepare
|
||||
gx_users_prepare
|
||||
if [ "$DOCMACHINE_DOCS_ENABLE" = "1" ]; then
|
||||
gx_docs_configure
|
||||
fi
|
||||
|
||||
if [ "$1" = "supershell" ]; then
|
||||
exec bash
|
||||
else
|
||||
exec gosu "$EXT_UID:$EXT_GID" make "$@"
|
||||
# exec gosu "$EXT_UID:$EXT_GID" make "$@"
|
||||
exec make "$@"
|
||||
fi
|
||||
|
|
|
@ -8,6 +8,16 @@ hr {
|
|||
display: none;
|
||||
}
|
||||
|
||||
h1[bc-docs-hidden]
|
||||
h2[bc-docs-hidden]
|
||||
h3[bc-docs-hidden]
|
||||
h4[bc-docs-hidden]
|
||||
h5[bc-docs-hidden]
|
||||
h6[bc-docs-hidden] {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
@page {
|
||||
size: a4 portrait;
|
||||
margin: 25mm 10mm 25mm 10mm;
|
||||
|
@ -18,7 +28,7 @@ hr {
|
|||
|
||||
@top-left {
|
||||
font-size: 70%;
|
||||
content: 'Formation « Cloud & Enjeux »';
|
||||
content: 'Formation'; /* « Cloud & Enjeux »'; */
|
||||
}
|
||||
/*
|
||||
@top-center {
|
|
@ -1,37 +0,0 @@
|
|||
|
||||
@startmindmap
|
||||
|
||||
<style>
|
||||
node {
|
||||
Shadowing 0.0
|
||||
}
|
||||
</style>
|
||||
|
||||
* Types d'utilisateurs
|
||||
|
||||
right side
|
||||
|
||||
** Chercheurs d'emploi
|
||||
***[#FFCCCC] FIXME: clarifier les sous-types\nd'apres les réponses au questionnaire
|
||||
** Structure d'accompagnement
|
||||
*** Responsable d'accompagnement
|
||||
*** Chargé d'accompagnement
|
||||
****_ Conseiller·e d'orientation
|
||||
****_ Coach
|
||||
****_ Mentor ou expert·e
|
||||
****_ Parrain ou marraine
|
||||
****_ Animateur·trice
|
||||
****_ Révélateur de talent\nou facilitateur·trice
|
||||
****_ Influenceur·se
|
||||
****[#FFCCCC] FIXME: sont-ils équivalents ?
|
||||
|
||||
** TousTesPossibles\n LesCollectifsEmploi
|
||||
*** Animateur·trice réseau
|
||||
***[#FFCCCC] FIXME: Modérateur
|
||||
****_ Inter structures ?
|
||||
****_ Intra structures ?
|
||||
*** Administrateur·trice plate-forme (si centralisé)
|
||||
** Pole Emploi
|
||||
*** Conseiller d'orientation
|
||||
*** Directeur structure
|
||||
@endmindmap
|
|
@ -57,6 +57,7 @@ extra_javascript:
|
|||
markdown_extensions:
|
||||
- footnotes
|
||||
- admonition
|
||||
# - md_in_html
|
||||
- toc:
|
||||
permalink: '#'
|
||||
|
||||
|
|
12
package-lock.json
generated
12
package-lock.json
generated
|
@ -410,9 +410,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001662",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001662.tgz",
|
||||
"integrity": "sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA==",
|
||||
"version": "1.0.30001664",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz",
|
||||
"integrity": "sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
|
@ -2397,9 +2397,9 @@
|
|||
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001662",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001662.tgz",
|
||||
"integrity": "sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA=="
|
||||
"version": "1.0.30001664",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz",
|
||||
"integrity": "sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g=="
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.4.2",
|
||||
|
|
|
@ -10,6 +10,9 @@ docker-build: ## build docker image
|
|||
glenux/docmachine:$(BUILD_VERSION) \
|
||||
glenux/docmachine:latest
|
||||
|
||||
docker-save:
|
||||
env docker save glenux/docmachine:latest > ~/.cache/docmachine/image.tar
|
||||
|
||||
docker-push: ## push docker image
|
||||
env docker push glenux/docmachine:latest
|
||||
|
||||
|
|
|
@ -7,64 +7,60 @@ prepare-docs: ## install prerequisites for static docs site only
|
|||
.PHONY: prepare-docs
|
||||
prepare: prepare-docs
|
||||
|
||||
.PHONY: sync-docs-internal
|
||||
sync-docs-internal:
|
||||
@>&2 echo "ERROR: not implemented"
|
||||
exit 1
|
||||
|
||||
.PHONY: clean-docs
|
||||
clean-docs: ## remove generated static docs site
|
||||
rm -fr $(BUILD_DOCS_DIR)
|
||||
|
||||
.PHONY: clean-docs
|
||||
clean: clean-docs
|
||||
|
||||
# deploy-docs: ## deploy static docs site to github
|
||||
# git push $(DEPLOY_REPO)
|
||||
# pipenv run mkdocs gh-deploy $(DEPLOY_OPTS)
|
||||
|
||||
# .PHONY: deploy-docs
|
||||
# deploy: deploy-docs
|
||||
|
||||
build-docs-pdf: ## build pdf docs only
|
||||
mkdir -p $(BUILD_DOCS_DIR)
|
||||
rm -f $(BUILD_DOCS_DIR)/combined.pdf
|
||||
PYTHONUTF8=1 \
|
||||
ENABLE_PDF_EXPORT=1 \
|
||||
pipenv run mkdocs build \
|
||||
--site-dir $(BUILD_DOCS_DIR)
|
||||
pdftk \
|
||||
$$(find -L $(BUILD_DOCS_DIR) -name *.pdf -not -name index.pdf |sort ) \
|
||||
cat output $(BUILD_DOCS_DIR)/docs.pdf
|
||||
mkdir -p $(CACHE_DOCS_DIR)
|
||||
rm -f $(BUILD_DOCS_DIR)/docs.pdf
|
||||
./utils/docs/build_combined.sh $(DOCS_DIR) $(CACHE_DOCS_DIR)/combined.md
|
||||
./utils/docs/build_metadata.sh mkdocs.yml $(CACHE_DOCS_DIR)/metadata.yml
|
||||
./utils/docs/build_pdf.py $(CACHE_DOCS_DIR)/metadata.yml $(CACHE_DOCS_DIR)/combined.md $(BUILD_DOCS_DIR)/docs.pdf
|
||||
# rm -f $(BUILD_DOCS_DIR)/combined.pdf
|
||||
# PYTHONUTF8=1 \
|
||||
# ENABLE_PDF_EXPORT=1 \
|
||||
# pipenv run mkdocs build \
|
||||
# --site-dir $(BUILD_DOCS_DIR)
|
||||
# pdftk \
|
||||
# $$(find -L $(BUILD_DOCS_DIR) -name *.pdf -not -name index.pdf |sort ) \
|
||||
# cat output $(BUILD_DOCS_DIR)/docs.pdf
|
||||
|
||||
.PHONY: build-docs-pdf
|
||||
build-docs: build-docs-pdf
|
||||
|
||||
.PHONY: build-docs-html
|
||||
build-docs-html: ## build static docs site only
|
||||
mkdir -p $(BUILD_DOCS_DIR)
|
||||
pipenv run mkdocs build \
|
||||
--site-dir $(BUILD_DOCS_DIR)
|
||||
|
||||
.PHONY: build-docs-html
|
||||
build-docs: build-docs-html
|
||||
|
||||
build: build-docs
|
||||
|
||||
.PHONY: watch-docs-internal
|
||||
watch-docs-internal:
|
||||
pipenv run mkdocs serve --dev-addr 0.0.0.0:$(DOCS_PORT)
|
||||
.PHONY: watch-docs-internal
|
||||
|
||||
watch-docs: ## run development server for static docs site
|
||||
pipenv run honcho start watch-docs watch-toc
|
||||
|
||||
.PHONY: watch-docs
|
||||
watch: watch-docs
|
||||
|
||||
watch-docs: ## run development server for static docs site
|
||||
pipenv run honcho start watch-docs watch-toc
|
||||
|
||||
build-pdf: build-docs-pdf ## build docs as PDF files
|
||||
build-html: build-docs-html ## build docs as HTML files
|
||||
build-docs: build-docs-pdf build-docs-html ## build only docs as PDF and HTML
|
||||
|
||||
.PHONY: serve-docs
|
||||
serve-docs: watch-docs
|
||||
|
||||
.PHONY: watch-docs serve-docs
|
||||
.PHONY: watch-docs-internal
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ watch-slides-internal: .marp/theme.css
|
|||
--theme $$(pwd)/.marp/theme.css \
|
||||
-w $(SLIDES_DIR) \
|
||||
-s
|
||||
# --theme-set glenux
|
||||
|
||||
.PHONY: watch-slides serve-slides
|
||||
watch-slides: ## run development server for PDF slides
|
||||
|
|
7
utils/docs/blockquote.tex
Normal file
7
utils/docs/blockquote.tex
Normal file
|
@ -0,0 +1,7 @@
|
|||
% blockquote.tex
|
||||
% Stylish blockquote setup
|
||||
\usepackage{tcolorbox} % Load the tcolorbox package for creating colored boxes
|
||||
% Define a new tcolorbox environment named 'myquote' with specified colors
|
||||
\newtcolorbox{myquote}{colback=red!5!white, colframe=red!75!black}
|
||||
% Redefine the standard 'quote' environment to use 'myquote'
|
||||
\renewenvironment{quote}{\begin{myquote}}{\end{myquote}}
|
27
utils/docs/build_combined.sh
Executable file
27
utils/docs/build_combined.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ue
|
||||
|
||||
INPUT_DIR="$1"
|
||||
OUTPUT_FILE="$2"
|
||||
|
||||
gx_usage() {
|
||||
echo "Usage: $0 <input_dir> <output_file>"
|
||||
echo ""
|
||||
}
|
||||
|
||||
if [ -z "$INPUT_DIR" ]; then
|
||||
gx_usage
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$OUTPUT_FILE" ]; then
|
||||
gx_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
find -L "$INPUT_DIR" -regextype sed \( -regex '.*/[0-9][^/]*\.md' ! -regex '.*/_.*' \) -print0 \
|
||||
| sort -z \
|
||||
| xargs -0 -iFILE cat FILE \
|
||||
| sed -e 's/^\s*----\s*$//' -e 's,\[\](.*/images/,[](./images/,' \
|
||||
> "$OUTPUT_FILE"
|
||||
|
33
utils/docs/build_metadata.sh
Executable file
33
utils/docs/build_metadata.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ue
|
||||
|
||||
MKDOCS_YML_FILE="${1:-}"
|
||||
OUTPUT_FILE="${2:-}"
|
||||
|
||||
gx_usage() {
|
||||
echo "Usage: $0 <mkdocs_yml_file> <output_file>"
|
||||
echo ""
|
||||
}
|
||||
|
||||
if [ -z "$MKDOCS_YML_FILE" ]; then
|
||||
gx_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$OUTPUT_FILE" ]; then
|
||||
gx_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TITLE="$(yq -r '.site_name' < "$MKDOCS_YML_FILE")"
|
||||
AUTHOR="$(yq -r '.site_author' < "$MKDOCS_YML_FILE")"
|
||||
|
||||
cat > "$OUTPUT_FILE" <<-MARK
|
||||
---
|
||||
title: Formation
|
||||
subtitle: "$TITLE"
|
||||
author: "$AUTHOR"
|
||||
date: \today
|
||||
MARK
|
||||
|
71
utils/docs/build_pdf.py
Executable file
71
utils/docs/build_pdf.py
Executable file
|
@ -0,0 +1,71 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# Usage: ./build.py INPUT_DIR OUTPUT_FILE
|
||||
|
||||
import os
|
||||
# import re
|
||||
import sys
|
||||
import pypandoc
|
||||
|
||||
|
||||
def gx_usage():
|
||||
"""Show usage"""
|
||||
print(f"Usage: {sys.argv[0]} METADATA_FILE INPUT_FILE OUTPUT_FILE")
|
||||
print()
|
||||
|
||||
|
||||
if len(sys.argv) != 4:
|
||||
gx_usage()
|
||||
|
||||
metadata_file = sys.argv[1]
|
||||
if not os.path.exists(metadata_file):
|
||||
print(f"Metadata file not found: {metadata_file}")
|
||||
sys.exit(1)
|
||||
|
||||
input_file = sys.argv[2]
|
||||
if not os.path.exists(input_file):
|
||||
print(f"Input file not found: {input_file}")
|
||||
sys.exit(1)
|
||||
|
||||
# Get second
|
||||
output_file = sys.argv[3]
|
||||
if os.path.exists(output_file):
|
||||
print(f"Output file already exists: {output_file}")
|
||||
sys.exit(1)
|
||||
|
||||
print(f"Metadata: {metadata_file}")
|
||||
print(f"Input: {input_file}")
|
||||
print(f"Output: {output_file}")
|
||||
|
||||
# Build the pandoc options as a string
|
||||
pandoc_cmd = [
|
||||
"--verbose",
|
||||
"--toc",
|
||||
"--number-sections",
|
||||
"--include-in-header", "utils/docs/main.tex",
|
||||
"--metadata-file", metadata_file,
|
||||
# "-V", "linkcolor:blue",
|
||||
# "-V", "geometry:a4paper",
|
||||
# "-V", "geometry:margin=1.8cm",
|
||||
"-V", "mainfont=DejaVu Serif",
|
||||
"-V", "monofont=Noto Sans Mono",
|
||||
"--pdf-engine=xelatex",
|
||||
"--resource-path=utils/docs",
|
||||
"--filter=./utils/docs/filter-nobg.hs",
|
||||
]
|
||||
|
||||
# from glob import glob
|
||||
# input_files = [os.path.join(dp, f) for dp, dn, filenames in os.walk(input_dir) for f in filenames if re.search(r'^[0-9].*\.md$', f)]
|
||||
# input_files.sort()
|
||||
|
||||
# Convert all markdown files in the chapters/ subdirectory.
|
||||
pypandoc.convert_file(
|
||||
input_file,
|
||||
"pdf",
|
||||
outputfile=output_file,
|
||||
extra_args=pandoc_cmd,
|
||||
)
|
||||
|
||||
print(f"Conversion completed. Output saved to: {output_file}")
|
||||
|
||||
#
|
4
utils/docs/chapter_breaks.tex
Normal file
4
utils/docs/chapter_breaks.tex
Normal file
|
@ -0,0 +1,4 @@
|
|||
% chapter_breaks.tex
|
||||
% Chapter breaks setup
|
||||
\usepackage{sectsty}
|
||||
\sectionfont{\clearpage}
|
23
utils/docs/filter-nobg.hs
Executable file
23
utils/docs/filter-nobg.hs
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env runhaskell
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
import Text.Pandoc.JSON
|
||||
import Data.Text (Text, isInfixOf)
|
||||
|
||||
-- Function to filter out images with 'bg' in alt text
|
||||
filterImage :: Inline -> Inline
|
||||
filterImage img@(Image attr alt _) =
|
||||
if any ("bg" `isInfixOf`) (map stringify alt)
|
||||
then Str ""
|
||||
else img
|
||||
filterImage x = x
|
||||
|
||||
-- Stringify function to convert inlines to Text
|
||||
stringify :: Inline -> Text
|
||||
stringify (Str txt) = txt
|
||||
stringify _ = ""
|
||||
|
||||
-- Main function
|
||||
main :: IO ()
|
||||
main = toJSONFilter filterImage
|
||||
|
9
utils/docs/hyperref_setup.tex
Normal file
9
utils/docs/hyperref_setup.tex
Normal file
|
@ -0,0 +1,9 @@
|
|||
% hyperref_setup.tex
|
||||
% Hyperref setup
|
||||
\usepackage{hyperref}
|
||||
\hypersetup{
|
||||
colorlinks=true,
|
||||
linkcolor=blue,
|
||||
filecolor=magenta,
|
||||
urlcolor=blue,
|
||||
}
|
32
utils/docs/main.tex
Normal file
32
utils/docs/main.tex
Normal file
|
@ -0,0 +1,32 @@
|
|||
% main.tex
|
||||
|
||||
% Set the document language to English
|
||||
\usepackage[english]{babel}
|
||||
% \usepackage[utf8]{inputenc}
|
||||
% \DeclareUnicodeCharacter{21D2}{$\Rightarrow$}
|
||||
|
||||
% Adjust page geometry
|
||||
\usepackage[
|
||||
a4paper, inner=1.5cm, outer=1.5cm, top=2cm, bottom=2cm,
|
||||
% bindingoffset=0.5cm
|
||||
]{geometry}
|
||||
|
||||
% Configure headers and footers using scrlayer-scrpage
|
||||
\usepackage[automark,headsepline,footsepline]{scrlayer-scrpage}
|
||||
\clearpairofpagestyles
|
||||
\ohead{\headmark}
|
||||
\ofoot{\pagemark}
|
||||
\pagestyle{scrheadings}
|
||||
|
||||
|
||||
% Include additional settings from external files
|
||||
% \input{inline_code.tex}
|
||||
% \input{bullet_styling.tex}
|
||||
\input{utils/docs/chapter_breaks.tex}
|
||||
\input{utils/docs/blockquote.tex}
|
||||
\input{utils/docs/hyperref_setup.tex}
|
||||
|
||||
% Font settings using fontspec
|
||||
\usepackage{fontspec}
|
||||
% \setmainfont{DejaVu Serif} % Set your main font
|
||||
% \setmonofont{SauceCodePro Nerd Font} % Set your monospace (code) font
|
5
utils/docs/metadata.yml
Normal file
5
utils/docs/metadata.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Formation
|
||||
subtitle: MariaDB
|
||||
author: Glenn Y. Rolland <teaching@glenux.net>
|
||||
date: \today
|
Loading…
Add table
Reference in a new issue