Skip to content

Commit

Permalink
feat(export): supprime l'utilisation de Pandoc pour se baser sur styl…
Browse files Browse the repository at this point in the history
…o-export
  • Loading branch information
thom4parisot committed Oct 28, 2024
1 parent 542e981 commit 96e1a78
Show file tree
Hide file tree
Showing 5 changed files with 665 additions and 210 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ Plus d'informations sur [la documentation](http://stylo-doc.ecrituresnumeriques.

- Node.js v18+
- MongoDB
- (optionnel) Pandoc, pour le [service d'export](./export)

## Sous MacOS

```bash
brew tap mongodb/brew

brew install pandoc mongodb-community nvm
brew install mongodb-community nvm
brew install --cask docker

nvm install v18 --default
Expand Down
47 changes: 1 addition & 46 deletions export/dockerfile
Original file line number Diff line number Diff line change
@@ -1,49 +1,4 @@
FROM node:18-bullseye

WORKDIR /usr/src/app

# install graphviz
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y \
abcm2ps \
ca-certificates \
cm-super \
curl \
fontconfig \
fonts-liberation \
git \
graphviz \
imagemagick \
inotify-tools \
make \
python3-pygraphviz \
python3 \
wget \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

#install pandoc
ENV PKGREL 1
ENV VERSION 2.12
ARG TARGETARCH=amd64
ADD https://github.com/jgm/pandoc/releases/download/${VERSION}/pandoc-${VERSION}-${PKGREL}-${TARGETARCH}.deb /pandoc.deb
RUN export DEBIAN_FRONTEND=noninteractive \
&& dpkg -i /pandoc.deb \
&& rm /pandoc.deb

RUN git clone --single-branch --branch 1.4.3 https://github.com/jgm/pandocfilters.git /pandocfilters \
&& cd /pandocfilters \
&& python3 setup.py install \
&& cp examples/*.py /usr/bin \
&& ls examples/*.py > /installed-pandocfilters.txt \
&& rm -rf /pandocfilters

ADD vendors/git-diff.py /usr/bin/git-diff.py
RUN echo "examples/git-diff.py" >> /installed-pandocfilters.txt

RUN sed -i 's#examples#/usr/bin#' /installed-pandocfilters.txt
FROM node:18-alpine

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
Expand Down
Loading

0 comments on commit 96e1a78

Please sign in to comment.