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:])