Coder Social home page Coder Social logo

cairo-drawbot's Introduction

DrawBot

Cairo DrawBot

A GNU+Linux compatible fork of DrawBot.

๐Ÿšง This is a work in progress and only aims for basic compatibility with DrawBot. ๐Ÿšง


Installation guide

First make a Python3 virtual environment to work in, this way all our dependencies are contained in one working directory:

python3 -m venv drawbot

Now cd into the directory and start the virtual environment:

cd drawbot
source bin/activate

To exit venv at any time enter deactivate.

Note: This works for most shells like BASH and ZSH, but if you are using a non-standard shell like fish another method is used.

Now we need to install our dependencies. there is a file in the root directory of this project called requirements.txt, it contains a list of dependencies used to build this project, it should look something like this:

cairocffi
numpy

Instead of installing each dependency separately, we can install them all at once by entering:

pip install -U -r requirements.txt

You must have pip installed for this to work, see install instructions here.

At any time you can use pip list to list the currently installed dependencies.

Now we will install cairodrawbot in editable mode, so we can make changes to the code and test those changes without reinstalling each time. Navigate the root directory of the project and enter:

pip install --editable .

After installing in editable mode you can run pip list and see that our dependencies and cairodrawbot are installed. cairodrawbot should have an extra note showing its location, because it was installed with --editable, you should get something like this:

(drawbot) > $ pip list
cairocffi (0.8.0)
cairodrawbot (0.0.10, /home/user/drawbot/cairo-drawbot)
cffi (1.11.4)
numpy (1.14.0)
pip (9.0.1)
pycparser (2.18)
setuptools (28.8.0)

Now, if everything installed correctly, we can test cairodrawbot by navigating to the examples/ directory and running one of the example files, like so:

cd examples
python example.py

A new image should have been generated, look for it in the examples folder.

cairo-drawbot's People

Contributors

eliheuer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

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.