Compare commits
14 Commits
develop
...
feature/xe
Author | SHA1 | Date |
---|---|---|
Benjamin Bohard | 822fd277d5 | |
Benjamin Bohard | a821fb141f | |
Benjamin Bohard | d4547175da | |
Benjamin Bohard | 7b2644b953 | |
Benjamin Bohard | 4aecce6094 | |
Benjamin Bohard | 2a65d38c37 | |
Benjamin Bohard | 5591c2c0f0 | |
Benjamin Bohard | 0c09b27b8e | |
Benjamin Bohard | 5676297827 | |
Benjamin Bohard | 822dc3617c | |
Benjamin Bohard | 0172b4f62c | |
Benjamin Bohard | d27cc4bf1b | |
Benjamin Bohard | 2606a82c17 | |
Benjamin Bohard | bb633a212c |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
pushd /src
|
||||||
|
document_root=${PROJECT}
|
||||||
|
for tex in ./presentations/${document_root}/*.tex
|
||||||
|
do
|
||||||
|
rubber --inplace -c shell_escape --unsafe --module=xelatex "$tex"
|
||||||
|
cp "${tex%.tex}.pdf" /dist/
|
||||||
|
# faire quelque chose pour le programme de la formation
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo 'ENV DEBIAN_FRONTEND=noninteractive' >> Dockerfile
|
||||||
|
echo 'RUN apt-get update && apt-get install --yes texlive-full' >> Dockerfile
|
||||||
|
echo 'RUN apt-get update && apt-get install --yes make' >> Dockerfile
|
||||||
|
echo 'RUN apt-get update && apt-get install --yes fonts-liberation fonts-liberation2' >> Dockerfile
|
||||||
|
echo 'RUN apt-get update && apt-get install --yes python3-setuptools python-setuptools python3-pygments python-pygments' >> Dockerfile
|
||||||
|
echo 'RUN apt-get update && apt-get install --yes rubber' >> Dockerfile
|
||||||
|
echo 'ENV DEBIAN_FRONTEND=' >> Dockerfile
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
|
||||||
|
if [ -e './datasets/fonts' ]
|
||||||
|
then
|
||||||
|
for font_file in $(find . -wholename "./datasets/fonts/*.ttf")
|
||||||
|
do
|
||||||
|
echo 'COPY datasets/fonts/$font_file /root/.fonts/$font_file' >> Dockerfile
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function move_output_to_dist {
|
||||||
|
find . -name "$1" -type f -print0 | xargs -0r mv -t /dist/
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create new directory
|
||||||
|
mkdir -p /dist
|
||||||
|
|
||||||
|
# Move generated files
|
||||||
|
move_output_to_dist "*.pdf"
|
||||||
|
|
||||||
|
tamarin_success "Done :-)"
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cd src
|
|
@ -55,6 +55,10 @@ def get_workspace_subdir(subdir):
|
||||||
os.makedirs(dir_path, exist_ok=True)
|
os.makedirs(dir_path, exist_ok=True)
|
||||||
return dir_path
|
return dir_path
|
||||||
|
|
||||||
|
def get_datasets_dir():
|
||||||
|
return os.path.realpath(os.path.dirname(os.path.abspath(__file__)) + "/../datasets")
|
||||||
|
|
||||||
|
|
||||||
def run(cmd, captureOutput=False, pty=False, debug=False, **kwargs):
|
def run(cmd, captureOutput=False, pty=False, debug=False, **kwargs):
|
||||||
"""Execute an arbitrary command on the system"""
|
"""Execute an arbitrary command on the system"""
|
||||||
if debug:
|
if debug:
|
||||||
|
|
15
package
15
package
|
@ -84,7 +84,7 @@ if __name__ == "__main__":
|
||||||
build_workspace = tamarin.get_workspace_subdir('tmp/build_{:d}'.format(pid))
|
build_workspace = tamarin.get_workspace_subdir('tmp/build_{:d}'.format(pid))
|
||||||
|
|
||||||
shutil.copytree(tamarin.get_utils_dir(), os.path.join(build_workspace, 'utils'))
|
shutil.copytree(tamarin.get_utils_dir(), os.path.join(build_workspace, 'utils'))
|
||||||
|
shutil.copytree(tamarin.get_datasets_dir(), os.path.join(build_workspace, 'datasets'))
|
||||||
base_image = args.base if args.base != '' else profile['profile']['default_image']
|
base_image = args.base if args.base != '' else profile['profile']['default_image']
|
||||||
|
|
||||||
image_tag = build_image(build_workspace, base_image, args.profile, profile, debug=args.debug, rebuild=args.rebuild)
|
image_tag = build_image(build_workspace, base_image, args.profile, profile, debug=args.debug, rebuild=args.rebuild)
|
||||||
|
@ -108,16 +108,17 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
# volumes definition
|
# volumes definition
|
||||||
docker_args += [
|
docker_args += [
|
||||||
"-v", "{:s}:/src:ro".format(project_dir),
|
"-v", "{:s}:/src:z,ro".format(project_dir),
|
||||||
"-v", "{:s}:/dist".format(output_dir),
|
"-v", "{:s}:/dist:z".format(output_dir),
|
||||||
|
"-v", "{:s}:/tamarin/datasets:z".format(tamarin.get_datasets_dir()),
|
||||||
]
|
]
|
||||||
|
|
||||||
if not args.no_lib_mounts:
|
if not args.no_lib_mounts:
|
||||||
docker_args += [
|
docker_args += [
|
||||||
"-v", "{:s}:/tamarin/hooks:ro".format(tamarin.get_hooks_dir()),
|
"-v", "{:s}:/tamarin/hooks:z,ro".format(tamarin.get_hooks_dir()),
|
||||||
"-v", "{:s}:/tamarin/lib:ro".format(tamarin.get_lib_dir()),
|
"-v", "{:s}:/tamarin/lib:z,ro".format(tamarin.get_lib_dir()),
|
||||||
"-v", "{:s}:/tamarin/profiles:ro".format(tamarin.get_profiles_dir()),
|
"-v", "{:s}:/tamarin/profiles:z,ro".format(tamarin.get_profiles_dir()),
|
||||||
"-v", "{:s}:/tamarin/utils:ro".format(tamarin.get_utils_dir())
|
"-v", "{:s}:/tamarin/utils:z,ro".format(tamarin.get_utils_dir())
|
||||||
]
|
]
|
||||||
|
|
||||||
# Use environment proxy if defined
|
# Use environment proxy if defined
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Configuration générale du profil
|
||||||
|
[profile]
|
||||||
|
# Image Docker par défaut
|
||||||
|
default_image=ubuntu:focal
|
||||||
|
|
||||||
|
# Configuration de l’étape de pré-construction du conteneur
|
||||||
|
[containerbuild]
|
||||||
|
hooks=
|
||||||
|
containerbuild/texlive/add-packages,
|
||||||
|
containerbuild/texlive/add-ressources,
|
||||||
|
|
||||||
|
# Configuration de l’étape de pré-compilation des documents
|
||||||
|
[prebuild]
|
||||||
|
hooks=
|
||||||
|
prebuild/debian/copy-sources-to-workspace,
|
||||||
|
prebuild/debian/run-project-hooks,
|
||||||
|
prebuild/debian/load-project-db,
|
||||||
|
prebuild/texlive/complete-project-db,
|
||||||
|
|
||||||
|
# Configuration de l’étape de compilation du document
|
||||||
|
[build]
|
||||||
|
hooks=build/texlive/xelatex
|
||||||
|
|
||||||
|
# Configuration de l’étape de post-compilation du document
|
||||||
|
[postbuild]
|
||||||
|
hooks=
|
||||||
|
postbuild/debian/run-project-hooks,
|
||||||
|
postbuild/texlive/export-dist,
|
Loading…
Reference in New Issue