Coder Social home page Coder Social logo

plugin-shoebot's Introduction

Shoebot

Shoebot is a creative coding environment designed for making vector graphics and animations with Python. It's geared towards playful graphic exploration, creating SVG images for pen plotters, and is a great tool for automated/headless image generation.

Build Status Matrix channel

Shoebot takes a Python script describing a drawing process, and outputs a graphic in vector (SVG, PDF, PostScript) and bitmap formats (PNG). Animations can be easily created and output to video files (mp4). Scripts can describe their own GUIs for controlling variables interactively. Shoebot can also be run from the commandline and used as a Python module inside other Python scripts.

Shoebot is a port/rewrite of Nodebox 1, which is derived from DrawBot. The playful coding philosophy of Shoes also inspired its development. Thus, "Shoebot".

Documentation

The Shoebot Manual can be found at docs.shoebot.net.

Getting help

Installation is the trickiest aspect of Shoebot. If you run into trouble following the install steps, create a new issue and paste the output of the following commands:

python3 setup.py diagnose
python3 setup.py test

This will help us diagnose common issues more quickly.

Links

License

Copyright © 2007-2021 The Shoebot authors (Stuart Axon, Dave Crossland, Francesco Fantoni, Ricardo Lafuente, Sebastian Oliva)

Originally developed by Ricardo Lafuente with the support of the Piet Zwart Institute, Rotterdam.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

plugin-shoebot's People

Contributors

rlafuente avatar stuaxo avatar tian2992 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

plugin-shoebot's Issues

Restructure as MVC

This really needs some structure imposed on it, may as well go with MVC in the absence of other ideas.

See the end of this issue for references (there aren't too many when it comes to Gtk3 + MVC)

e.g.

preferences
    model.py
    controller.py
    view.py
example_menu_uimanager
    model.py
    controller.py
    view.py
example_menu_gmenu
    model.py
    controller.py
    view.py

Example detail for example_menu_uimanager:

XML for the UI would go in model
Event handlers for the UI go into controller
View builds the actual menu.

References:

[1] https://www.reddit.com/r/learnpython/comments/54wv97/learning_mvc_in_python_gtk3/

[2] https://github.com/wesleywerner/mvc-game-design
(referenced from 2)

API refactor wishlist

  • APIs to generate menus should look similar to each other, differing only in what you pass in initially.
  • Simple API for getting list of examples.

Simplify file open action

Base64 encode / decode for file path is probably not needed as we can assume utf8 filenames.

Our window actions should probably be somewhat namespaced like

shoebot_open_example path_to_example

Docs

We need docs. .. (we can work out how to incorporate these into the shoebot from sphinx there too)

Installing:

Default - install all plugins

pip install plugin_shoebot

Installing plugin for a single editor

pip install plugin_shoebot --plugins xed

List plugins

python setup.py install --help

(a better way may be useful?)

Enabling the plugin in preferences

Probably can do a screencap of this

Using it

Examples etc is obvious, stuff like socketserver and livecoding is worth demoing.

Shoebot gets stuck after first run

Run hypnoval,
close window,
Try and run again.

Nothing hard, ye-olde broken pipe.

  File "/home/stu/.local/share/gedit/plugins/plugin_shoebot/plugins/peas3gio.py", line 102, in on_run
    self.start_shoebot()
  File "/home/stu/.local/share/gedit/plugins/plugin_shoebot/plugins/peas3gio.py", line 129, in start_shoebot
    self.bot.send_command("quit")
  File "/home/stu/.local/share/gedit/plugins/plugin_shoebot/shoebot_wrapper.py", line 152, in send_command
    self.process.stdin.flush()
BrokenPipeError: [Errno 32] Broken pipe

Window embedding

Should be possible to run a bot and embed it in another window.

This probably ends up with a different method per-platform :(

Need to find info on:

  • Linux: X
  • Linux: Wayland
  • OS ?
  • Windows ?

Drop support for older gedits ?

Although one of the ideas of plugin_shoebot was to support different gedits, I'm not sure I see the point.

Gedit 3.12 introduced the GMenu, and that was 4 years ago, so I'm not sure I can be bothered TBH.

Obviously, this repo still exists to separate and cleanup the extensions into a better API.

@rlafuente thoughts?

Vendorize functool32 again

Vendorize was updated to fix the bug that meant functools32 had to be manually patched, try revendorizing the packages.

Vendor in packages

  • asyncronousfilereader - removing our internal copy.

Later on we can do:

  • scandir (only for python2) + move directory iteration to scandir
  • virtualenv functions can be spun out to their own library

These libraries can live in _vendor and use git submodules.

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.