From a283ce848131f2bef29592c925341f378523411f Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Mon, 22 Mar 2010 22:41:04 +0100 Subject: [PATCH 001/160] resize icon --- trimage-icon.png | Bin 4457 -> 4600 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/trimage-icon.png b/trimage-icon.png index af17def66db2403642e78267a66f5f6e1fb0b788..b84fc3db9ce72b70fe56f550325c1ab5d0adeb84 100644 GIT binary patch literal 4600 zcmeAS@N?(olHy`uVBq!ia0y~yU~m9o4mJh`hEk44ofy`glX=O&z`&N| z?e4BTTuO!d+96x=dZ|;$e#|y&>F16iJ$WXqfBGkmh zxK-83EL*R{=KbzUkkj>E3rF-KHosbl5V? zJ(=6{c3+osd2Jncf$4{p#zGA$o-99VCzLmKMoB-H-2dgO$#JuVTc?J3mU3|mH1hsl z|Lj8SeD)pxPBJMhpZUS~z6+4oT=~vI?$=NHimgS<;0+zKbYgtuy+@EU7@aMVv z{R1D{>t---&YX4czsvlUe##HmGyjw;a7|8|_j3B4_*=8}HLoraaB#oQ29~Z* zEmF(A#f6^uddm0^>m(IP7CV+bF(nDtVn0OlysMJ)^3>dOb%SH4#ly7+qTW0{B+GJR z$MfqyABx*2eaib@^&r;&%g^&HRGey+Q%4H>;n??-15f zydY2|Cg3J`T>fXgW!Z;)6L;?1sh=MC?eXPvOfnbuivCD;SyKCrTjEBsu2=Sf1O~$< zi_PNhHBmAgNv(Wa3-=_fb?mJDe~0z_(|^17F@4B-kiA@#UB%Ogp+@S5@Ku?KrRRSt zXTIOb=aR_K{MY@LMBE(LjGnKR>`qG*uQ@3TNGX~y-Pn@M-+NA=l-R*>1v{HP|rQ}eI=1%WKZOHMKl$}MROYXzbv8Wdl% zkuYX^W2p;D46F+O8Rv+ejdgwgY5Rgjj%TC}U4OK>;gE&hijMUO|2&czITlDdX>Uq@ zee-vhcFfP7B8N#TTovpe%%&{c_`Pb;S$2kv`{FqA4v475TQmoJY~XHXX$LTqG z`~uTiIvu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7jmAcUSL>aCbntXK2dWcsSHzAiK7S3^jh#U-1~2wpZ4@kasPg$ z?P(Ipd=K(w?AGN_JYCEeUuGE|SE~D)FSgIC_}Z_1b3Q1J%;Rs-zUg^e!7V*z$&rqw%oRNaY@Hjy>()? zOt!hI;&tu#XGZ(~kL>@M&i{MmFvIs)f$!6PSxc|`eA~GHXz=+h7n5?Tv>#vo>~mJn zz}Ecyn?Fp+lP|x>XsUR&`~Jg;@jK_|+kM^7y1`#>%kIv-3Tb;8@;>}+e%oB^Fn0-0 zum56}U)kAnY(DaA(_pCEe*N{`T1Te(d20&QH!R Date: Tue, 23 Mar 2010 13:09:52 +0100 Subject: [PATCH 002/160] work in progress of creating an installable version --- .gitignore | 3 + MANIFEST.in | 3 + __init__.py | 0 dialog-warning.png | Bin 486 -> 0 bytes compressing.gif => pixmaps/compressing.gif | Bin list-add.png => pixmaps/list-add.png | Bin trimage-icon.png => pixmaps/trimage-icon.png | Bin view-refresh.png => pixmaps/view-refresh.png | Bin .../logo-trimage.svg | 0 todo => resources/todo | 0 window.ui => resources/window.ui | 0 setup.cfg | 5 + setup.py | 19 +++ trimage.py => trimage | 160 +++++++++++++++++- ui.py | 6 +- 15 files changed, 189 insertions(+), 7 deletions(-) create mode 100644 MANIFEST.in create mode 100644 __init__.py delete mode 100644 dialog-warning.png rename compressing.gif => pixmaps/compressing.gif (100%) rename list-add.png => pixmaps/list-add.png (100%) rename trimage-icon.png => pixmaps/trimage-icon.png (100%) rename view-refresh.png => pixmaps/view-refresh.png (100%) rename logo-trimage.svg => resources/logo-trimage.svg (100%) rename todo => resources/todo (100%) rename window.ui => resources/window.ui (100%) create mode 100644 setup.cfg create mode 100644 setup.py rename trimage.py => trimage (63%) mode change 100644 => 100755 diff --git a/.gitignore b/.gitignore index 2f78cf5..731c196 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ *.pyc +MANIFEST +dist/ +build/ diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..7a8f6b8 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include trimage +recursive-include pixmaps * + diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/dialog-warning.png b/dialog-warning.png deleted file mode 100644 index 39515219adaa25112b5c7bef4d43430b5069d298..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 486 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4rT@h1`S>QUu217$b z2L}gdXJ=nu->9gl=;-K-jEwmV3_BPYc8iGYVPH7Gz;J|t;UWXWH3o+3nwmEq9dFs# z+_tp5qpyF**!bbPbq^mte6)J?lU1vpE?@ri>CA3lEk`03LpE$NAz3=9l%B|(0{42;YYhE~qL z5y{iHZaZ-L>fP6$e*XOV^VhGxfB*gacfILTF9QR^98VX=5Q%W#Gv0j73L>o!=W$Oz zy}H-Y{K3ENOI?H)GrP|fU6N@ld}6x%i$dR{D{l4PN{rX9W|#e)e#N{XM`^cxfyWum z5BxIT=Ppg+YMadHlk}POI(LV{-fV?8t*4G`4r!2fS?F`}LBIl*c^66*;)Rv$BUo>l zHEn9v*Wb$9@=H@ALN{eS!{ZL^jZX^wisP=8p8Q;L=<>$>`M3M|+gOy8Pgg} Date: Tue, 23 Mar 2010 14:00:09 +0100 Subject: [PATCH 003/160] more work in progress on installable trimage --- __init__.py | 1 + pixmaps/trimage-icon.png | Bin 4600 -> 4542 bytes setup.py | 6 ++++-- trimage | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index e69de29..8b13789 100644 --- a/__init__.py +++ b/__init__.py @@ -0,0 +1 @@ + diff --git a/pixmaps/trimage-icon.png b/pixmaps/trimage-icon.png index b84fc3db9ce72b70fe56f550325c1ab5d0adeb84..1e36f831540ca660def4f8ffd07ad1a95c4736c2 100644 GIT binary patch delta 4499 zcmeyNyia+8;Y4TkdIq*6Z+91l{~)+v@AAnE41#u^E{-7;x9-lao)a5ddVGKO{Nnr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import * from PyQt4.QtGui import * from hurry.filesize import * +from ui import Ui_trimage + VERSION = "1.0.0b" class StartQT4(QMainWindow): From bf763ec33576bacab8ba46c1672354e9b25f79fc Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Tue, 23 Mar 2010 14:21:01 +0100 Subject: [PATCH 004/160] more setup tweaks --- MANIFEST.in | 1 + setup.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 7a8f6b8..b1daca4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ include trimage +include ui.py recursive-include pixmaps * diff --git a/setup.py b/setup.py index aec5875..3a6ebc9 100644 --- a/setup.py +++ b/setup.py @@ -9,13 +9,12 @@ setup(name = "Trimage", author_email = "help@trimage.org", url = "http://trimage.org", license = "MIT license", - packages = ["hurry", "hurry/filesize","ui",""], + packages = ["hurry", "hurry/filesize",""], data_files = [("pixmaps", ["pixmaps/list-add.png", "pixmaps/view-refresh.png", "pixmaps/compressing.gif", "pixmaps/trimage-icon.png"])], scripts = ["trimage"], long_description = """Trimage is a cross-platform GUI and command-line interface to optimize image files via optipng, advpng and jpegoptim, depending on the filetype (currently, PNG and JPG files are supported). It was inspired by imageoptim. All image files are losslessy compressed on the highest available compression levels. Trimage gives you various input functions to fit your own workflow: A regular file dialog, dragging and dropping and various command line options.""", - platforms = ["*nix", "mac", "windows"], requires = ["PyQt4 (>4.4)"], ) From 9826e6cd970eb70b1dea96892d80259f54e49356 Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Tue, 23 Mar 2010 14:34:52 +0100 Subject: [PATCH 005/160] more setup work --- MANIFEST.in | 2 +- setup.py | 11 +++++++++-- trimage => trimage.py | 0 3 files changed, 10 insertions(+), 3 deletions(-) rename trimage => trimage.py (100%) diff --git a/MANIFEST.in b/MANIFEST.in index b1daca4..18e7120 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -include trimage +include trimage.py include ui.py recursive-include pixmaps * diff --git a/setup.py b/setup.py index 3a6ebc9..b9382ac 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,10 @@ #!/usr/bin/env python from distutils.core import setup +from trimage import VERSION setup(name = "Trimage", - version = "1.0.0b", + version = VERSION, description = "Trimage image compressor - A cross-platform tool for optimizing PNG and JPG files", author = "Kilian Valkhof, Paul Chaplin", author_email = "help@trimage.org", @@ -14,7 +15,13 @@ setup(name = "Trimage", "pixmaps/view-refresh.png", "pixmaps/compressing.gif", "pixmaps/trimage-icon.png"])], - scripts = ["trimage"], + scripts = ["trimage.py"], long_description = """Trimage is a cross-platform GUI and command-line interface to optimize image files via optipng, advpng and jpegoptim, depending on the filetype (currently, PNG and JPG files are supported). It was inspired by imageoptim. All image files are losslessy compressed on the highest available compression levels. Trimage gives you various input functions to fit your own workflow: A regular file dialog, dragging and dropping and various command line options.""", requires = ["PyQt4 (>4.4)"], + classifiers = [ + 'Programming Language :: Python :: 2', + 'Intended Audience :: Developers', + 'Operating System :: POSIX', + ], + ) diff --git a/trimage b/trimage.py similarity index 100% rename from trimage rename to trimage.py From 27d3fd782cd1a76806f53057fd02ab3a9073b4b5 Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Tue, 23 Mar 2010 14:45:24 +0100 Subject: [PATCH 006/160] more setup tweaks --- MANIFEST.in | 1 + __init__.py | 1 - setup.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 18e7120..b06ee8d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ include trimage.py include ui.py recursive-include pixmaps * +recursive-include hurry * diff --git a/__init__.py b/__init__.py index 8b13789..e69de29 100644 --- a/__init__.py +++ b/__init__.py @@ -1 +0,0 @@ - diff --git a/setup.py b/setup.py index b9382ac..18dc958 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from distutils.core import setup from trimage import VERSION -setup(name = "Trimage", +setup(name = "trimage", version = VERSION, description = "Trimage image compressor - A cross-platform tool for optimizing PNG and JPG files", author = "Kilian Valkhof, Paul Chaplin", From e96327edbd138138ab19fd642995ef463e410960 Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Tue, 23 Mar 2010 14:56:30 +0100 Subject: [PATCH 007/160] add a runner file --- setup.py | 2 +- trimage | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 trimage diff --git a/setup.py b/setup.py index 18dc958..7538dff 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ setup(name = "trimage", "pixmaps/view-refresh.png", "pixmaps/compressing.gif", "pixmaps/trimage-icon.png"])], - scripts = ["trimage.py"], + scripts = ["trimage"], long_description = """Trimage is a cross-platform GUI and command-line interface to optimize image files via optipng, advpng and jpegoptim, depending on the filetype (currently, PNG and JPG files are supported). It was inspired by imageoptim. All image files are losslessy compressed on the highest available compression levels. Trimage gives you various input functions to fit your own workflow: A regular file dialog, dragging and dropping and various command line options.""", requires = ["PyQt4 (>4.4)"], classifiers = [ diff --git a/trimage b/trimage new file mode 100644 index 0000000..a78ce72 --- /dev/null +++ b/trimage @@ -0,0 +1,7 @@ +#!/usr/bin/env python +import subprocess +import os, sys + +if __name__ == "__main__": + path = "/usr/local/share/trimage/trimage.py" #yeah so this isn't the nices tway... + subprocess.call([sys.executable, path] + sys.argv[1:]) From 6a00b2e25c96fc98239c28947e64f9c2b238b080 Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Tue, 23 Mar 2010 14:57:50 +0100 Subject: [PATCH 008/160] move runner to own folder --- trimage => runner/trimage | 0 setup.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename trimage => runner/trimage (100%) diff --git a/trimage b/runner/trimage similarity index 100% rename from trimage rename to runner/trimage diff --git a/setup.py b/setup.py index 7538dff..51696b6 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ setup(name = "trimage", "pixmaps/view-refresh.png", "pixmaps/compressing.gif", "pixmaps/trimage-icon.png"])], - scripts = ["trimage"], + scripts = ["runner/trimage"], long_description = """Trimage is a cross-platform GUI and command-line interface to optimize image files via optipng, advpng and jpegoptim, depending on the filetype (currently, PNG and JPG files are supported). It was inspired by imageoptim. All image files are losslessy compressed on the highest available compression levels. Trimage gives you various input functions to fit your own workflow: A regular file dialog, dragging and dropping and various command line options.""", requires = ["PyQt4 (>4.4)"], classifiers = [ From d79a5c498b9c6c9e5c09901317a0efc4d4b979fd Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Tue, 23 Mar 2010 15:23:50 +0100 Subject: [PATCH 009/160] install trimage as module --- runner/trimage | 3 ++- setup.cfg | 5 ----- ui.py | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 setup.cfg diff --git a/runner/trimage b/runner/trimage index a78ce72..596d061 100644 --- a/runner/trimage +++ b/runner/trimage @@ -1,7 +1,8 @@ #!/usr/bin/env python +import trimage import subprocess import os, sys if __name__ == "__main__": - path = "/usr/local/share/trimage/trimage.py" #yeah so this isn't the nices tway... + path = os.path.join(os.path.dirname(trimage.__file__), "trimage.py") subprocess.call([sys.executable, path] + sys.argv[1:]) diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index fc9bdd6..0000000 --- a/setup.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[install] -install_lib=/usr/local/share/trimage -install_data=/usr/local/share/trimage -install_scripts=/usr/local/bin - diff --git a/ui.py b/ui.py index 685c8f3..3594c23 100644 --- a/ui.py +++ b/ui.py @@ -1,7 +1,6 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * - class TrimageTableView(QTableView): """Init the table drop event.""" def __init__(self, parent=None): From 3f265951986ca862eac9b240042fd541183fd3f0 Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Tue, 23 Mar 2010 15:57:54 +0100 Subject: [PATCH 010/160] show images as well --- runner/trimage | 3 +- trimage.py | 133 +------------------------------------------------ ui.py | 11 ++-- 3 files changed, 10 insertions(+), 137 deletions(-) diff --git a/runner/trimage b/runner/trimage index 596d061..e79e089 100644 --- a/runner/trimage +++ b/runner/trimage @@ -1,8 +1,7 @@ #!/usr/bin/env python -import trimage import subprocess import os, sys if __name__ == "__main__": - path = os.path.join(os.path.dirname(trimage.__file__), "trimage.py") + path = "/usr/local/share/trimage/trimage.py" subprocess.call([sys.executable, path] + sys.argv[1:]) diff --git a/trimage.py b/trimage.py index dd0f51e..20c7efd 100755 --- a/trimage.py +++ b/trimage.py @@ -148,7 +148,7 @@ class StartQT4(QMainWindow): if self.checkname(image): delegatorlist.append((image, QIcon(image))) self.imagelist.append(("Compressing...", "", "", "", image, - QIcon(QPixmap("pixmaps/compressing.gif")))) + QIcon(QPixmap(self.ui.get_image("pixmaps/compressing.gif"))))) else: sys.stderr.write("[error] %s not an image file" % image) @@ -361,137 +361,6 @@ class TrimageTableView(QTableView): files[i] = QUrl(QString(file)).toLocalFile() self.emit(SIGNAL("fileDropEvent"), (files)) - -class Ui_trimage(object): - def setupUi(self, trimage): - trimage.setObjectName("trimage") - trimage.resize(600, 170) - trimage.setWindowIcon(QIcon("pixmaps/trimage-icon.png")) - - self.centralwidget = QWidget(trimage) - self.centralwidget.setObjectName("centralwidget") - - self.gridLayout_2 = QGridLayout(self.centralwidget) - self.gridLayout_2.setMargin(0) - self.gridLayout_2.setSpacing(0) - self.gridLayout_2.setObjectName("gridLayout_2") - - self.widget = QWidget(self.centralwidget) - self.widget.setEnabled(True) - sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(1) - sizePolicy.setVerticalStretch(1) - sizePolicy.setHeightForWidth( - self.widget.sizePolicy().hasHeightForWidth()) - self.widget.setSizePolicy(sizePolicy) - self.widget.setObjectName("widget") - - self.verticalLayout = QVBoxLayout(self.widget) - self.verticalLayout.setSpacing(0) - self.verticalLayout.setMargin(0) - self.verticalLayout.setObjectName("verticalLayout") - - self.frame = QFrame(self.widget) - self.frame.setObjectName("frame") - - self.verticalLayout_2 = QVBoxLayout(self.frame) - self.verticalLayout_2.setSpacing(0) - self.verticalLayout_2.setMargin(0) - self.verticalLayout_2.setObjectName("verticalLayout_2") - - self.horizontalLayout = QHBoxLayout() - self.horizontalLayout.setSpacing(0) - self.horizontalLayout.setMargin(10) - self.horizontalLayout.setObjectName("horizontalLayout") - - self.addfiles = QPushButton(self.frame) - font = QFont() - font.setPointSize(9) - self.addfiles.setFont(font) - self.addfiles.setCursor(Qt.PointingHandCursor) - icon = QIcon() - icon.addPixmap(QPixmap("pixmaps/list-add.png"), QIcon.Normal, QIcon.Off) - self.addfiles.setIcon(icon) - self.addfiles.setObjectName("addfiles") - self.addfiles.setAcceptDrops(True) - self.horizontalLayout.addWidget(self.addfiles) - - self.label = QLabel(self.frame) - font = QFont() - font.setPointSize(8) - self.label.setFont(font) - self.label.setFrameShadow(QFrame.Plain) - self.label.setMargin(1) - self.label.setIndent(10) - self.label.setObjectName("label") - self.horizontalLayout.addWidget(self.label) - - spacerItem = QSpacerItem(498, 20, QSizePolicy.Expanding, - QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem) - self.recompress = QPushButton(self.frame) - font = QFont() - font.setPointSize(9) - self.recompress.setFont(font) - self.recompress.setCursor(Qt.PointingHandCursor) - - icon1 = QIcon() - icon1.addPixmap(QPixmap("pixmaps/view-refresh.png"), QIcon.Normal, QIcon.Off) - - self.recompress.setIcon(icon1) - self.recompress.setCheckable(False) - self.recompress.setObjectName("recompress") - self.horizontalLayout.addWidget(self.recompress) - self.verticalLayout_2.addLayout(self.horizontalLayout) - - self.processedfiles = TrimageTableView(self.frame) - self.processedfiles.setEnabled(True) - self.processedfiles.setFrameShape(QFrame.NoFrame) - self.processedfiles.setFrameShadow(QFrame.Plain) - self.processedfiles.setLineWidth(0) - self.processedfiles.setMidLineWidth(0) - self.processedfiles.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) - self.processedfiles.setTabKeyNavigation(True) - self.processedfiles.setAlternatingRowColors(True) - self.processedfiles.setTextElideMode(Qt.ElideRight) - self.processedfiles.setShowGrid(True) - self.processedfiles.setGridStyle(Qt.NoPen) - self.processedfiles.setSortingEnabled(False) - self.processedfiles.setObjectName("processedfiles") - self.processedfiles.resizeColumnsToContents() - self.processedfiles.setSelectionMode(QAbstractItemView.NoSelection) - self.verticalLayout_2.addWidget(self.processedfiles) - self.verticalLayout.addWidget(self.frame) - self.gridLayout_2.addWidget(self.widget, 0, 0, 1, 1) - trimage.setCentralWidget(self.centralwidget) - - self.retranslateUi(trimage) - QMetaObject.connectSlotsByName(trimage) - - def retranslateUi(self, trimage): - trimage.setWindowTitle(QApplication.translate("trimage", - "Trimage image compressor", None, QApplication.UnicodeUTF8)) - self.addfiles.setToolTip(QApplication.translate("trimage", - "Add file to the compression list", None, - QApplication.UnicodeUTF8)) - self.addfiles.setText(QApplication.translate("trimage", - "&Add and compress", None, QApplication.UnicodeUTF8)) - self.addfiles.setShortcut(QApplication.translate("trimage", - "Alt+A", None, QApplication.UnicodeUTF8)) - self.label.setText(QApplication.translate("trimage", - "Drag and drop images onto the table", None, - QApplication.UnicodeUTF8)) - self.recompress.setToolTip(QApplication.translate("trimage", - "Recompress selected images", None, QApplication.UnicodeUTF8)) - self.recompress.setText(QApplication.translate("trimage", - "&Recompress", None, QApplication.UnicodeUTF8)) - self.recompress.setShortcut(QApplication.translate("trimage", - "Alt+R", None, QApplication.UnicodeUTF8)) - self.processedfiles.setToolTip(QApplication.translate("trimage", - "Drag files in here", None, QApplication.UnicodeUTF8)) - self.processedfiles.setWhatsThis(QApplication.translate("trimage", - "Drag files in here", None, QApplication.UnicodeUTF8)) - if __name__ == "__main__": app = QApplication(sys.argv) myapp = StartQT4() diff --git a/ui.py b/ui.py index 3594c23..0788c4f 100644 --- a/ui.py +++ b/ui.py @@ -1,5 +1,6 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from os import path class TrimageTableView(QTableView): """Init the table drop event.""" @@ -24,10 +25,14 @@ class TrimageTableView(QTableView): class Ui_trimage(object): + def get_image(self, image): + imagelink = path.join(path.dirname(path.dirname(path.realpath(__file__))), "trimage/" + image) + return imagelink + def setupUi(self, trimage): trimage.setObjectName("trimage") trimage.resize(600, 170) - trimage.setWindowIcon(QIcon("pixmaps/trimage-icon.png")) + trimage.setWindowIcon(QIcon(self.get_image("pixmaps/trimage-icon.png"))) self.centralwidget = QWidget(trimage) self.centralwidget.setObjectName("centralwidget") @@ -71,7 +76,7 @@ class Ui_trimage(object): self.addfiles.setFont(font) self.addfiles.setCursor(Qt.PointingHandCursor) icon = QIcon() - icon.addPixmap(QPixmap("pixmaps/list-add.png"), QIcon.Normal, QIcon.Off) + icon.addPixmap(QPixmap(self.get_image("pixmaps/list-add.png")), QIcon.Normal, QIcon.Off) self.addfiles.setIcon(icon) self.addfiles.setObjectName("addfiles") self.addfiles.setAcceptDrops(True) @@ -97,7 +102,7 @@ class Ui_trimage(object): self.recompress.setCursor(Qt.PointingHandCursor) icon1 = QIcon() - icon1.addPixmap(QPixmap("pixmaps/view-refresh.png"), QIcon.Normal, QIcon.Off) + icon1.addPixmap(QPixmap(self.get_image("pixmaps/view-refresh.png")), QIcon.Normal, QIcon.Off) self.recompress.setIcon(icon1) self.recompress.setCheckable(False) From 7efecb7b8981d7d08a4cc1d570e3dac730768a22 Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Tue, 23 Mar 2010 17:45:51 +0100 Subject: [PATCH 011/160] work in progress --- MANIFEST.in | 1 + setup.py | 5 +++-- website/index.html | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index b06ee8d..9d28bcc 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,6 @@ include trimage.py include ui.py +include trimage.desktop recursive-include pixmaps * recursive-include hurry * diff --git a/setup.py b/setup.py index 51696b6..63b7371 100644 --- a/setup.py +++ b/setup.py @@ -11,13 +11,14 @@ setup(name = "trimage", url = "http://trimage.org", license = "MIT license", packages = ["hurry", "hurry/filesize",""], - data_files = [("pixmaps", ["pixmaps/list-add.png", + data_files = [("share/applications", ["trimage.desktop"]), + ("pixmaps", ["pixmaps/list-add.png", "pixmaps/view-refresh.png", "pixmaps/compressing.gif", "pixmaps/trimage-icon.png"])], scripts = ["runner/trimage"], long_description = """Trimage is a cross-platform GUI and command-line interface to optimize image files via optipng, advpng and jpegoptim, depending on the filetype (currently, PNG and JPG files are supported). It was inspired by imageoptim. All image files are losslessy compressed on the highest available compression levels. Trimage gives you various input functions to fit your own workflow: A regular file dialog, dragging and dropping and various command line options.""", - requires = ["PyQt4 (>4.4)"], + requires = ["PyQt4 (>=4.4)"], classifiers = [ 'Programming Language :: Python :: 2', 'Intended Audience :: Developers', diff --git a/website/index.html b/website/index.html index ebfce8d..76255c4 100644 --- a/website/index.html +++ b/website/index.html @@ -94,8 +94,8 @@
  1. Download the source via git or bzr (see repositories)
  2. Make sure you have all the requirements installed (see requirements)
  3. -
  4. make trimage.py executable (chmod +x trimage.py)
  5. -
  6. Start by clicking on trimage.py or launching it with ./trimage.py
  7. +
  8. Enter python setup.py install into your console
  9. +
  10. Launch by executing trimage

Help us make .deb's, rpms's etc: contact us

Mac

From a24d69a1785642bc86fd0f6becb103755376a1fe Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Tue, 23 Mar 2010 17:46:04 +0100 Subject: [PATCH 012/160] add cfg file and desktop file --- setup.cfg | 5 +++++ trimage.desktop | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 setup.cfg create mode 100644 trimage.desktop diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..7a7196d --- /dev/null +++ b/setup.cfg @@ -0,0 +1,5 @@ +[install] +install_lib=/usr/share/trimage +install_data=/usr/share/trimage +install_scripts=/usr/bin + diff --git a/trimage.desktop b/trimage.desktop new file mode 100644 index 0000000..6efde65 --- /dev/null +++ b/trimage.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Trimage image compressor +Comment=A cross-platform tool for optimizing PNG and JPG files. +Terminal=false +Icon=pixmaps/trimage-icon.png +Type=Application +Exec=trimage +Categories=GNOME;GTK;Graphics; +StartupNotify=true + From c797699ff770cafd9d599a7873183273c646d225 Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Tue, 23 Mar 2010 17:57:44 +0100 Subject: [PATCH 013/160] install in share instead of local/share --- MANIFEST.in | 1 + runner/trimage | 2 +- setup.py | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 9d28bcc..7babae2 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,7 @@ include trimage.py include ui.py include trimage.desktop +include MIT-LICENSE recursive-include pixmaps * recursive-include hurry * diff --git a/runner/trimage b/runner/trimage index e79e089..c53bded 100644 --- a/runner/trimage +++ b/runner/trimage @@ -3,5 +3,5 @@ import subprocess import os, sys if __name__ == "__main__": - path = "/usr/local/share/trimage/trimage.py" + path = "/usr/share/trimage/trimage.py" subprocess.call([sys.executable, path] + sys.argv[1:]) diff --git a/setup.py b/setup.py index 63b7371..23e72e3 100644 --- a/setup.py +++ b/setup.py @@ -21,8 +21,11 @@ setup(name = "trimage", requires = ["PyQt4 (>=4.4)"], classifiers = [ 'Programming Language :: Python :: 2', + 'Development Status :: 4 - Beta', + 'Environment :: X11 Applications :: Qt', + 'Intended Audience :: End Users/Desktop' 'Intended Audience :: Developers', - 'Operating System :: POSIX', + 'Operating System :: POSIX :: linux', ], ) From 41672b8a39b9a303ee4d7347fbbea678a5ad2ca8 Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Tue, 23 Mar 2010 18:19:43 +0100 Subject: [PATCH 014/160] update desktop file --- trimage.desktop | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 trimage.desktop diff --git a/trimage.desktop b/trimage.desktop old mode 100644 new mode 100755 index 6efde65..5d95d4c --- a/trimage.desktop +++ b/trimage.desktop @@ -1,8 +1,9 @@ + [Desktop Entry] Name=Trimage image compressor Comment=A cross-platform tool for optimizing PNG and JPG files. Terminal=false -Icon=pixmaps/trimage-icon.png +Icon=/usr/share/trimage/pixmaps/trimage-icon.png Type=Application Exec=trimage Categories=GNOME;GTK;Graphics; From 8dcec263ffc0fe8d84b11e970156d992e12a120e Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Tue, 23 Mar 2010 20:48:17 +0100 Subject: [PATCH 015/160] massive overhaul of directory to make it work nicer with .deb generation --- MIT-LICENSE => COPYING | 0 MANIFEST.in | 9 +- README | 15 ++ README.textile | 7 - debian/changelog | 6 + debian/compat | 1 + debian/control | 16 ++ debian/copyright | 41 +++ debian/docs | 1 + debian/pycompat | 1 + debian/rules | 8 + trimage.desktop => desktop/trimage.desktop | 3 +- .../logo-trimage.svg => desktop/trimage.svg | 22 +- resources/todo | 3 +- resources/trimage.svg | 237 ++++++++++++++++++ runner/trimage | 7 - setup.cfg | 5 - setup.py | 43 ++-- __init__.py => src/trimage/__init__.py | 0 {hurry => src/trimage/hurry}/__init__.py | 0 .../trimage/hurry}/filesize/README.txt | 0 .../trimage/hurry}/filesize/__init__.py | 0 .../trimage/hurry}/filesize/filesize.py | 0 .../trimage/hurry}/filesize/tests.py | 0 .../trimage/pixmaps}/compressing.gif | Bin {pixmaps => src/trimage/pixmaps}/list-add.png | Bin .../trimage/pixmaps}/trimage-icon.png | Bin .../trimage/pixmaps}/view-refresh.png | Bin trimage.py => src/trimage/trimage.py | 0 ui.py => src/trimage/ui.py | 0 trimage | 23 ++ 31 files changed, 384 insertions(+), 64 deletions(-) rename MIT-LICENSE => COPYING (100%) create mode 100644 README delete mode 100644 README.textile create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/pycompat create mode 100755 debian/rules rename trimage.desktop => desktop/trimage.desktop (80%) rename resources/logo-trimage.svg => desktop/trimage.svg (91%) create mode 100644 resources/trimage.svg delete mode 100644 runner/trimage delete mode 100644 setup.cfg rename __init__.py => src/trimage/__init__.py (100%) rename {hurry => src/trimage/hurry}/__init__.py (100%) rename {hurry => src/trimage/hurry}/filesize/README.txt (100%) rename {hurry => src/trimage/hurry}/filesize/__init__.py (100%) rename {hurry => src/trimage/hurry}/filesize/filesize.py (100%) rename {hurry => src/trimage/hurry}/filesize/tests.py (100%) rename {pixmaps => src/trimage/pixmaps}/compressing.gif (100%) rename {pixmaps => src/trimage/pixmaps}/list-add.png (100%) rename {pixmaps => src/trimage/pixmaps}/trimage-icon.png (100%) rename {pixmaps => src/trimage/pixmaps}/view-refresh.png (100%) rename trimage.py => src/trimage/trimage.py (100%) rename ui.py => src/trimage/ui.py (100%) create mode 100644 trimage diff --git a/MIT-LICENSE b/COPYING similarity index 100% rename from MIT-LICENSE rename to COPYING diff --git a/MANIFEST.in b/MANIFEST.in index 7babae2..7cbcb9f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,4 @@ -include trimage.py -include ui.py -include trimage.desktop -include MIT-LICENSE -recursive-include pixmaps * -recursive-include hurry * +include COPYING MANIFEST MANIFEST.in README trimage +recursive-include desktop *.svg *.desktop +recursive-include src/ *.py *.png diff --git a/README b/README new file mode 100644 index 0000000..9bae809 --- /dev/null +++ b/README @@ -0,0 +1,15 @@ +Trimage image compressor +A cross-platform tool for optimizing PNG and JPG files. + +Trimage is a cross-platform GUI and command-line interface to optimize image +files via "optipng":http://optipng.sourceforge.net/, +"advpng":http://advancemame.sourceforge.net/comp-readme.html and +"jpegoptim":http://www.kokkonen.net/tjko/projects.html, depending on the +filetype (currently, PNG and JPG files are supported). It was inspired by +"imageoptim":http://imageoptim.pornel.net/. All image files are losslessy +compressed on the highest available compression levels. Trimage gives you +various input functions to fit your own workflow: A regular file dialog, +dragging and dropping and various command line options. + +Visit "Trimage.org":http://trimage.org for more information + diff --git a/README.textile b/README.textile deleted file mode 100644 index fe93187..0000000 --- a/README.textile +++ /dev/null @@ -1,7 +0,0 @@ -h2. Trimage image compressor -A cross-platform tool for optimizing PNG and JPG files. - -Trimage is a cross-platform GUI and command-line interface to optimize image files via "optipng":http://optipng.sourceforge.net/, "advpng":http://advancemame.sourceforge.net/comp-readme.html and "jpegoptim":http://www.kokkonen.net/tjko/projects.html, depending on the filetype (currently, PNG and JPG files are supported). It was inspired by "imageoptim":http://imageoptim.pornel.net/. All image files are losslessy compressed on the highest available compression levels. Trimage gives you various input functions to fit your own workflow: A regular file dialog, dragging and dropping and various command line options. - -Visit "Trimage.org":http://trimage.org for more information - diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..a070ef0 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +trimage (1.0.0b-0ubuntu1) jaunty; urgency=low + + * Trimage image compressor + + -- Kilian Valkhof Tue, 23 Mar 2010 20:18:17 +0100 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..b39d1b6 --- /dev/null +++ b/debian/control @@ -0,0 +1,16 @@ +Source: trimage +Section: graphics +Priority: optional +Maintainer: Kilian Valkhof +Build-Depends: cdbs (>=0.4.49), debhelper (>= 5), python-central (>=0.5.6), python +XS-Python-Version: >=2.6 +Standards-Version: 3.8.0 +Homepage: https://launchpad.net/pyAppTemplate + +Package: trimage +Architecture: all +Depends: ${misc:Depends}, ${python:Depends}, python-qt4 (>= 4.4), optipng (>= 0.6.2.1), advancecomp (>=1.15), jpegoptim (>=1.2.2) +XB-Python-Version: ${python:Versions} +Description: A cross-platform tool for optimizing PNG and JPG files. + Trimage is a cross-platform GUI and command-line interface to optimize image files via optipng, advpng and jpegoptim, depending on the filetype (currently, PNG and JPG files are supported). It was inspired by imageoptim. All image files are losslessy compressed on the highest available compression levels. Trimage gives you various input functions to fit your own workflow: A regular file dialog, dragging and dropping and various command line options. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..eff6dd1 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,41 @@ +This package was debianized by: + + Kilian Valkhof on Tue, 23 Mar 2010 20:18:17 +0100 + +Upstream Author(s): + + Kilian Valkhof + +Copyright: + + Copyright (C) 2010 Kilian Valkhof, Paul Chaplin + +License: + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + +The Debian packaging is: + + Copyright (C) 2010 Kilian Valkhof, Paul Chaplin + +and is licensed under the MIT license, see above. + diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README diff --git a/debian/pycompat b/debian/pycompat new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/debian/pycompat @@ -0,0 +1 @@ +2 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..528517d --- /dev/null +++ b/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +DEB_PYTHON_SYSTEM=pycentral + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk + +# Add here any variable or target overrides you need. diff --git a/trimage.desktop b/desktop/trimage.desktop similarity index 80% rename from trimage.desktop rename to desktop/trimage.desktop index 5d95d4c..2e4723c 100755 --- a/trimage.desktop +++ b/desktop/trimage.desktop @@ -1,9 +1,8 @@ - [Desktop Entry] Name=Trimage image compressor Comment=A cross-platform tool for optimizing PNG and JPG files. Terminal=false -Icon=/usr/share/trimage/pixmaps/trimage-icon.png +Icon=trimage Type=Application Exec=trimage Categories=GNOME;GTK;Graphics; diff --git a/resources/logo-trimage.svg b/desktop/trimage.svg similarity index 91% rename from resources/logo-trimage.svg rename to desktop/trimage.svg index c63b868..bbdf85a 100644 --- a/resources/logo-trimage.svg +++ b/desktop/trimage.svg @@ -9,13 +9,14 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="744.09448819" - height="1052.3622047" + width="524.81012" + height="541.92767" id="svg2" sodipodi:version="0.32" inkscape:version="0.46" sodipodi:docname="logo-trimage.svg" - inkscape:output_extension="org.inkscape.output.svg.inkscape"> + inkscape:output_extension="org.inkscape.output.svg.inkscape" + version="1.0"> + id="layer1" + transform="translate(-72.611421,-111.20599)"> + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/runner/trimage b/runner/trimage deleted file mode 100644 index c53bded..0000000 --- a/runner/trimage +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python -import subprocess -import os, sys - -if __name__ == "__main__": - path = "/usr/share/trimage/trimage.py" - subprocess.call([sys.executable, path] + sys.argv[1:]) diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 7a7196d..0000000 --- a/setup.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[install] -install_lib=/usr/share/trimage -install_data=/usr/share/trimage -install_scripts=/usr/bin - diff --git a/setup.py b/setup.py index 23e72e3..2e0ac48 100644 --- a/setup.py +++ b/setup.py @@ -1,31 +1,22 @@ #!/usr/bin/env python from distutils.core import setup -from trimage import VERSION setup(name = "trimage", - version = VERSION, - description = "Trimage image compressor - A cross-platform tool for optimizing PNG and JPG files", - author = "Kilian Valkhof, Paul Chaplin", - author_email = "help@trimage.org", - url = "http://trimage.org", - license = "MIT license", - packages = ["hurry", "hurry/filesize",""], - data_files = [("share/applications", ["trimage.desktop"]), - ("pixmaps", ["pixmaps/list-add.png", - "pixmaps/view-refresh.png", - "pixmaps/compressing.gif", - "pixmaps/trimage-icon.png"])], - scripts = ["runner/trimage"], - long_description = """Trimage is a cross-platform GUI and command-line interface to optimize image files via optipng, advpng and jpegoptim, depending on the filetype (currently, PNG and JPG files are supported). It was inspired by imageoptim. All image files are losslessy compressed on the highest available compression levels. Trimage gives you various input functions to fit your own workflow: A regular file dialog, dragging and dropping and various command line options.""", - requires = ["PyQt4 (>=4.4)"], - classifiers = [ - 'Programming Language :: Python :: 2', - 'Development Status :: 4 - Beta', - 'Environment :: X11 Applications :: Qt', - 'Intended Audience :: End Users/Desktop' - 'Intended Audience :: Developers', - 'Operating System :: POSIX :: linux', - ], - - ) + version = "1.0.0b", + description = "Trimage image compressor - A cross-platform tool for optimizing PNG and JPG files", + author = "Kilian Valkhof, Paul Chaplin", + author_email = "help@trimage.org", + url = "http://trimage.org", + license = "MIT license", + package_dir = {'trimage' : 'src/trimage'}, + packages = ["trimage", + "trimage.hurry", + "trimage.hurry.filesize"], + package_data = {"trimage" : ["pixmaps/*.*"] }, + data_files=[('share/icons/hicolor/scalable/apps', ['desktop/trimage.svg']), + ('share/applications', ['desktop/trimage.desktop'])], + scripts = ["trimage"], + long_description = """Trimage is a cross-platform GUI and command-line interface to optimize image files via optipng, advpng and jpegoptim, depending on the filetype (currently, PNG and JPG files are supported). It was inspired by imageoptim. All image files are losslessy compressed on the highest available compression levels. Trimage gives you various input functions to fit your own workflow: A regular file dialog, dragging and dropping and various command line options.""", + requires = ["PyQt4 (>=4.4)"], + ) diff --git a/__init__.py b/src/trimage/__init__.py similarity index 100% rename from __init__.py rename to src/trimage/__init__.py diff --git a/hurry/__init__.py b/src/trimage/hurry/__init__.py similarity index 100% rename from hurry/__init__.py rename to src/trimage/hurry/__init__.py diff --git a/hurry/filesize/README.txt b/src/trimage/hurry/filesize/README.txt similarity index 100% rename from hurry/filesize/README.txt rename to src/trimage/hurry/filesize/README.txt diff --git a/hurry/filesize/__init__.py b/src/trimage/hurry/filesize/__init__.py similarity index 100% rename from hurry/filesize/__init__.py rename to src/trimage/hurry/filesize/__init__.py diff --git a/hurry/filesize/filesize.py b/src/trimage/hurry/filesize/filesize.py similarity index 100% rename from hurry/filesize/filesize.py rename to src/trimage/hurry/filesize/filesize.py diff --git a/hurry/filesize/tests.py b/src/trimage/hurry/filesize/tests.py similarity index 100% rename from hurry/filesize/tests.py rename to src/trimage/hurry/filesize/tests.py diff --git a/pixmaps/compressing.gif b/src/trimage/pixmaps/compressing.gif similarity index 100% rename from pixmaps/compressing.gif rename to src/trimage/pixmaps/compressing.gif diff --git a/pixmaps/list-add.png b/src/trimage/pixmaps/list-add.png similarity index 100% rename from pixmaps/list-add.png rename to src/trimage/pixmaps/list-add.png diff --git a/pixmaps/trimage-icon.png b/src/trimage/pixmaps/trimage-icon.png similarity index 100% rename from pixmaps/trimage-icon.png rename to src/trimage/pixmaps/trimage-icon.png diff --git a/pixmaps/view-refresh.png b/src/trimage/pixmaps/view-refresh.png similarity index 100% rename from pixmaps/view-refresh.png rename to src/trimage/pixmaps/view-refresh.png diff --git a/trimage.py b/src/trimage/trimage.py similarity index 100% rename from trimage.py rename to src/trimage/trimage.py diff --git a/ui.py b/src/trimage/ui.py similarity index 100% rename from ui.py rename to src/trimage/ui.py diff --git a/trimage b/trimage new file mode 100644 index 0000000..05e6139 --- /dev/null +++ b/trimage @@ -0,0 +1,23 @@ +#!/usr/bin/env python +# +#Copyright (c) 2010 Kilian Valkhof, Paul Chaplin +# +#Permission is hereby granted, free of charge, to any person +#obtaining a copy of this software and associated documentation +#files (the "Software"), to deal in the Software without +#restriction, including without limitation the rights to use, +#copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the +#Software is furnished to do so, subject to the following +#conditions: +# +#The above copyright notice and this permission notice shall be +#included in all copies or substantial portions of the Software. + +import os, sys +import subprocess +import trimage + +if __name__ == "__main__": + path = os.path.join(os.path.dirname(trimage.__file__), "trimage.py") + subprocess.call([sys.executable, path] + sys.argv[1:]) From 70181f97ef4110c6879e6b98834a557ce1f01761 Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Wed, 24 Mar 2010 11:51:02 +0100 Subject: [PATCH 016/160] update website --- website/index.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/website/index.html b/website/index.html index 76255c4..b902bdb 100644 --- a/website/index.html +++ b/website/index.html @@ -40,6 +40,8 @@ .tri { -moz-column-count:3; -webkit-column-count:3; + -moz-column-gap:2em; + -webkit-column-gap:2em; text-align:justify; } img { @@ -85,11 +87,13 @@

