
ButtonMaker
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
This is a tiny tool for tiny buttons. In short - an application we are waiting for so long. You all know these little images in the web abused as buttons and with writings stigmatised for their lifetime. So this app could grow up to their dungeon master, if you like. :)
Dep:
PyQT - QT/KDE-Bindings
PIL - Python Image Library
lots of TrueTypeFonts
15 years ago
0.1a
====
first release
0.1a2
=====
*start font setup fixed
*some bugfixes of cacheparsing
15 years ago
0.1a
====
first release
0.1a2
=====
*start font setup fixed
*some bugfixes of cacheparsing
KingOmnious
12 years ago
Report
hellblade
15 years ago
Report
hellblade
15 years ago
Report
CaCO3
15 years ago
-------------------------------------
./ButtonMaker
Traceback (most recent call last):
File "./main.py", line 4, in ?
from qt import *
ImportError: No module named qt
-------------------------------------
Is there a dep. missing?
Report
MurDoK
15 years ago
Report
strunzel
15 years ago
Report
CaCO3
15 years ago
now this seems to work.
But now I get the following error:
Traceback (most recent call last):
File "/opt/buttonmaker/main.py", line 5, in ?
import my_func
File "/opt/buttonmaker/my_func.py", line 39, in ?
from my_image import My_Image
File "/opt/buttonmaker/my_image.py", line 2, in ?
import Image, ImageDraw, ImageFont
ImportError: No module named Image
Report
strunzel
15 years ago
Report
CaCO3
15 years ago
(Sorry, but I didn't read the list of deps. at top of this site)
But now I have the same problem like the others above.
Is there already a solution?
(modify the /etc/fonts/fonts.conf is not a good idea!)
I've running a debian (Kanotix)
Report
goneri
15 years ago
When i launch buttonmaker-0.1a2 on my Debian Sid, it prints this message and die.
$ ./ButtonMaker
Traceback (most recent call last):
File "./main.py", line 15, in ?
main(sys.argv)
File "./main.py", line 9, in main
win=my_func.Go()
File "/home/goneri/divers/buttonmaker-0.1a2/my_func.py", line 85, in __init__
self.fontTest('none')
File "/home/goneri/divers/buttonmaker-0.1a2/my_func.py", line 242, in fontTest
dirs = FontDir(self.FontConf)
File "/home/goneri/divers/buttonmaker-0.1a2/fontConfig.py", line 63, in FontDir
pathlist = _fontDir(dir_+'/'+filelist[i])
File "/home/goneri/divers/buttonmaker-0.1a2/fontConfig.py", line 54, in _fontDir
parser.parse(file)
File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.3/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 216, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 395, in external_entity_ref
self._source.getSystemId() or
File "/usr/lib/python2.3/site-packages/_xmlplus/sax/saxutils.py", line 523, in prepare_input_source
f = urllib2.urlopen(source.getSystemId())
File "/usr/lib/python2.3/urllib2.py", line 129, in urlopen
return _opener.open(url, data)
File "/usr/lib/python2.3/urllib2.py", line 324, in open
type_ = req.get_type()
File "/usr/lib/python2.3/urllib2.py", line 226, in get_type
raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: /etc/fonts/fonts.dtd
Regards,
Gonéri
Report
goneri
15 years ago
from /etc/fonts/fonts.conf ButtonMaker start fine.
The probleme seem to be that xmlplus can't open my /etc/fonts/fonts.dtd.
Report
goneri
15 years ago
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
Report
strunzel
15 years ago
Report
SWaN
15 years ago
python main.py
I/O error(2): No such file or directory
Traceback (most recent call last):
File "main.py", line 15, in ?
main(sys.argv)
File "main.py", line 9, in main
win=my_func.Go()
File "/home/giancarlo/Download/buttonmaker-0.1a/my_func.py", line 87, in __init__
self.update_all()
File "/home/giancarlo/Download/buttonmaker-0.1a/my_func.py", line 143, in update_all
klaus = self.my_img.draw()
File "/home/giancarlo/Download/buttonmaker-0.1a/my_image.py", line 131, in draw
image = self._drawBox(image,self.BoxLeft)
File "/home/giancarlo/Download/buttonmaker-0.1a/my_image.py", line 100, in _drawBox
TextFont = ImageFont.truetype(box.TextFont, box.TextSize)
File "/usr/lib/python2.4/site-packages/PIL/ImageFont.py", line 202, in truetype
return FreeTypeFont(filename, size, index, encoding)
File "/usr/lib/python2.4/site-packages/PIL/ImageFont.py", line 121, in __init__
self.font = _imagingft.getfont(file, size, index, encoding)
IOError: cannot open resource
Thx!
Report
SWaN
15 years ago
"The standard font file could not be found. Please choose another one."
Then the font choosing dialog appears and no matter which font I select, the message is shown again. Instead of clicking OK in the font chooser, I click Cancel: BM exits with the error I wrote in the last message.
Report
ATAHUALPA
15 years ago
[email protected]:~/buttonmaker-0.1a$ ./ButtonMaker
Traceback (most recent call last):
File "./main.py", line 15, in ?
main(sys.argv)
File "./main.py", line 9, in main
win=my_func.Go()
File "/home/felipe/buttonmaker-0.1a/my_func.py", line 84, in __init__
self.fontTest('none')
File "/home/felipe/buttonmaker-0.1a/my_func.py", line 222, in fontTest
dirs = FontDir(self.FontConf)
File "/home/felipe/buttonmaker-0.1a/fontConfig.py", line 63, in FontDir
pathlist = _fontDir(dir_+'/'+filelist[i])
File "/home/felipe/buttonmaker-0.1a/fontConfig.py", line 54, in _fontDir
parser.parse(file)
File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.3/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 216, in feed
self._parser.Parse(data, isFinal)
File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 395, in external_entity_ref
self._source.getSystemId() or
File "/usr/lib/python2.3/site-packages/_xmlplus/sax/saxutils.py", line 523, in prepare_input_source
f = urllib2.urlopen(source.getSystemId())
File "/usr/lib/python2.3/urllib2.py", line 129, in urlopen
return _opener.open(url, data)
File "/usr/lib/python2.3/urllib2.py", line 324, in open
type_ = req.get_type()
File "/usr/lib/python2.3/urllib2.py", line 226, in get_type
raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: /etc/fonts/fonts.dtd
PS.it's a fantastic idea,great job!
Report
strunzel
15 years ago
@SWaN: Please make sure you have some TT-fonts installed (or FreeType), all non-TT-fonts from the dialog wont do it.
@ATAHUALPA: I couldnt find another way to catch the real path of the fontfile then by parsing your font installation. So the app looks into "etc/fonts"(where fonts-paths normally should be set up), catches all dirs from the conf-files and processes the font-cache of the found font dirs. This awkward way is expected to produce errors and if your font installation doesnt fit the above at any point, it will fail. Regarding your problem: the error says: "unknown url type: /etc/fonts/fonts.dtd" which means that you havent the "fonts.dtd" file in etc/fonts, so the conf-files couldnt be parsed because of the lack of the definition file. Just get this file and place it there. I dont know your dist., for SuSE you can find it in the fontconfig-package.
I am displeased about the font situation as well. If there is some interest in this program I plan to get rid of the PIL-Package, wich causes all these problems, maybe the whole thing becomes pure Qt-c++ code with a new design.
Report
SWaN
15 years ago
Report