Ajout de Yapp et correction Emojis

This commit is contained in:
Francois Pelletier 2023-05-17 15:53:44 -04:00
parent 3d69f571d5
commit 05d72deb22
58 changed files with 826 additions and 127 deletions

16
DocumentSpecs.py Normal file
View file

@ -0,0 +1,16 @@
from pydantic import BaseModel
class DocumentSpecs(BaseModel):
format: str
style: str
linkcolor: str
tocdepth: int
pdfengine: str
content: str
fontsize: int
paperwidth: int
paperheight: int
margin: int
vmargin: int
extension: str

13
FormatParameters.py Normal file
View file

@ -0,0 +1,13 @@
from pydantic import BaseModel
class FormatParameters(BaseModel):
linkcolor: str
tocdepth: int
pdfengine: str
fontsize: int
paperwidth: int
paperheight: int
margin: int
vmargin: int
extension: str

27
convert_pdf.py Normal file
View file

@ -0,0 +1,27 @@
import os
from wand.color import Color
from wand.image import Image
def convert_pdf(filename, filetype, output_path, resolution=300):
""" Convert a PDF into images.
All the pages will give a single png file with format:
{pdf_filename}-{page_number}.png
The function removes the alpha channel from the image and
replace it with a white background.
"""
all_pages = Image(filename=filename, resolution=resolution)
for i, page in enumerate(all_pages.sequence):
with Image(page) as img:
img.format = filetype
img.background_color = Color('white')
img.alpha_channel = 'remove'
image_filename = os.path.splitext(os.path.basename(filename))[0]
image_filename = f'{image_filename}-{i}.{filetype}'
image_filename = os.path.join(output_path, image_filename)
img.save(filename=image_filename)

13
extract_emojis.py Normal file
View file

@ -0,0 +1,13 @@
import emoji
def replace_emojis(input_text):
'''
Replaces emojis in text with a custom LaTeX sequence.
:param input_text:
:return:
'''
for char in input_text:
if emoji.is_emoji(char):
input_text = input_text.replace(char, f"\\emoji{{{char}}}")
return input_text

Binary file not shown.

10
list_dir.py Normal file
View file

@ -0,0 +1,10 @@
import os
def list_dir(path):
'''
function to list only directories inside given directory
:param path:
:return:
'''
return [f for f in os.listdir(path) if os.path.isdir(os.path.join(path, f))]

98
main.py
View file

@ -3,78 +3,18 @@ import logging
from fastapi import FastAPI
from fastapi.responses import FileResponse
from pydantic import BaseModel
from typing import List
import pypandoc
import json
from fastapi.testclient import TestClient
import os
from wand.image import Image
from wand.color import Color
import shutil
class DocumentSpecs(BaseModel):
format: str
style: str
linkcolor: str
tocdepth: int
pdfengine: str
content: str
fontsize: int
paperwidth: int
paperheight: int
margin: int
vmargin: int
extension: str
class FormatParameters(BaseModel):
linkcolor: str
tocdepth: int
pdfengine: str
fontsize: int
paperwidth: int
paperheight: int
margin: int
vmargin: int
extension: str
class Styles(BaseModel):
styles: List[str]
class Formats(BaseModel):
formats: List[str]
class App(BaseModel):
app: str
def convert_pdf(filename, filetype, output_path, resolution=300):
""" Convert a PDF into images.
All the pages will give a single png file with format:
{pdf_filename}-{page_number}.png
The function removes the alpha channel from the image and
replace it with a white background.
"""
all_pages = Image(filename=filename, resolution=resolution)
for i, page in enumerate(all_pages.sequence):
with Image(page) as img:
img.format = filetype
img.background_color = Color('white')
img.alpha_channel = 'remove'
image_filename = os.path.splitext(os.path.basename(filename))[0]
image_filename = f'{image_filename}-{i}.{filetype}'
image_filename = os.path.join(output_path, image_filename)
img.save(filename=image_filename)
from DocumentSpecs import DocumentSpecs
from FormatParameters import FormatParameters
from convert_pdf import convert_pdf
from extract_emojis import replace_emojis
from list_dir import list_dir
from responses import Styles, Formats, App
app = FastAPI()
@ -85,11 +25,6 @@ async def get_root():
return app
# function to list only directories inside given directory
def list_dir(path):
return [f for f in os.listdir(path) if os.path.isdir(os.path.join(path, f))]
@app.get("/styles/")
async def get_styles():
styles = Styles(styles=list_dir("./styles"))
@ -101,7 +36,6 @@ async def get_formats(style: str):
formats = Formats(formats=list_dir(f"./styles/{style}/"))
return formats
@app.get("/format_parameters/{style}/{format}/")
async def get_format_parameters(style: str, format: str):
# open styles/format_parameters.json as a dictionary
@ -138,16 +72,18 @@ async def generer(specs: DocumentSpecs):
try:
logging.info("Dossier courant = " + os.getcwd())
result = pypandoc.convert_text(source=specs.content,
to='pdf',
format='markdown+implicit_figures+smart',
encoding='utf-8',
extra_args=pdoc_args,
filters=filters,
cworkdir=os.getcwd(),
outputfile=output_file
)
text_to_convert = replace_emojis(specs.content)
result = pypandoc.convert_text(source=text_to_convert,
to='pdf',
format='markdown+implicit_figures+smart',
encoding='utf-8',
extra_args=pdoc_args,
filters=filters,
cworkdir=os.getcwd(),
outputfile=output_file
)
logging.info(result)
except RuntimeError as rerr:
logging.exception(rerr)
except OSError as oerr:

View file

@ -1,26 +1,27 @@
h11~=0.14.0
pip~=21.3.1
wheel~=0.37.1
pip==23.1.2
wheel==0.40.0
PyYAML~=6.0
anyio~=3.6.2
sniffio~=1.3.0
click~=8.1.3
httpcore~=0.16.3
httpcore==0.17.0
idna~=3.4
rfc3986~=1.5.0
certifi~=2022.12.7
rfc3986==2.0.0
certifi==2023.5.7
pandoc~=2.3
ply~=3.11
plumbum~=1.8.0
uvloop~=0.17.0
fastapi~=0.88.0
starlette~=0.22.0
fastapi==0.95.2
starlette==0.27.0
pydantic~=1.10.2
websockets~=10.4
uvicorn~=0.20.0
websockets==11.0.3
uvicorn==0.22.0
httptools~=0.5.0
watchfiles~=0.18.1
httpx~=0.23.1
setuptools~=60.2.0
pypandoc~=1.10
Wand~=0.6.10
watchfiles==0.19.0
httpx==0.24.0
setuptools==67.7.2
pypandoc==1.11
Wand~=0.6.10
emoji~=2.2.0

15
responses.py Normal file
View file

@ -0,0 +1,15 @@
from typing import List
from pydantic import BaseModel
class Styles(BaseModel):
styles: List[str]
class Formats(BaseModel):
formats: List[str]
class App(BaseModel):
app: str

View file

@ -46,4 +46,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -56,7 +56,9 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}
\hyphenpenalty=10000
\hbadness=10000

View file

@ -46,4 +46,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -50,7 +50,9 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}
\hyphenpenalty=10000
\hbadness=10000

View file

@ -50,7 +50,9 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}
\hyphenpenalty=10000
\hbadness=10000

View file

@ -54,4 +54,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -54,4 +54,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -46,4 +46,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -56,4 +56,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -46,4 +46,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -50,4 +50,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -54,4 +54,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -46,4 +46,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -56,7 +56,9 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}
\hyphenpenalty=10000
\hbadness=10000

View file

@ -46,4 +46,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -50,7 +50,9 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}
\hyphenpenalty=10000
\hbadness=10000

View file

@ -50,7 +50,9 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}
\hyphenpenalty=10000
\hbadness=10000

View file

@ -54,4 +54,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -54,4 +54,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -46,4 +46,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -56,7 +56,9 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}
\hyphenpenalty=10000
\hbadness=10000

View file

@ -46,4 +46,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -50,7 +50,9 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}
\hyphenpenalty=10000
\hbadness=10000

View file

@ -50,7 +50,9 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}
\hyphenpenalty=10000
\hbadness=10000

View file

@ -54,4 +54,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -54,4 +54,6 @@
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\usepackage{emoji}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

Binary file not shown.

View file