Download

Ubuntu

+

If you're on karmic or lucid, type the following commands into your console:

    -
  1. sudo add-apt-repository lp:trimage
  2. +
  3. sudo add-apt-repository ppa:kilian/trimage
  4. +
  5. sudo apt-get update
  6. sudo apt-get install trimage
- +

If you are still on Jaunty, read this guide on installing PPA's.

Other *nix

  1. Download the source via git or bzr (see repositories)
  2. From 19308292c0afadb74c2187d5e032d903c68d5784 Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Wed, 24 Mar 2010 12:51:26 +0100 Subject: [PATCH 017/160] implement Menno's fix for Mac OSX --- src/trimage/trimage.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/trimage/trimage.py b/src/trimage/trimage.py index 20c7efd..c603443 100755 --- a/src/trimage/trimage.py +++ b/src/trimage/trimage.py @@ -1,6 +1,7 @@ #!/usr/bin/python import sys +import errno from os import listdir from os import path from subprocess import call, PIPE @@ -203,22 +204,31 @@ class StartQT4(QMainWindow): def checkapps(self): """Check if the required command line apps exist.""" status = False - retcode = call("jpegoptim --version", shell=True, stdout=PIPE) + retcode = self.safe_call("jpegoptim --version") if retcode != 0: status = True sys.stderr.write("[error] please install jpegoptim") - retcode = call("optipng -v", shell=True, stdout=PIPE) + retcode = self.safe_call("optipng -v") if retcode != 0: status = True sys.stderr.write("[error] please install optipng") - retcode = call("advpng --version", shell=True, stdout=PIPE) + retcode = self.save_call("advpng --version") if retcode != 0: status = True sys.stderr.write("[error] please install advancecomp") return status + def safe_call(self, command): + while True: + try: + return call(command, shell=True, stdout=PIPE) + except OSError, e: + if e.errno == errno.EINTR: + continue + else: + raise class TriTableModel(QAbstractTableModel): From e382b579ecbca4d4167d504c0d897c6525d81c0e Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Wed, 24 Mar 2010 13:13:13 +0100 Subject: [PATCH 018/160] fix typo for mac OSX version --- src/trimage/trimage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trimage/trimage.py b/src/trimage/trimage.py index c603443..53ba73f 100755 --- a/src/trimage/trimage.py +++ b/src/trimage/trimage.py @@ -214,7 +214,7 @@ class StartQT4(QMainWindow): status = True sys.stderr.write("[error] please install optipng") - retcode = self.save_call("advpng --version") + retcode = self.safe_call("advpng --version") if retcode != 0: status = True sys.stderr.write("[error] please install advancecomp") From a506c0fee41440afe3e5cbcc2d29e2eb8ab2feb2 Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Sun, 28 Mar 2010 16:11:50 +0200 Subject: [PATCH 019/160] fix handling of unicode characters in filenames, bump version to 1.0.0b2 --- debian/changelog | 8 ++++---- setup.py | 2 +- src/trimage/trimage.py | 35 +++++++++++++++++++++++++---------- src/trimage/ui.py | 12 +++++++----- website/index.html | 12 ++++++++---- 5 files changed, 45 insertions(+), 24 deletions(-) diff --git a/debian/changelog b/debian/changelog index a070ef0..81d75e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ -trimage (1.0.0b-0ubuntu1) jaunty; urgency=low +trimage (1.0.0b2-0ubuntu1) jaunty; urgency=low - * Trimage image compressor - - -- Kilian Valkhof Tue, 23 Mar 2010 20:18:17 +0100 + * correct parsing of unicode characters in filenames + * changelog + -- Kilian Valkhof Sun, 28 Mar 2010 16:09:45 +0200 diff --git a/setup.py b/setup.py index 2e0ac48..f286b8b 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from distutils.core import setup setup(name = "trimage", - version = "1.0.0b", + version = "1.0.0b2", description = "Trimage image compressor - A cross-platform tool for optimizing PNG and JPG files", author = "Kilian Valkhof, Paul Chaplin", author_email = "help@trimage.org", diff --git a/src/trimage/trimage.py b/src/trimage/trimage.py index 53ba73f..e8a6182 100755 --- a/src/trimage/trimage.py +++ b/src/trimage/trimage.py @@ -13,7 +13,8 @@ from hurry.filesize import * from ui import Ui_trimage -VERSION = "1.0.0b" +VERSION = "1.0.0b2" + class StartQT4(QMainWindow): @@ -100,8 +101,9 @@ class StartQT4(QMainWindow): imagedir = listdir(directory) filelist = QStringList() for image in imagedir: - image = QString(path.join(dirpath, image)) - filelist.append(image) + image = self.unicodize(path.join(dirpath, image)) + if self.checkname(image): + filelist.append(image) self.delegator(filelist) def file_from_cmd(self, image): @@ -109,13 +111,16 @@ class StartQT4(QMainWindow): self.showapp = False image = path.abspath(image) filecmdlist = QStringList() - filecmdlist.append(image) + if self.checkname(image): + filecmdlist.append(self.unicodize(image)) self.delegator(filecmdlist) def file_drop(self, images): """ Get a file from the drag and drop handler and send it to compress_file. """ + for image in images: + image = self.unicodize(unicode(image).encode('utf-8')) self.delegator(images) def file_dialog(self): @@ -126,6 +131,10 @@ class StartQT4(QMainWindow): "", # directory # this is a fix for file dialog differentiating between cases "Image files (*.png *.jpg *.jpeg *.PNG *.JPG *.JPEG)") + + for image in images: + image = self.unicodize(unicode(image)) + self.delegator(images) def recompress_files(self): @@ -151,7 +160,7 @@ class StartQT4(QMainWindow): self.imagelist.append(("Compressing...", "", "", "", image, QIcon(QPixmap(self.ui.get_image("pixmaps/compressing.gif"))))) else: - sys.stderr.write("[error] %s not an image file" % image) + sys.stderr.write("[error] %s not an image file\n" % image) self.update_table() self.thread.compress_file(delegatorlist, self.showapp, self.verbose, @@ -195,7 +204,7 @@ class StartQT4(QMainWindow): def checkname(self, name): """Check if the file is a jpg or png.""" - return path.splitext(str(name))[1].lower() in [".jpg", ".jpeg", ".png"] + return path.splitext(unicode(name))[1].lower() in [".jpg", ".jpeg", ".png"] def enable_recompress(self): """Enable the recompress button.""" @@ -230,6 +239,13 @@ class StartQT4(QMainWindow): else: raise + def unicodize(self, obj, encoding='utf-8'): + if isinstance(obj, basestring): + if not isinstance(obj, unicode): + obj = unicode(obj, encoding) + return obj + + class TriTableModel(QAbstractTableModel): def __init__(self, parent, imagelist, header, *args): @@ -294,7 +310,7 @@ class Worker(QThread): """Compress the given file, get data from it and call update_table.""" for image in self.images: #gather old file data - filename = str(image[0]) + filename = unicode(image[0]) icon = image[1] oldfile = QFileInfo(filename) name = oldfile.fileName() @@ -305,10 +321,9 @@ class Worker(QThread): extention = path.splitext(filename)[1] #decide with tool to use if extention in [".jpg", ".jpeg"]: - runString = "jpegoptim -f --strip-all '%(file)s'" + runString = u"jpegoptim -f --strip-all '%(file)s'" elif extention in [".png"]: - runString = ("optipng -force -o7 '%(file)s';" - "advpng -z4 '%(file)s'") + runString = (u"optipng -force -o7 '%(file)s'; advpng -z4 '%(file)s'") else: sys.stderr.write("[error] %s not an image file" % filename) diff --git a/src/trimage/ui.py b/src/trimage/ui.py index 0788c4f..6f4ec81 100644 --- a/src/trimage/ui.py +++ b/src/trimage/ui.py @@ -9,7 +9,7 @@ class TrimageTableView(QTableView): self.setAcceptDrops(True) def dragEnterEvent(self, event): - if event.mimeData().hasFormat("text/uri-list"): + if event.mimeData().hasUrls: event.accept() else: event.ignore() @@ -18,10 +18,12 @@ class TrimageTableView(QTableView): event.accept() def dropEvent(self, event): - files = str(event.mimeData().data("text/uri-list")).strip().split() - for i, file in enumerate(files): - files[i] = QUrl(QString(file)).toLocalFile() - self.emit(SIGNAL("fileDropEvent"), (files)) + event.accept() + filelist = [] + for url in event.mimeData().urls(): + filelist.append(unicode(url.toLocalFile())) + + self.emit(SIGNAL("fileDropEvent"), (filelist)) class Ui_trimage(object): diff --git a/website/index.html b/website/index.html index b902bdb..a80ac97 100644 --- a/website/index.html +++ b/website/index.html @@ -2,7 +2,7 @@ - Trimage image compressor + Trimage (lossless) image compressor - -
    -

    Trimage image compressor – 1.0.5

    - A cross-platform tool for losslessly optimizing PNG and JPG files. -

    Trimage is a cross-platform GUI and command-line interface to optimize image - files for websites, using optipng, pngcrush, - advpng and - jpegoptim, depending on the filetype - (currently, PNG and JPG files are supported). It was inspired by - imageoptim. All image files are losslessy compressed - on the highest available compression levels, and EXIF and other metadata is removed. Trimage gives you various input functions to fit your - own workflow: A regular file dialog, dragging and dropping and various command line options.

    + +
    +

    + Trimage image compressor – + 1.0.5 +

    + A cross-platform tool for losslessly optimizing PNG and JPG files for + web. +

    + Trimage is a cross-platform GUI and command-line interface to optimize + image files for websites, using + optipng, + pngcrush, + advpng + and jpegoptim, + depending on the filetype (currently, PNG and JPG files are supported). + It was inspired by + imageoptim. All image files + are losslessy compressed on the highest available compression levels, + and EXIF and other metadata is removed. Trimage gives you various input + functions to fit your own workflow: A regular file dialog, dragging and + dropping and various command line options. +

    -

    Trimage in action

    - a screenshot of Trimage +

    Trimage in action

    + a screenshot of Trimage -
    -

    Download

    +
    +

    Download

    -

    Debian (sid)

    -

    Trimage is available in the official Debian Sid repositories:

    -
      -
    1. sudo apt-get install trimage
    2. -
    +

    Debian (sid)

    +

    Trimage is available in the official Debian Sid repositories:

    +
      +
    1. sudo apt-get install trimage
    2. +
    -

    Ubuntu

    -

    If you're on Natty (11.04), Trimage is available in the official repositories:

    - Download for Ubuntu button -

    Alternatively:

    -
      -
    1. sudo apt-get install trimage
    2. -
    -

    If you're on Maveric (10.10), Karmic (9.10) or Lucid (10.04), type the following commands into your console:

    -
      -
    1. sudo add-apt-repository ppa:kilian/trimage
    2. -
    3. sudo apt-get update
    4. -
    5. sudo apt-get install trimage
    6. -
    -

    If you are still on Jaunty, read this guide on installing PPA's.

    +

    Ubuntu

    +

    Trimage is available in the official repositories:

    + Download for Ubuntu +

    Alternatively:

    +
      +
    1. sudo apt-get install trimage
    2. +
    -

    Arch Linux

    - Trimage is available from AUR, to install, type: -
      -
    1. yaourt -S trimage-git
    2. -
    -

    Mandriva Linux 2010.1

    - Trimage is available Via two RPMs provided by Mandriva international backports -
      -
    1. Trimage 1.0.5 32bit
    2. -
    3. Trimage 1.0.5 63bit
    4. -
    -

    OpenSuse

    -

    Trimage is available for a variety of versions: 11.3, 11.4 and Factory and SLE. You can find them on software.opensuse.org.

    +

    Arch Linux

    + Trimage is available from AUR, to install, type: +
      +
    1. yaourt -S trimage
    2. +
    +

    Other *nix

    +
      +
    1. Download the source via git or bzr (see repositories)
    2. +
    3. + Make sure you have all the requirements installed (see requirements) +
    4. +
    5. Enter python setup.py install into your console
    6. +
    7. Launch by executing trimage
    8. +
    +

    + Help us make .snaps, .appimages etc: + contact us or + open a pull request +

    + +
    +
    +

    Repositories

    +

    + Git: Trimage is primarily developed on + GitHub. +

    +

    + Bzr: Trimage is also available on + Launchpad. +

    +

    Trimage is MIT licenced. We encourage contributions via GitHub.

    +
    +
    +

    Thanks

    +

    The following people helped develop Trimage:

    +
      +
    • Hugo Posnic
    • +
    • Neil Wallace
    • +
    • Jeroen Goudsmit
    • +
    • Tarnay Kálmán
    • +
    • Thomas Lété
    • +
    • Kyrill Detinov
    • +
    +
    +
    +

    Requirements

    +
      +
    • python 3
    • +
    • python-qt5 5
    • +
    • optipng 0.6.2.1
    • +
    • pngcrush 1.6.7
    • +
    • advancecomp 1.15
    • +
    • jpegoptim 1.2.2
    • +
    +
    -

    Other *nix

    -
      -
    1. Download the source via git or bzr (see repositories)
    2. -
    3. Make sure you have all the requirements installed (see requirements)
    4. -
    5. Enter python setup.py install into your console
    6. -
    7. Launch by executing trimage
    8. -
    -

    Help us make .deb's, rpms's etc: contact us

    -

    Mac

    -

    Trimage should be able to run on Mac. Help us with this

    -

    Windows

    -

    Trimage should be able to run on Windows. Help us with this

    +
    +

    Command line options

    +
    +
    --version
    +
    show program's version number and exit
    +
    -h, --help
    +
    show this help message and exit
    +
    -v, --verbose
    +
    Verbose mode (default)
    +
    -q, --quiet
    +
    Quiet mode
    +
    -f FILENAME, --file=FILENAME
    +
    compresses image and exit
    +
    -d DIRECTORY, --directory=DIRECTORY
    +
    compresses images in directory and exit
    +
    +
    +
    +

    Help

    +

    + Please use GitHub for + reporting bugs and email + help@trimage.org for general + questions (though we are not a helpdesk!) +

    +
    +
    -
    -

    Repositories

    -

    Git: Trimage is primarily developed on GitHub.

    -

    Bzr: Trimage is also available on Launchpad.

    -

    Trimage is MIT licenced. We encourage contributions via GitHub.

    -
    -
    -

    Thanks

    -

    The following people helped develop Trimage:

    -
      -
    • Neil Wallace
    • -
    • Jeroen Goudsmit
    • -
    • Tarnay Kálmán
    • -
    • Thomas Lété
    • -
    • Kyrill Detinov
    • -
    -
    -
    -

    Donate

    -

    If you enjoy using Trimage, please buy us a coffee or a beer :)

    - Click here to lend your support to: Trimage and make a donation at www.pledgie.com ! - - -
    -
    -

    Requirements

    -
      -
    • python 2.6
    • -
    • python-qt4 4.4
    • -
    • optipng 0.6.2.1
    • -
    • pngcrush 1.6.7
    • -
    • advancecomp 1.15
    • -
    • jpegoptim 1.2.2
    • -
    -
    - -
    -

    Command line options

    -
    -
    --version
    -
    show program's version number and exit
    -
    -h, --help
    -
    show this help message and exit
    -
    -v, --verbose
    -
    Verbose mode (default)
    -
    -q, --quiet
    -
    Quiet mode
    -
    -f FILENAME, --file=FILENAME
    -
    compresses image and exit
    -
    -d DIRECTORY, --directory=DIRECTORY
    -
    compresses images in directory and exit
    -
    -
    -
    -

    Help

    -

    Please use GitHub for reporting bugs and email help@trimage.org for general questions (though we are not a helpdesk!)

    -
    - -

    Planned features

    -

    Version 1.1.0 final:

    -
      -
    • Expand command line options
    • -
    • General refactoring
    • -
    -

    Version 1.1.1 final:

    -
      -
    • Use multiprocessing instead of threads
    • -
    - -

    Beyond that

    -
      -
    • Deletion of rows in the table view
    • -
    • Integration with online services such as punypng
    • -
    • Suggest something
    • -
    -
    - diff --git a/website/mac.png b/website/mac.png deleted file mode 100644 index d25935a3176f3be9aa708afc36a502922cd5ca5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 891 zcmeAS@N?(olHy`uVBq!ia0y~yV2}Y}4rT@h2G`5_%NQ6K%L9BuT$k>7Tr=lk(UiNB zx4pf1^Yf-XclPYrd-&Sdkg79*sZ*nyF8}`fPe;%AXIeP4xM>3 zZ{LT52M^_R98K-IdH(vR-Isr+XIBIlZ;Nd{S5nb@`t+HHPrvLv@pAE+VWrBiu3WkMGqvMt?Sf~gu6%53Yfq?HS2go~enH9pQ?K0e53b*NGdebD|AB*^ z@e_`nIJ^De!+Wp)hu5A9sXB4@@i+hSlW*StIC}p5!)HH&%Z{A8aOK#!SIVkd=dOR< zbL@HHgd1zOUpsO6%fZuc>;kI~U;lRM%D1ii@0Crvm)Cz?LQ3w&y{|uh{gsiH+Ohw7 z--cIH=WV%s^UaeN-`Ah`xbNiig4xe{Cd@m0_Rab|=j4x>STHa!FqQ=Q1v5B2yOGAg zz_`iN#WAGfR_z5||62hPZHZBuWhb<{M9ejvPfzLZn`)(~r^cPLGNDUM_FBlI)g2FB zIEYPl-7WwAahbbWQ7 z=&~VdX@I3yp!C=8b^G^kY)`e2k=q^Nlb+LiDtx8J@?RIP)vgTba>pSOux5H=Ex~cEjS0`fTE0%uj{evLB`{@#H*OM=wkP@A S)fgBU7(8A5T-G@yGywpL*zRut diff --git a/website/mandriva.png b/website/mandriva.png deleted file mode 100644 index b75f0e7bda8df26e6a9559324c2cd36156e74a1d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1957 zcmeAS@N?(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0qpS{(d@Y&b5Aj`AI43?FqH7R&C4L7_{HQXxi?hpZCZ=<(fLZ`QQQJ zm)|a!cPx?J|Ksk(xm}A=J%6aBqlPQ1(TnB-k-`t*#;Lj(K2Uw5DL3l$S(m=Q0Mv85rS zWAgR;vv+PY_Vl^^@$1KvK_(Yh%-X!OXth&BPJzPI^4D=IlESa^EfGH0wt@3}dQ^Dy z5$20r4=1RFPG#wze`+0%go?%F)oju_rW59G4}Z$t9eDryLO~}7hBfhmuEmoT^`7QR z@<|@ySz%D3^t^l9t;=E)V}vGkMW0Kk*SR=r%d5qYTOGV(RPW~YUNCtSxNL`_@XvE* zpOcD}ukn9TYfFDNXSL>1w|w^ryX{mISyU#UR1o0ESQ_*(EHu}5TBpk`%^r*K2d;cH5d?}Ub4P40Q^czMT*YkNf}c6<%n81Zk( s^PgvVCw`devE}3WIfnfIzyGj~%Xw_|EbvP`0|Nttr>mdKI;Vst04;XqegFUf diff --git a/website/opensuse.png b/website/opensuse.png deleted file mode 100644 index 46dea9b6d406375327c4bfc86c567ef75ecb223b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1297 zcmeAS@N?(olHy`uVBq!ia0y~yV2}Y}4mJh`h9chkQy3UnZg{#lhE&{o8(JN5xm4u; z(v|g7+`Wyh=JqXR`_Xacl1O976&^3!pA3)A792=u&Q;+%9z55*v4X$F@_>&g^F$X3 zeo1Hk{@z|sp1E@zo*CWXF?J5R`L<5I;Dd~OiOur;Kjsvle_#Fn{kyt%ufNNhHgXDN z_?v;+Zt@8YV^2_sp9Q2}KC4R_ELo zpWwt;w^sJe+SptrtDk4*%@Uok{#jhd>f$+t-w(!mB~P*SQ+lhXAi8(n>J*c9FEKk6 z6%93^5*wp8|6la9L~`BAzgU{hH-GOehE1=J^V_;Dd$)E`9`BtGy=!8x%E#FK|H*P* zaoO~}xmHU%o42H$cbsy&soSriqH@ZH=jY32cg%YFtSfGckH&Z9^x%E7l8-RG`Vc8s z@-Nn6ZRh_vuMDmUZ_1pwbz7RzrLGByis?ze*SE}B#m{hD*(>ADwZ4|UEAHErS=M-b z-JQbb8gP5=^wTnOc6muNKjz0?c)D-ajW^R8<{#D)x6e$RmnNh-x=674P7yq%fxF@D4 zsP!jB#re*ScYKdsy_Y=+d^VHoz8b>}SH&)Cmf41q#+vb2>{pBp3jXt%dRffT6vovA(to-W`@zlwIDfZ-5=a@TsTg=zlE%z-v{P4bCR>@5F-o}Wdi;AL|Dif!6Kgh_= z__c%MV^);IrspAgjlbpzS9h$vtKiGAJ}&K+`fZC@KTm#J;c0Pw`LVz|I+Ft)AGORi zn!Ba-jPUffEqorURpv&<^KP%}I^7tdXsjJ7H)CFiSI(cBiCd0e@Sb{F`o?cRk&0zg zMb;nvuIrPy>W=Zl2Jzn>ZL-?dzOE&4b$wRPstt2>o}bwIOj7l4PWZ{GhvQc4xB7I> z&gRGEqb2$q3hq97eIT_h_rAPo`L#a%_nOvQCmSr7v?=!0_O7!H=CRu?}51>3T&lwLvbQX~z<6n~(+1zCB*laW2+-pK@NRB=_y)Ngv`F z(hs*-N`K#<>iU^sz6xW`gTgkUZm#mE9l3j#zuIG_sbd}Mw>H`{{@|kTm8x6^q-!N4 zPdb0DjVX`(x%;r6BTt8Fs!bQebeAh@^iSH>>zaOBV^*jcpCw zDtNq{`$nV0{2jrc_dlrTmJl#|%WKYb!1`V%`|ggnuPf~4>{QvD#1(v?bH8*)@8rpW zM=d7_?wWVp?Dgzq<%MsrpS!+7@Wj`p>|N_+wk-R{zoL5eN=~1IJwL>iPINx!JSJzw Qz`(%Z>FVdQ&MBb@0PGNIW&i*H diff --git a/website/windows.png b/website/windows.png deleted file mode 100644 index 1b24e92fcd320e42d19aff07604d05c5445376d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1705 zcmeAS@N?(olHy`uVBq!ia0y~yV2}Y}4kiW$hQIk9hZz_c7>k44ofy`glX=O&z`$AH z5n0T@z%2~Ij105pNH8!ku$OrHy0YKolws4?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MQHVe1rl#PihWAFH3M XxzmM`iE9}c7#KWV{an^LB{Ts5u;nX7 From 54d4b741726485321422e9f6e6da91c376874420 Mon Sep 17 00:00:00 2001 From: kilian Date: Tue, 12 Mar 2019 12:03:15 +0100 Subject: [PATCH 150/160] update debian folder --- debian/changelog | 9 ++++++++- debian/compat | 2 +- debian/control | 6 ++---- debian/copyright | 44 -------------------------------------------- debian/pycompat | 2 +- debian/rules | 0 6 files changed, 12 insertions(+), 51 deletions(-) mode change 100644 => 100755 debian/rules diff --git a/debian/changelog b/debian/changelog index 30f9a17..fa8c6f2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +trimage (1.0.6-0ubuntu1) bionic; urgency=low + + * Migrate to python 3 and python-qt 5 + * fix bug with hanging thread + * remove hurry.filesize package + + -- Kilian Valkhof Tue, 12 Mar 2019 11:54:00 +0200 + trimage (1.0.5-0ubuntu1) jaunty; urgency=low * prevent images from becoming larger after recompression @@ -70,4 +78,3 @@ trimage (1.0.0b-0ubuntu1) jaunty; urgency=low * Trimage image compressor -- Kilian Valkhof Tue, 23 Mar 2010 20:18:17 +0100 - diff --git a/debian/compat b/debian/compat index 7f8f011..f599e28 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +10 diff --git a/debian/control b/debian/control index d2501f0..9646ecf 100644 --- a/debian/control +++ b/debian/control @@ -2,15 +2,13 @@ Source: trimage Section: graphics Priority: optional Maintainer: Kilian Valkhof -Build-Depends: debhelper (>=7), python-support (>=0.8.7), python -XS-Python-Version: >=3.4 -Standards-Version: 3.9.1 +Build-Depends: debhelper (>=7), python3 +Standards-Version: 3.9.2 Homepage: http://trimage.org Package: trimage Architecture: all Depends: ${misc:Depends}, ${python:Depends}, python-pyqt5 (>=5.7), optipng (>=0.6.2.1), advancecomp (>=1.15), jpegoptim (>=1.2.2), pngcrush (>=1.6.7) -XB-Python-Version: ${python:Versions} Description: GUI and command-line interface to optimize image files Trimage is a cross-platform GUI and command-line interface to optimize image files via optipng, advpng, pngcrush and jpegoptim, depending on the filetype diff --git a/debian/copyright b/debian/copyright index 2a6f587..a9897e2 100644 --- a/debian/copyright +++ b/debian/copyright @@ -39,49 +39,6 @@ The Debian packaging is: and is licensed under the MIT license, see above. -hurry.filesize is: - - Copyright (C) Martijn Faassen, Startifact - -License: - - Zope Public License (ZPL) Version 2.1 - A copyright notice accompanies this license document that identifies the - copyright holders. This license has been certified as open source. It has - also been designated as GPL compatible by the Free Software Foundation (FSF). - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions in source code must retain the accompanying copyright - notice, this list of conditions, and the following disclaimer. - 2. Redistributions in binary form must reproduce the accompanying - copyright notice, this list of conditions, and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - 3. Names of the copyright holders must not be used to endorse or promote - products derived from this software without prior written permission from - the copyright holders. - 4. The right to distribute this software or to use it for any purpose does - not give you the right to use Servicemarks (sm) or Trademarks (tm) of the - copyright holders. Use of them is covered by separate agreement with the - copyright holders. - 5. If any files are modified, you must cause the modified files to carry - prominent notices stating that you changed the files and the date of any - change. - - Disclaimer - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY - EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ThreadPool is: Copyright (c) Morten Holdflod Moeller @@ -253,4 +210,3 @@ License: apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. - diff --git a/debian/pycompat b/debian/pycompat index 0cfbf08..00750ed 100644 --- a/debian/pycompat +++ b/debian/pycompat @@ -1 +1 @@ -2 +3 diff --git a/debian/rules b/debian/rules old mode 100644 new mode 100755 From 8376c4a238ff725c29b435bdd5627e8e22a8d07a Mon Sep 17 00:00:00 2001 From: kilian Date: Tue, 12 Mar 2019 12:15:49 +0100 Subject: [PATCH 151/160] update version number to 1.0.6 in various places --- doc/trimage.1 | 2 +- setup.py | 2 +- trimage/trimage.py | 2 +- website/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/trimage.1 b/doc/trimage.1 index 501742d..0907c27 100644 --- a/doc/trimage.1 +++ b/doc/trimage.1 @@ -3,7 +3,7 @@ .\" This manual page is distributed under the terms .\" of the GNU Free Documentation License version 1.3. .\" -.TH TRIMAGE "1" "2011-07-11" "trimage 1.0.5" "User Commands" +.TH TRIMAGE "1" "2019-03-12" "trimage 1.0.6" "User Commands" .SH NAME trimage \- losslessly optimizing png and jpeg liles diff --git a/setup.py b/setup.py index dc8cfe3..2ba0a6f 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from distutils.core import setup setup(name = "trimage", - version = "1.0.5", + version = "1.0.6", description = "Trimage image compressor - A cross-platform tool for optimizing PNG and JPG files", author = "Kilian Valkhof, Paul Chaplin", author_email = "help@trimage.org", diff --git a/trimage/trimage.py b/trimage/trimage.py index a0f7092..2fefedf 100644 --- a/trimage/trimage.py +++ b/trimage/trimage.py @@ -18,7 +18,7 @@ from ui import Ui_trimage from tools import * -VERSION = "1.0.5" +VERSION = "1.0.6" class StartQt(QMainWindow): diff --git a/website/index.html b/website/index.html index fd290c5..0598c85 100644 --- a/website/index.html +++ b/website/index.html @@ -76,7 +76,7 @@

    Trimage image compressor – - 1.0.5 + 1.0.6

    A cross-platform tool for losslessly optimizing PNG and JPG files for From 9bdd44a4e4c3877cf2d62fb9888db02a95ca0ee3 Mon Sep 17 00:00:00 2001 From: kilian Date: Tue, 12 Mar 2019 12:36:32 +0100 Subject: [PATCH 152/160] further refinement/updates of debian folder --- debian/compat | 2 +- debian/control | 2 +- debian/pycompat | 1 - debian/rules | 1 - desktop/trimage.desktop | 2 +- 5 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 debian/pycompat diff --git a/debian/compat b/debian/compat index f599e28..b4de394 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -10 +11 diff --git a/debian/control b/debian/control index 9646ecf..7396a46 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: graphics Priority: optional Maintainer: Kilian Valkhof Build-Depends: debhelper (>=7), python3 -Standards-Version: 3.9.2 +Standards-Version: 4.3.0 Homepage: http://trimage.org Package: trimage diff --git a/debian/pycompat b/debian/pycompat deleted file mode 100644 index 00750ed..0000000 --- a/debian/pycompat +++ /dev/null @@ -1 +0,0 @@ -3 diff --git a/debian/rules b/debian/rules index 4f2c774..cbe925d 100755 --- a/debian/rules +++ b/debian/rules @@ -1,4 +1,3 @@ #!/usr/bin/make -f %: dh $@ - diff --git a/desktop/trimage.desktop b/desktop/trimage.desktop index 2cf870a..80342ec 100644 --- a/desktop/trimage.desktop +++ b/desktop/trimage.desktop @@ -7,4 +7,4 @@ Type=Application Exec=trimage Categories=Application;Qt;Graphics; StartupNotify=true - +Keywords=compression,compressor,images,jpg,jpeg,png,web From 9d6edd3847743d26309f4fcf0bbda8da42869f97 Mon Sep 17 00:00:00 2001 From: Hugo Posnic Date: Thu, 3 Oct 2019 17:05:33 +0200 Subject: [PATCH 153/160] Remove win32 bytes following d6118b5 --- trimage/tools.py | 5 ++--- trimage/trimage.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/trimage/tools.py b/trimage/tools.py index f787c8c..98e0218 100644 --- a/trimage/tools.py +++ b/trimage/tools.py @@ -7,7 +7,6 @@ from subprocess import call, PIPE def check_dependencies(): """Check if the required command line apps exist.""" - exe = ".exe" if (sys.platform == "win32") else "" status = True dependencies = { "jpegoptim": "--version", @@ -17,7 +16,7 @@ def check_dependencies(): } for elt in dependencies: - retcode = safe_call(elt + exe + " " + dependencies[elt]) + retcode = safe_call(elt + " " + dependencies[elt]) if retcode != 0: status = False print("[error] please install {}".format(elt), file=sys.stderr) @@ -43,4 +42,4 @@ def human_readable_size(num, suffix="B"): if abs(num) < 1024.0: return "%3.1f%s%s" % (num, unit, suffix) num /= 1024.0 - return "%.1f%s%s" % (num, "Y", suffix) \ No newline at end of file + return "%.1f%s%s" % (num, "Y", suffix) diff --git a/trimage/trimage.py b/trimage/trimage.py index 2fefedf..3f7dbc3 100644 --- a/trimage/trimage.py +++ b/trimage/trimage.py @@ -371,10 +371,9 @@ class Image: file)" self.reset() self.compressing = True - exe = ".exe" if (sys.platform == "win32") else "" runString = { - "jpeg": "jpegoptim" + exe + " -f --strip-all '%(file)s'", - "png": "optipng" + exe + " -force -o7 '%(file)s'&&advpng" + exe + " -z4 '%(file)s' && pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time '%(file)s' '%(file)s.bak' && mv '%(file)s.bak' '%(file)s'" + "jpeg": "jpegoptim -f --strip-all '%(file)s'", + "png": "optipng -force -o7 '%(file)s'&&advpng -z4 '%(file)s' && pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time '%(file)s' '%(file)s.bak' && mv '%(file)s.bak' '%(file)s'" } # create a backup file backupfullpath = '/tmp/' + self.filename_w_ext From 1342503b5449458d8cec23c891d526497089e235 Mon Sep 17 00:00:00 2001 From: Boyuan Yang Date: Tue, 3 Dec 2019 17:00:44 -0500 Subject: [PATCH 154/160] Fix trimage.desktop grammar According to https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s04.html , Keywords should be split by semicolons, not commas. --- desktop/trimage.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/trimage.desktop b/desktop/trimage.desktop index 80342ec..8b48fa6 100644 --- a/desktop/trimage.desktop +++ b/desktop/trimage.desktop @@ -7,4 +7,4 @@ Type=Application Exec=trimage Categories=Application;Qt;Graphics; StartupNotify=true -Keywords=compression,compressor,images,jpg,jpeg,png,web +Keywords=compression;compressor;images;jpg;jpeg;png;web; From 269e052ba407c16ab32953276c776d543930b917 Mon Sep 17 00:00:00 2001 From: Kilian Valkhof Date: Fri, 20 Dec 2019 16:51:10 +0100 Subject: [PATCH 155/160] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 288cbf5..75b2061 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ +### Made by [@kilianvalkhof](https://twitter.com/kilianvalkhof) + +#### Other projects: + +- 💻 [Polypane](https://polypane.app) - Develop responsive websites and apps twice as fast on multiple screens at once +- 🖌️ [Superposition](https://superposition.design) - Kickstart your design system by extracting design tokens from your website +- 🗒️ [FromScratch](https://fromscratch.rocks) - A smart but simple autosaving scratchpad + +--- + # Trimage image compressor A cross-platform tool for optimizing PNG and JPG files. From c3244e19a665bc6f3ec03e10e87467a19660469a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1lm=C3=A1n=20Tarnay?= Date: Thu, 23 Apr 2020 17:44:12 +0200 Subject: [PATCH 156/160] add macos instructions to website --- website/index.html | 10 ++++++++-- website/macos.png | Bin 0 -> 835 bytes 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 website/macos.png diff --git a/website/index.html b/website/index.html index 0598c85..0e7995a 100644 --- a/website/index.html +++ b/website/index.html @@ -125,6 +125,14 @@
    1. yaourt -S trimage
    + +

    macOS

    + Trimage is available from Homebrew, to install, type: +
      +
    1. brew install trimage
    2. +
    +

    Launch by executing trimage in Terminal.app

    +

    Other *nix

    1. Download the source via git or bzr (see repositories)
    2. @@ -142,8 +150,6 @@ >

      diff --git a/website/macos.png b/website/macos.png new file mode 100644 index 0000000000000000000000000000000000000000..120e1fd371a7b5212bde85f68a6295baa0aec8a3 GIT binary patch literal 835 zcmeAS@N?(olHy`uVBq!ia0y~yU{GLSU{L2^VPIf5Qr2{wfq{V~-O<;Pfnj4m_n$;o z1_lPEByV>Y28LC=%0>(f4D2PIzOL*~Sj73|yC}CM>cNTXMVRNFe5xn{8s43wbFuD@}jzUl{Cb3 zAGwIQYSsR@_hV6%Uq8vt zkp1vgj;O7tlBbA9%_)rD`q8aQ@AUWB-vz#0NmajVemZ7xb>`XKFS2<*NqP#}9qxbDxiRhan`@yv zj&0oLen|3Z@YWWcPJJDL?B#2(#_Txu(yp^D{_D)sDJ(ihhC=t=-DaAz;MAXt|MgiK zds`BER$gRrx7AX=oT04zP#ACMdN1fmk zn;sR9Gt;%SGYZYEI{5d*UJ}^y(|T6I9A396A|;mU_v}9P3PwgUrkl75FR6K#{@#oA z&*MMZ86H1x_^YvO`F)jpeUkYdZb^$v`yYo)nOt2eq7}5b>SspN{kaMvmy`N~Cw^cr ztBAn*CgRe6=_msOgKCLuL`h0wNvc(HQEFmI zDua=Mk%6v(iLQ}xh@q*Kv4NGbp|*j6m4Sh#Rk;|7hTQy=%(P0}8Y0rquVP?eVDNPH Kb6Mw<&;$Ui$YqZJ literal 0 HcmV?d00001 From 493a0e18d2ac69c3bc3df6cc9998dbccd03ff409 Mon Sep 17 00:00:00 2001 From: Carson Reinke Date: Tue, 23 Jun 2020 15:30:34 -0400 Subject: [PATCH 157/160] Missing format specifier for arguments of image status Fixes https://github.com/Kilian/Trimage/issues/73 --- trimage/trimage.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trimage/trimage.py b/trimage/trimage.py index 3f7dbc3..0fd2644 100644 --- a/trimage/trimage.py +++ b/trimage/trimage.py @@ -304,6 +304,7 @@ class ImageRow: def __init__(self, image, waitingIcon=None): """Build the information visible in the table image row.""" self.image = image + d = { 'filename_w_ext': lambda i: self.statusStr() % i.filename_w_ext, 'oldfilesizestr': lambda i: human_readable_size(i.oldfilesize) @@ -331,9 +332,9 @@ class ImageRow: message = "Compressing %s..." return message if not self.image.compressed and self.image.recompression: - return "Queued for recompression..." + return "Queued for recompression %s..." if not self.image.compressed: - return "Queued..." + return "Queued %s..." return "%s" def __getitem__(self, key): From 8af532f25ece2c01d81e6859225b7209f2f64321 Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Wed, 30 Sep 2020 19:22:31 +1000 Subject: [PATCH 158/160] Remove unreachable shutdown code * Implementing `__del__` is discouraged * Imports (i.e. `import logging`) are cleaned up, leading to NoneType related errors * When running via GUI mode, the shutdown code is never reached; we can let Python's internal GC clean everything --- trimage/ThreadPool/ThreadPool.py | 7 ------- trimage/trimage.py | 3 --- 2 files changed, 10 deletions(-) diff --git a/trimage/ThreadPool/ThreadPool.py b/trimage/ThreadPool/ThreadPool.py index 9f9e051..17e55e4 100644 --- a/trimage/ThreadPool/ThreadPool.py +++ b/trimage/ThreadPool/ThreadPool.py @@ -30,9 +30,6 @@ class ThreadPoolMixIn: def __init__(self, threadpool=None): if (threadpool == None): threadpool = ThreadPool() - self.__private_threadpool = True - else: - self.__private_threadpool = False self.__threadpool = threadpool @@ -52,10 +49,6 @@ class ThreadPoolMixIn: def process_request(self, request, client_address): self.__threadpool.add_job(self.process_request_thread, [request, client_address]) - def shutdown(self): - if (self.__private_threadpool): self.__threadpool.shutdown() - - class AddJobException(Exception): ''' Exceptoion raised when a Job could not be added diff --git a/trimage/trimage.py b/trimage/trimage.py index 3f7dbc3..1ef81be 100644 --- a/trimage/trimage.py +++ b/trimage/trimage.py @@ -409,9 +409,6 @@ class Worker(QThread): self.toDisplay = Queue() self.threadpool = ThreadPool(max_workers=cpu_count()) - def __del__(self): - self.threadpool.shutdown() - def compress_file(self, images, showapp, verbose, imagelist): """Start the worker thread.""" for image in images: From 636b5a975072fdb8159753eb28062fbed901a23d Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Thu, 4 Mar 2021 19:26:55 +0100 Subject: [PATCH 159/160] Fix #77 This fix https://github.com/Kilian/Trimage/issues/77 As debian user this fix the issue for me --- trimage/trimage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trimage/trimage.py b/trimage/trimage.py index 7efb522..725d208 100644 --- a/trimage/trimage.py +++ b/trimage/trimage.py @@ -306,7 +306,7 @@ class ImageRow: self.image = image d = { - 'filename_w_ext': lambda i: self.statusStr() % i.filename_w_ext, + 'filename_w_ext': lambda i: self.statusStr().format(i.filename_w_ext), 'oldfilesizestr': lambda i: human_readable_size(i.oldfilesize) if i.compressed else "", 'newfilesizestr': lambda i: human_readable_size(i.newfilesize) @@ -335,7 +335,7 @@ class ImageRow: return "Queued for recompression %s..." if not self.image.compressed: return "Queued %s..." - return "%s" + return "{0}" def __getitem__(self, key): return self.d[key](self.image) From 031adf60540614355620ce8eaa01a4c63a085d62 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 10 Mar 2021 12:58:46 +0100 Subject: [PATCH 160/160] Fix incomplete code of #77 I forgot to change the various `%s` in the pull request with the rest of the function or it will be print "Compressing %s". --- trimage/trimage.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trimage/trimage.py b/trimage/trimage.py index 725d208..b618b4b 100644 --- a/trimage/trimage.py +++ b/trimage/trimage.py @@ -327,14 +327,14 @@ class ImageRow: def statusStr(self): """Set the status message.""" if self.image.failed: - return "ERROR: %s" + return "ERROR: {0}" if self.image.compressing: - message = "Compressing %s..." + message = "Compressing {0}..." return message if not self.image.compressed and self.image.recompression: - return "Queued for recompression %s..." + return "Queued for recompression {0}..." if not self.image.compressed: - return "Queued %s..." + return "Queued {0}..." return "{0}" def __getitem__(self, key):