Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMF file support #152

Merged
merged 24 commits into from
Dec 7, 2018
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5666916
initial support for EMF file format thanks to Inkscape
antoinerg Nov 27, 2018
e823274
remove PATCH version from docker image name to get updates
antoinerg Nov 27, 2018
035ed22
fix regular expression to match svg attributes with dash
antoinerg Nov 27, 2018
40437c4
circleci: debian-jessie -> debien-strecth to get inkscape 0.9x
antoinerg Nov 27, 2018
25f0bb6
properly check test-mock.emf size and fix lint
antoinerg Nov 27, 2018
e2f2be7
missing deps, need to update package lists
antoinerg Nov 27, 2018
5ed1198
minor code style fix
antoinerg Nov 29, 2018
fc8c755
check Inkscape's version, provide meaning error message when --verbose
antoinerg Nov 30, 2018
1ecb2f4
parse SVG using jsdom instead of regexes
antoinerg Dec 3, 2018
7dddce5
jsdom 13.0.0 -> 11.12.0 to support node.js v6
antoinerg Dec 3, 2018
6b1a1fc
find image elements using jsdom
antoinerg Dec 4, 2018
d4a1bfa
gl3d: use bg color from figure.layout if provided
antoinerg Dec 4, 2018
5432b59
fix lint
antoinerg Dec 4, 2018
212ed21
fix Inkscape unit test
antoinerg Dec 4, 2018
37747b1
relax constraint for Inkscape's version: now requires gte 0.92.x
antoinerg Dec 5, 2018
315a7d6
use different port for orca_serve_graph-only_test.js
antoinerg Dec 5, 2018
48e1e11
npm install with latest npm version
antoinerg Dec 5, 2018
c1822e2
teardown server last, orca should reply 404 instead of ECONNREFUSED
antoinerg Dec 6, 2018
ffc9bfd
cache node_modules only if package-lock.json didn't change
antoinerg Dec 6, 2018
e24f167
install Inkscape in deployment container
antoinerg Dec 6, 2018
e76c52b
improve code readability and style
antoinerg Dec 6, 2018
e4ab53d
safer code which ensures there is a figure.layout object
antoinerg Dec 6, 2018
b6daae1
revert to ubuntu:xenial, install latest Inkscape from a PPA
antoinerg Dec 6, 2018
f117d36
run `apt-get update` prior to installing Inkscape to get latest version
antoinerg Dec 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:xenial
FROM ubuntu:bionic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. We'll have to test that thoroughly on stage. Is this required?

Copy link
Collaborator Author

@antoinerg antoinerg Dec 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's definitely the path of least resistance to get the latest version of Inkscape (0.92.3 which is also the version I used in my testing). Otherwise we'd have to compile Inkscape in the container.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a ppa shouldn't be too bad:

http://ubuntuhandbook.org/index.php/2017/01/install-inkscape-0-92-ppa-ubuntu-16-04-16-10-14-04/


I'm not against bumping Ubuntu, but we can't just casually bump it here w/o some thorough manual testing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand your concern. Let me try to compile Inkscape or install from a deb package.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a ppa shouldn't be too bad:

That did the trick thank you 👍

Commit b6daae1 reverted our container to ubuntu:xenial and install Inkscape from a PPA

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing 🎉

Thanks very much!


####################
# Install node and dependencies
Expand Down Expand Up @@ -90,7 +90,7 @@ RUN apt-get update -y && apt-get install -y subversion && \
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' && \
apt-get update -y && \
apt-get install -y google-chrome-stable xvfb poppler-utils git && \
apt-get install -y google-chrome-stable xvfb poppler-utils inkscape git && \
Copy link
Contributor

@etpinard etpinard Dec 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried running that locally?

If I remember correctly:

docker build . -f deployment/Dockerfile -t tmp-inkscape

# check if ok with
docker images

docker run tmp-inkscape -d -p 9010:9010 tmp-inkscape

# then
curl localhost:9010 ...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default port is 9091

Copy link
Collaborator Author

@antoinerg antoinerg Dec 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following works for me!

docker build . -f deployment/Dockerfile -t tmp-inkscape

# check if ok with
docker images

docker run tmp-inkscape -d -p 9091:9091 tmp-inkscape

# then
cd plotly/plotly.js/test/image/mocks/
curl -XPOST -d @14.json localhost:9091 > /tmp/14.png

rm -rf /var/lib/apt/lists/* && apt-get clean

COPY package.json /var/www/image-exporter/
Expand Down