@ -0,0 +1,23 @@
\newpage
\thispagestyle{empty}
\noindent Tous droits réservés\ \newline \the\year{}\ -\ François Pelletier
\leavevmode \newline
\noindent Visite mon site web au \url{https://jevalide.ca} et mes réseaux sociaux au \url{https://linktr.ee/jevalideca}
\leavevmode \newline
\noindent \doclicenseThis
\leavevmode \newline
\noindent Publié le \today
\leavevmode \newline
\noindent Mise en page effectuée avec \LaTeX
\pagebreak

View file

@ -0,0 +1,51 @@
\usepackage[french]{babel} % Césure en français
\usepackage[autolanguage]{numprint}
\usepackage[
type={CC},
modifier={by-sa},
version={4.0},
]{doclicense}
\usepackage{wallpaper}
\makeatletter
\ULCornerWallPaper{1}{./styles/yapp/a4paper/Yapp-A4.pdf}
\makeatother
\usepackage{listings}
\usepackage{xcolor}
\lstset{
basicstyle=\ttfamily,
numbers=left,
numberstyle=\footnotesize,
stepnumber=2,
numbersep=5pt,
backgroundcolor=\color{black!10},
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
captionpos=b,
breaklines=true,
breakatwhitespace=true,
breakautoindent=true,
linewidth=\textwidth
}
% Override default figure placement To be within the flow of the text rather
% than on it's own page.
\usepackage{float}
\makeatletter
\def\fps@figure{H}
\makeatother
\usepackage{fontspec}
\setmainfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -0,0 +1,79 @@
{
"a4paper": {
"linkcolor": "blue",
"tocdepth": 3,
"pdfengine": "lualatex",
"fontsize": 12,
"paperwidth": 2480,
"paperheight": 3507,
"margin": 248,
"vmargin": 350,
"extension": "pdf"
},
"lettre": {
"linkcolor": "blue",
"tocdepth": 3,
"pdfengine": "lualatex",
"fontsize": 12,
"paperwidth": 2550,
"paperheight": 3300,
"margin": 255,
"vmargin": 330,
"extension": "pdf"
},
"linkedin": {
"linkcolor": "blue",
"tocdepth": 2,
"pdfengine": "lualatex",
"fontsize": 16,
"paperwidth": 1200,
"paperheight": 1200,
"margin": 120,
"vmargin": 120,
"extension": "jpg"
},
"instagram": {
"linkcolor": "blue",
"tocdepth": 2,
"pdfengine": "lualatex",
"fontsize": 16,
"paperwidth": 1080,
"paperheight": 1920,
"margin": 108,
"vmargin": 192,
"extension": "jpg"
},
"pinterest": {
"linkcolor": "blue",
"tocdepth": 2,
"pdfengine": "lualatex",
"fontsize": 16,
"paperwidth": 735,
"paperheight": 1102,
"margin": 75,
"vmargin": 110,
"extension": "jpg"
},
"slide43": {
"linkcolor": "blue",
"tocdepth": 2,
"pdfengine": "lualatex",
"fontsize": 16,
"paperwidth": 2560,
"paperheight": 1920,
"margin": 256,
"vmargin": 192,
"extension": "pdf"
},
"slide169": {
"linkcolor": "blue",
"tocdepth": 2,
"pdfengine": "lualatex",
"fontsize": 16,
"paperwidth": 2560,
"paperheight": 1440,
"margin": 256,
"vmargin": 144,
"extension": "pdf"
}
}

Binary file not shown.

View file

@ -0,0 +1,17 @@
\newpage
\thispagestyle{empty}
\noindent Tu apprécies ? \emoji{red-heart} et partage !\newline
\noindent Certains droits réservés\newline\ccbysa\newline \the\year{}\ -\ François Pelletier
\noindent Site web: \newline\url{https://jevalide.ca}
\noindent Réseaux sociaux: \newline\url{https://linktr.ee/jevalideca}
\noindent Publié le \today.
\noindent Mise en page effectuée avec \LaTeX
\pagebreak

View file

@ -0,0 +1,65 @@
\usepackage[french]{babel} % Césure en français
\usepackage[autolanguage]{numprint}
\usepackage[
type={CC},
modifier={by-sa},
version={4.0},
]{doclicense}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{geometry}
\lstset{
basicstyle=\ttfamily,
numbers=left,
numberstyle=\footnotesize,
stepnumber=2,
numbersep=5pt,
backgroundcolor=\color{black!10},
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
captionpos=b,
breaklines=true,
breakatwhitespace=true,
breakautoindent=true,
linewidth=\textwidth
}
\usepackage{wallpaper}
\makeatletter
\ULCornerWallPaper{1}{./styles/yapp/instagram/Yapp-FondStory.pdf}
\makeatother
% Override default figure placement To be within the flow of the text rather
% than on it's own page.
\usepackage{float}
\makeatletter
\def\fps@figure{H}
\makeatother
\pagenumbering{gobble}
\AddToHook{cmd/section/before}{\clearpage}
\AddToHook{cmd/subsection/before}{\clearpage}
\usepackage{caption}
\DeclareCaptionLabelFormat{nolabel}{}
\captionsetup{labelformat=nolabel,textformat=empty}
\usepackage{fontspec}
\setmainfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}
\hyphenpenalty=10000
\hbadness=10000
\centering

Binary file not shown.

View file

@ -0,0 +1,23 @@
\newpage
\thispagestyle{empty}
\noindent Tous droits réservés\ \newline \the\year{}\ -\ François Pelletier
\leavevmode \newline
\noindent Visite mon site web au \url{https://jevalide.ca} et mes réseaux sociaux au \url{https://linktr.ee/jevalideca}
\leavevmode \newline
\noindent \doclicenseThis
\leavevmode \newline
\noindent Publié le \today
\leavevmode \newline
\noindent Mise en page effectuée avec \LaTeX
\pagebreak

View file

@ -0,0 +1,51 @@
\usepackage[french]{babel} % Césure en français
\usepackage[autolanguage]{numprint}
\usepackage[
type={CC},
modifier={by-sa},
version={4.0},
]{doclicense}
\usepackage{xcolor}
\usepackage{listings}
\lstset{
basicstyle=\ttfamily,
numbers=left,
numberstyle=\footnotesize,
stepnumber=2,
numbersep=5pt,
backgroundcolor=\color{black!10},
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
captionpos=b,
breaklines=true,
breakatwhitespace=true,
breakautoindent=true,
linewidth=\textwidth
}
\usepackage{wallpaper}
\makeatletter
\ULCornerWallPaper{1}{./styles/yapp/lettre/Yapp-Lettre.pdf}
\makeatother
% Override default figure placement To be within the flow of the text rather
% than on it's own page.
\usepackage{float}
\makeatletter
\def\fps@figure{H}
\makeatother
\usepackage{fontspec}
\setmainfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

Binary file not shown.

View file

@ -0,0 +1,19 @@
\newpage
\thispagestyle{empty}
\noindent Tu apprécies ? \emoji{red-heart} et partage !\newline
\noindent Site web: \url{https://jevalide.ca}
\noindent Réseaux sociaux: \newline\url{https://linktr.ee/jevalideca}
\pagebreak
\noindent Certains droits réservés\ \ccbysa \newline \the\year{}\ -\ François Pelletier
\noindent Publié le \today.
\noindent Mise en page effectuée avec \LaTeX
\pagebreak

View file

@ -0,0 +1,60 @@
\usepackage[french]{babel} % Césure en français
\usepackage[autolanguage]{numprint}
\usepackage{ccicons}
\usepackage{wallpaper}
\makeatletter
\ULCornerWallPaper{1}{./styles/yapp/linkedin/Yapp-Carre.pdf}
\makeatother
\usepackage{xcolor}
\usepackage{listings}
\lstset{
basicstyle=\ttfamily,
numbers=left,
numberstyle=\footnotesize,
stepnumber=2,
numbersep=5pt,
backgroundcolor=\color{black!10},
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
captionpos=b,
breaklines=true,
breakatwhitespace=true,
breakautoindent=true,
linewidth=\textwidth
}
% Override default figure placement To be within the flow of the text rather
% than on it's own page.
\usepackage{float}
\makeatletter
\def\fps@figure{H}
\makeatother
\pagenumbering{gobble}
\AddToHook{cmd/section/before}{\clearpage}
\AddToHook{cmd/subsection/before}{\clearpage}
\usepackage{caption}
\DeclareCaptionLabelFormat{nolabel}{}
\captionsetup{labelformat=nolabel,textformat=empty}
\usepackage{fontspec}
\setmainfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}
\hyphenpenalty=10000
\hbadness=10000
\centering

Binary file not shown.

View file

@ -0,0 +1,19 @@
\newpage
\thispagestyle{empty}
\noindent Tu apprécies ? \emoji{red-heart} et partage !\newline
\noindent Site web: \url{https://jevalide.ca}
\noindent Réseaux sociaux: \newline\url{https://linktr.ee/jevalideca}
\pagebreak
\noindent Certains droits réservés\ \ccbysa \newline \the\year{}\ -\ François Pelletier
\noindent Publié le \today.
\noindent Mise en page effectuée avec \LaTeX
\pagebreak

View file

@ -0,0 +1,59 @@
\usepackage[french]{babel} % Césure en français
\usepackage[autolanguage]{numprint}
\usepackage{ccicons}
\usepackage{wallpaper}
\makeatletter
\ULCornerWallPaper{1}{./styles/yapp/pinterest/Yapp-Pinterest.pdf}
\makeatother
\usepackage{xcolor}
\usepackage{listings}
\lstset{
basicstyle=\ttfamily,
numbers=left,
numberstyle=\footnotesize,
stepnumber=2,
numbersep=5pt,
backgroundcolor=\color{black!10},
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
captionpos=b,
breaklines=true,
breakatwhitespace=true,
breakautoindent=true,
linewidth=\textwidth
}
% Override default figure placement To be within the flow of the text rather
% than on it's own page.
\usepackage{float}
\makeatletter
\def\fps@figure{H}
\makeatother
\pagenumbering{gobble}
\AddToHook{cmd/section/before}{\clearpage}
\AddToHook{cmd/subsection/before}{\clearpage}
\usepackage{caption}
\DeclareCaptionLabelFormat{nolabel}{}
\captionsetup{labelformat=nolabel,textformat=empty}
\usepackage{fontspec}
\setmainfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}
\hyphenpenalty=10000
\hbadness=10000
\centering

Binary file not shown.

View file

@ -0,0 +1,15 @@
\newpage
\thispagestyle{empty}
\noindent Tous droits réservés\ \newline \the\year{}\ -\ François Pelletier
\noindent Site web: \newline\url{https://jevalide.ca}
\noindent Réseaux sociaux: \newline\url{https://linktr.ee/jevalideca}
\noindent Publié le \today.
\noindent Mise en page effectuée avec \LaTeX
\pagebreak

View file

@ -0,0 +1,59 @@
\usepackage[french]{babel} % Césure en français
\usepackage[autolanguage]{numprint}
\usepackage[
type={CC},
modifier={by-sa},
version={4.0},
]{doclicense}
\usepackage{xcolor}
\usepackage{listings}
\lstset{
basicstyle=\ttfamily,
numbers=left,
numberstyle=\footnotesize,
stepnumber=2,
numbersep=5pt,
backgroundcolor=\color{black!10},
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
captionpos=b,
breaklines=true,
breakatwhitespace=true,
breakautoindent=true,
linewidth=\textwidth
}
\usepackage{wallpaper}
\makeatletter
\ULCornerWallPaper{1}{./styles/yapp/slide169/Yapp-slide169.pdf}
\makeatother
% Override default figure placement To be within the flow of the text rather
% than on it's own page.
\usepackage{float}
\makeatletter
\def\fps@figure{H}
\makeatother
\pagenumbering{gobble}
\AddToHook{cmd/section/before}{\clearpage}
\AddToHook{cmd/subsection/before}{\clearpage}
\usepackage{caption}
\DeclareCaptionLabelFormat{nolabel}{}
\captionsetup{labelformat=nolabel,textformat=empty}
\usepackage{fontspec}
\setmainfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

Binary file not shown.

View file

@ -0,0 +1,15 @@
\newpage
\thispagestyle{empty}
\noindent Tous droits réservés\ \newline \the\year{}\ -\ François Pelletier
\noindent Site web: \newline\url{https://jevalide.ca}
\noindent Réseaux sociaux: \newline\url{https://linktr.ee/jevalideca}
\noindent Publié le \today.
\noindent Mise en page effectuée avec \LaTeX
\pagebreak

View file

@ -0,0 +1,59 @@
\usepackage[french]{babel} % Césure en français
\usepackage[autolanguage]{numprint}
\usepackage[
type={CC},
modifier={by-sa},
version={4.0},
]{doclicense}
\usepackage{xcolor}
\usepackage{listings}
\lstset{
basicstyle=\ttfamily,
numbers=left,
numberstyle=\footnotesize,
stepnumber=2,
numbersep=5pt,
backgroundcolor=\color{black!10},
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
captionpos=b,
breaklines=true,
breakatwhitespace=true,
breakautoindent=true,
linewidth=\textwidth
}
\usepackage{wallpaper}
\makeatletter
\ULCornerWallPaper{1}{./styles/yapp/slide43/Yapp-slide43.pdf}
\makeatother
% Override default figure placement To be within the flow of the text rather
% than on it's own page.
\usepackage{float}
\makeatletter
\def\fps@figure{H}
\makeatother
\pagenumbering{gobble}
\AddToHook{cmd/section/before}{\clearpage}
\AddToHook{cmd/subsection/before}{\clearpage}
\usepackage{caption}
\DeclareCaptionLabelFormat{nolabel}{}
\captionsetup{labelformat=nolabel,textformat=empty}
\usepackage{fontspec}
\setmainfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setsansfont[Path=font/GlacialIndifference/]{GlacialIndifference-Regular.otf}
\setmonofont[Path=font/SourceCodePro/]{SourceCodePro-Regular.ttf}
\newcommand{\emoji}[1]{
{\setmainfont[Path=font/NotoColorEmoji/]{NotoColorEmoji.ttf}[Renderer=Harfbuzz]{#1}}
}

View file

@ -6,15 +6,16 @@ Accept: application/zip
{
"format": "instagram",
"style": "jevalideca",
"style": "yapp",
"linkcolor": "blue",
"tocdepth": 2,
"pdfengine": "lualatex",
"content": "# Ceci est un titre\n## Ceci est un sous-titre\n\nCeci est un paragraphe\n\n## Ceci est un autre sous-titre\n\n> Ceci est du code",
"content": "# Ceci est un titre\n## Ceci est un sous-titre\n\nCeci est un paragraphe\n\n## Ceci est un autre sous-titre\n\n> Ceci est du code \n\n Ce sont des emojis ❤️ 😎 🤓 🤣 👭 🧑‍🎤",
"fontsize": 14,
"paperwidth": 1080,
"paperheight": 1920,
"margin": 180,
"vmargin": 180,
"extension": "jpg"
}
@ -26,15 +27,16 @@ Accept: application/pdf
{
"format": "linkedin",
"style": "jevalideca",
"style": "yapp",
"linkcolor": "blue",
"tocdepth": 2,
"pdfengine": "lualatex",
"content": "# Ceci est un titre\n## Ceci est un sous-titre\n\nCeci est un paragraphe\n\n## Ceci est un autre sous-titre\n\n> Ceci est du code",
"content": "# Ceci est un titre\n## Ceci est un sous-titre\n\nCeci est un paragraphe\n\n## Ceci est un autre sous-titre\n\n> Ceci est du code \n\n Ce sont des emojis ❤️ 😎 🤓 🤣 👭 🧑‍🎤",
"fontsize": 14,
"paperwidth": 1080,
"paperheight": 1080,
"margin": 90,
"vmargin": 180,
"extension": "pdf"
}
@ -67,11 +69,11 @@ Accept: application/pdf
{
"format": "slide169",
"style": "jevalideca",
"style": "yapp",
"linkcolor": "blue",
"tocdepth": 2,
"pdfengine": "lualatex",
"content": "# Ceci est un titre\n## Ceci est un sous-titre\n\nCeci est un paragraphe\n\n## Ceci est un autre sous-titre\n\n> Ceci est du code",
"content": "# Ceci est un titre\n## Ceci est un sous-titre\n\nCeci est un paragraphe\n\n## Ceci est un autre sous-titre\n\n> Ceci est du code \n\n Ce sont des emojis ❤️ 😎 🤓 🤣 👭 🧑‍🎤",
"fontsize": 14,
"paperwidth": 1920,
"paperheight": 1080,