Shoebox is a pure Python version/rewrite of Nodebox.. #Nodebox rewrite #Python module #Read scripts #Nodebox #Python #DrawBot
Shoebox is a pure Python version/rewrite of Nodebox, a Mac OS X application developed by Frederik Bleser and Tom de Smedt at St. Lucas University in Antwerp, Belgium, from the DrawBot application developed by Just van Rossum.
Shoebox uses the Cairo graphics engine for rendering, and instead of a full-fledged GUI it provides a simple command-line interface and the ability to be called from external Python scripts without effort.
Shoebox also borrows from the principles outlined in the Little Coder's Predicament, a manifesto by the author of Shoes, which is a similar and awesome project using the Ruby language instead of Python.
Shoebox can read scripts in the Nodebox language and output images in SVG, PostScript, PDF or PNG format.
Comparing to graphics coding alternatives like Nodebox and Processing, Shoebox ends up being lighter and more flexible, thanks to not depending on an interface engine for rendering, and thus making it potentially suitable for CPU-conscious uses like server applications. Unlike Processing and Nodebox though, Shoebox can only output still images for the time being.
Shoebox can be run stand-alone or as part of a Python program - see the Getting Started page for more details. There's a lot of stuff that is still subject to change and/or not working as it should - please regard it as being in a very early alpha phase -, but we're coding and typing hard to solve this!
It should run on most GNU/Linux systems.
This is free software, distributed under the GPLv3 license.
Requirements:
� Cairo 1.4.2 or higher � Python 2.4 or higher � Mercurial
For now, the only means of installing Shoebox is getting it from the source repository. Shoebox uses Mercurial for version control. Mercurial is available on most major GNU/Linux distributions.
Ubuntu/Debian: sudo apt-get install mercurial Gentoo: emerge mercurial
Make a new directory for your Shoebox project(s), and then run the following command in your terminal:
hg clone http://hg.assembla.com/shoebox
You should now see a new shoebox/ directory inside your project dir.
It's probably appropriate to place your scripts inside the shoebox dir for now. (this is a makeshift solution until we have a proper package for Shoebox)
Usage is rather straightforward:
python console.py script.py outputfile < width > < height >
* outputfile should have a valid extension (.svg, .ps, .pdf or .png), since it will be autodetected by the script; * 'width' and 'height' are optional values; if not specified, the resulting image will be 400x400 pixels (bitmap output) or 400x400 points (vector output).
Try running the blocks_neat.py example in the shoebox/examples dir.
Shoebox can also be loaded as a module. For now, scripts taking advantage of this must be placed inside the shoebox dir.
After including an import statement,
import shoebox
a Box object needs to be created, and all further Nodebox commands can be called on that instance.
Box should be called with the output file name as an argument. Width and height can also be specified - otherwise it defaults to a 400x400 canvas.
box = shoebox.Box("output.svg",100,100) box.rect(10,10,100,100)
When you're finished with drawing, just call
box.finish()
and your output file should be created.
Also, when using bitmap files, you can save snapshots of the current state of the Box instance like so:
box.snapshot("snap.png")
Note that this doesn't work if your Box object was created with a vector format output.
You can even call external Shoebox/Nodebox scripts from your Python script:
box.run("script.py")
What's New in This Release:
� This release has a GTK canvas interface (the first stab at a proper canvas, but it works decently). � Now you can access internal variables through a socket connection. size(), setup() and draw() now behave as they should. � The Box class has a run() method for executing external scripts from inside a Python program.
Shoebox 0.2
add to watchlist add to download basket send us an update REPORT- runs on:
- Linux
- filename:
- shoebox-0.2.tar.gz
- main category:
- Multimedia
- developer:
- visit homepage
7-Zip 23.01 / 24.04 Beta
4k Video Downloader 1.5.3.0080 Plus / 4.30.0.5655
Zoom Client 6.0.3.37634
ShareX 16.0.1
IrfanView 4.67
calibre 7.9.0
Windows Sandbox Launcher 1.0.0
Bitdefender Antivirus Free 27.0.35.146
Microsoft Teams 24060.3102.2733.5911 Home / 1.7.00.7956 Work
Context Menu Manager 3.3.3.1
- Bitdefender Antivirus Free
- Microsoft Teams
- Context Menu Manager
- 7-Zip
- 4k Video Downloader
- Zoom Client
- ShareX
- IrfanView
- calibre
- Windows Sandbox Launcher