Giter Club home page Giter Club logo

ink2impress's Introduction

Ink2Impress

Ink2Impress is a converter-like script that enables using Inkscape as a GUI for generating Impress.js presentations.

Demo

Basic Ink2Impress demo (result only)

Your demos are welcome!

Usage

  1. Create a new Inkscape document
    • Set the size of the page to the actual pixel-size you want for your presentation.
  2. Make sure you have 2 layers (create if necessary)
    • Bottom layer will hold the graphics
    • Top layer will hold the layout
  3. Create your graphics
    • Remember to keep all the graphical elements inside the page. Graphics outside the page will not show.
  4. Create your layout
    • Each <rect> element in the layout layer will ve a step in the presentation
    • <rect> elements may be contained in groups (<g> elements). You can add other (non-<rect>) elements to the group as annotations. They will not show in the final presentation.
    • Z-Order dictates presentation order (bottom to top)
    • If you add an overview-step, set its id to overview
  5. Save your presentation as plain-svg (not Inkscape SVG)
  6. Run the convertion script
    • python ink2impress.py
    • Make sure js/impress.js is in the same folder as the result
  7. Enjoy!

Dependencies

Code

lxml - XML processing - Use this for precompiled binaries.

impress.js - For the animations in the presentation.

Software

Python2.7 - For running the script. Not tested for other versions.

Inkscape - For presentation creation

ink2impress's People

Contributors

tmr232 avatar

Stargazers

Berteh avatar Michael Jett avatar  avatar pragmatic_jiang avatar Pantelis Koukousoulas avatar  avatar Junichi Yamamoto avatar Anthony Nyström avatar Thomas Renkert avatar Arun Ravindran avatar

Watchers

James Cloos avatar  avatar  avatar

ink2impress's Issues

Use Inkscape-SVG

Currently, the plain-svg option in inkscape is used.
It works, but has many limitations - any non-standard attribute (Inkscape's or custom) are removed from the final SVG.
This makes storing meta-data quite difficult.

External SVG

Seems like Chrome does a lot more to render an SVG when it is an external file (img). Thia is nice, but will kill the option for selectable text.

If there is a way to mix both - would be SWEET!

180d rotations are not handled

When rotating a rect 180 degrees, Inkscape scales it -1,-1 instead of rotating. This causes unwanted results when converting to impress.js.

Minimal Rotation Option

Make it possible to auto-orient rotations (without rotation-direction and rotation-extra) by making the rotation difference between 2 consecutive slides minimal.

Maybe add as a script flag?

Should've been part of #7

Use existing SVG libraries

It might be a good idea to use some exsiting SVG parsing & generation libraries.
Two candidates are:

  1. Inkscape Extensions API - might be helpful as it is Inkscape we're using...
  2. pySVG - from a first glance - seems to be a decent SVG manipulation library.

Enable links

Inkscape allows creating links in SVG.
The problem is that the current clickable navigation solution kills it.

Flips & Flip-transforms

  • Add support for flipping (x-axis and y-axis rotations) as a means of moving between slides.
  • Add support for negative scaling as a means of support for non-planar rotations.

Background color bug

Currently, 'alpha' values blend with black instead of white. This needs fixing.

Separate frame graphics

Separate frame graphics to allow static&printable view.
Also important to enable links along with click-navigation.

Hard to tell order of frames

When creating a layout, it is currently very complicated to tell the order of the frames/slides.
Maybe add the ability to add annotations in the SVG file?

SVG ViewBox Attribute

Currently, we have an issue with scaling - the page needs to be the same size as display - and it is annoying to fix later.
Maybe using the ViewBox attribute for the SVG could simplify this.

3D Layering

Add an option to create multiple graphics layers, each with a different Z value. So when moving - there's relative motion!

Conversion Error Information

Make the script print out errors in the conversion, so that a user will know what went wrong, and hopefully be able to fix it.

Full control over rotation

It'd be nice to have full control over the rotation - CW vs. CCW, more than 180 (or 360) rotations, etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.