PythonStuff_060822.zip (55kb)
2006ago22 - Paulo Silva (nitrofurano_at_gmail_dot_com)
Recoded on Python (and improving) a .ai (Adobe Illustrator) to .svg converter - textboxes conversion is still with bugs, but the results seems to be better than from ill2svg.pl (that import script which comes with Inkscape, which doesn't open ai1 and ai88, doesn't read joined pathes, dashes, textboxes, etc. ). (it doesn't needs ImageMagick installed, but in other hand it doesn't convert placed and embedded pics from the document). As well, testers are needed.
Started to do some small utilities, simple stuff like for converting Gimp palettes into html files, doubling or indexing text lines, converting an url text list into an html file, and so on... The last ones converts binary files (any kind) to hexdump text files and vice-versa.
After seeing how nicely Linux distributions defaulty support Python as script interpreter (i'm mostly using Ubuntu distribution - the Gnome version, that default one), i started to code some minimal examples, like some ones i started for sdlBasic, as well for learning faster and accuracelly how to code in Python. My goal would be coding useful scripts (start converting to that what i have ready on wxBasic and sdlBasic would be fine...), as well getting some knowledge for scripting (at least...) Scribus, Gimp and Inkscape.
Before this, i also tried to start learning Python, after getting surprised with the result of some Scribus scripts, specially FontSampler from Steve Callcott. In my oppinion, this script is very useful, but as it still not render a more complete font catalog (with column samples of body and leading sizes), i get borrowed the idea of Jim Smith's KeyTypeBook (an old utility for MacOS-Classic) for generating them, patching the FontSampler for creating results more close to that. The features missing on my patch is having available facing pages (the original KeyTypeBook has not this feature), edit text contents (the latin text and the alphanumeric - i don't know how to put text controls on the preference window, and use their variables), change body and leading sizes from the latin texts, etc.
__
Help needed:
I'm curious to code true filters for Gimp using Python-fu (pixel-by-pixel calculations), but i don't know how to deal the picture information at this level, getting and putting values into picture's pixels.
I'm also curious to do something interesting on Inkscape... (like automatizing drawings (random, not-random, both, or whatever), importing .obj 3d meshes with 3d parameters (observer, display and landscape 3d positions) into a 2d projected drawing, which i have enough code ready for sdlBasic, etc.)
__
Interesting links:
http://kecskebak.blogspot.pt/search/label/python%20filters
Some Gimp filters done in Python based on some picture converters i were coding years before, with help from David Jeffery.
http://www.shallowsky.com/blog/gimp/pygimp-pixel-ops.html
some tricks about how to code efficiently Python scripts for Gimp
http://nitrofurano.linuxkafe.com/bwekamba/pygame.htm
An experimental game i coded using Pygame (SDL library for Python)
http://pyweek.org/e/nitrofurano/
My Pyweek entry, submitted some years ago
http://python-forum.org/py/
A forum about Python development.
http://www.scribus.org
An amazing dtp app (which i got to know from that excellent LinuxJournal magazine) which can be a serious app-killer to InDesign and QuarkXPress.
www.firstwish.co.uk/sjc/scribus/index.php
Steve Calcott's webpage (Font Sampler, for Scribus).
http://www.gimp.org
A very known and powerful app, but having the Photoshop usability on this app, and some other very important features, will be very welcome! :-) - Gimp has Python scripting feature (Python-Fu)
http://inkscape.sourceforge.net
An app-killer to Macromedia (Adobe?) Freehand, and Adobe Illustrator (and CorelDraw is for kids...). Inkscape has an unique feature allows you to edit the .svg file in a .xml window and see the drawing changing, and vice-versa (this suggestion they got from me, for the Sodipodi app, which it's now part of the Inkscape code). Inkscape has Python scripting support as well.
http://wxbasic.sourceforge.net
The official wxBasic url - thanks David Cuny for the very best ansi-basic interpreter core available (as well as open-source) even still being embrionary!
http://sdlbasic.sourceforge.net
Example of a very good Amos-like ansi-basic interpreter, based on wxBasic interpreter core. Very good for 2d game development - specially now, as you can convert .sdlbas code to .cpp, which one you can compile with GCC or MinGW (a feature like this i'm curious to see on wxBasic project, it seems to be not that impossible...)
http://nitrofurano.altervista.org/sdlbasic
My personal webpage about sdlBasic.
http://nitrofurano.altervista.org/wxbasic
My personal webpage about wxBasic.
http://nitrofurano.altervista.org/lua
My personal webpage about Lua.
__