git @ Cat's Eye Technologies kinoje / 0.5
Merge pull request #3 from catseye/develop-0.5 Develop 0.5 Chris Pressey authored 1 year, 5 months ago GitHub committed 1 year, 5 months ago
6 changed file(s) with 36 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
0 FROM python:3.5.7-slim-stretch
1 RUN apt-get update && apt-get install -y povray povray-includes ffmpeg imagemagick librsvg2-bin
2 WORKDIR /usr/src/app
3 COPY requirements.txt ./
4 RUN pip install --no-cache-dir -r requirements.txt
5 COPY bin ./bin
6 COPY src ./src
00 kinoje
11 ======
22
3 *Version 0.4. Subject to backwards-incompatible changes without notice.*
3 *Version 0.5. Subject to backwards-incompatible changes without notice.*
44
55 **kinoje** is a templating-based animation tool. A provided template is filled out once for each
66 frame of the animation; the result of the template expansion is used to create a still image; and
1313
1414 * **Python** 2.7 or 3.x — to run the script
1515 * **PyYAML** and **Jinja2** — to fill out the templates
16 * something to create images from filled-out templates — typically **POV-Ray** or **Inkscape**
16 * something to create images from filled-out templates — typically **POV-Ray** or **rsvg**
1717 * **ffmpeg** or **ImageMagick** — to compile the images into a movie file
1818
1919 You might also find VLC useful, for viewing the final movie file.
2121 On Ubuntu 16.04, you can install these with:
2222
2323 pip install --user Jinja2 PyYAML
24 sudo apt install povray povray-includes inkscape ffmpeg imagemagick vlc
24 sudo apt install povray povray-includes librsvg2 ffmpeg imagemagick vlc
2525
26 You can then run the tool from the repository directory like so:
26 (Or, if you use Docker, you can use the Docker image from
27 [this dockerhub repository](https://cloud.docker.com/u/catseye/repository/docker/catseye/kinoje)
28 following the instructions given on that page.)
29
30 Once installed, you can run the tool from the repository directory like so:
2731
2832 bin/kinoje eg/moebius.yaml
2933
0 #!/bin/sh
1
2 # After building the image, you can run kinoje from within it like:
3 #
4 # docker run --user $(id -u):$(id -g) -i -t -v "${PWD}:/usr/src/app/host" kinoje \
5 # bin/kinoje host/eg/moebius.yaml -o host/moebius.mp4
6 #
7
8 rm -rf src/kinoje/*.pyc src/kinoje/__pycache__
9 docker container prune
10 docker rmi catseye/kinoje:0.5
11 docker rmi kinoje
12 docker build -t kinoje .
13 docker tag kinoje catseye/kinoje:0.5
00 duration: 2.0
11 width: 400
22 height: 400
3 command: inkscape -z -e {outfile} -w {width} -h {height} {infile}
3 command: rsvg-convert -w {width} -h {height} <{infile} >{outfile}
44 template: |-
55 <?xml version="1.0" standalone="no"?>
66 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
7 <svg viewBox="0 0 400 400" version="1.1">
7 <svg width="400" height="400" viewBox="0 0 400 400" version="1.1">
88 <rect width="100%" height="100%" fill="white" />
99 <rect x="25%" y="25%" width="50%" height="50%" fill="black" transform="rotate({{ t * 90.0 }} 200 200)" />
1010 <rect x="37.5%" y="37.5%" width="25%" height="25%" fill="white" transform="rotate({{ t * -90.0 }} 200 200)" />
0 Jinja2==2.10
1 PyYAML==3.12
2 tqdm==4.19.6
0 Jinja2==2.10.1
1 PyYAML==5.1
2 tqdm==4.31.1
3737 infile=full_srcname,
3838 libdir=self.libdir,
3939 outfile=full_destname,
40 width=self.width,
41 height=self.height
40 width=int(self.width),
41 height=int(self.height),
4242 )
4343 self.exe.do_it(cmd)
4444