summaryrefslogtreecommitdiffstats
path: root/static/img/sources/integrations-graphiques/generate.py
blob: 9d6d1054d8735e775cc0a67b89e373459049f35f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /usr/bin/env python

import os
import subprocess

svg_src = open('screen-with-capture.svg').read()
for filename in os.listdir('captures'):
    svg_dst = svg_src.replace('xxx.png', 'captures/%s' % filename)
    svg_path = open('/tmp/.xxx.svg', 'w')
    svg_path.write(svg_dst)
    svg_path.close()
    subprocess.call(['inkscape', '--without-gui',
        '--file', '/tmp/.xxx.svg',
        '--export-area-drawing',
        '--export-area-snap',
        '--export-png', 'screen-%s' % filename,
        '--export-width', '250'])

# gm montage screen-*.png -geometry +10+0 -tile 8x1 -background none ../screens.png
# +10+0 <- 10 is the margin
# 8x1   <- 8 is the number of images