diff -Nru autorenamer-0.4/autorenamer.py autorenamer-0.5/autorenamer.py --- autorenamer-0.4/autorenamer.py 2016-03-02 16:11:23.000000000 +0000 +++ autorenamer-0.5/autorenamer.py 2019-09-05 20:39:51.000000000 +0000 @@ -1,6 +1,6 @@ -#!/usr/bin/python +#!/usr/bin/python3 # AutoRenamer - renames files so they sort in a given order -# Copyright 2011-2016 Marcin Owsiany +# Copyright 2011-2019 Marcin Owsiany # Derived from an example program from the ZetCode.com PyGTK tutorial # Copyright 2007-2009 Jan Bodnar @@ -42,6 +42,7 @@ COL_PIXBUF = 1 COL_IS_DIRECTORY = 2 APP_NAME = "AutoRenamer" +DEFAULT_WINDOW_WIDTH = 650 class AutoRenamer(Gtk.Window): @@ -55,7 +56,7 @@ super(AutoRenamer, self).__init__() self.thumbnailer = thumbnails.Thumbnailer() - self.set_size_request(650, 400) + self.set_size_request(DEFAULT_WINDOW_WIDTH, 400) self.set_position(Gtk.WindowPosition.CENTER) self.connect("delete-event", self.close) @@ -186,8 +187,7 @@ self.fill_store() def on_dirs_clicked(self, widget): - all_store_indices = xrange(len(self.store)) - directory_indices = [index for index, item in zip(all_store_indices, self.store) if item[COL_IS_DIRECTORY]] + directory_indices = [index for index, item in enumerate(self.store) if item[COL_IS_DIRECTORY]] for index in directory_indices: path = Gtk.TreePath(index) if self.iconView.path_is_selected(path): @@ -208,7 +208,7 @@ num_items = len(ordered_names_to_rename) width = math.ceil(math.log10(num_items)) fmt = "%%0%dd-%%s" % width - prefixed = [(fmt % (i, f)) for i, f in zip(xrange(num_items), ordered_names_to_rename)] + prefixed = [(fmt % (i, f)) for i, f in enumerate(ordered_names_to_rename)] all_names = [e[COL_PATH] for e in self.store] conflicts = set.intersection(set(all_names), set(prefixed)) if conflicts: @@ -217,7 +217,7 @@ column_values=[(c,) for c in conflicts]) return - renames = zip(ordered_names_to_rename, prefixed) + renames = list(zip(ordered_names_to_rename, prefixed)) if self.pop_dialog("Renames", "The following renames will be performed." + (rename_selected_only and "\nNote: only the selected entries are renamed." or ""), ok_only=False, @@ -238,7 +238,7 @@ else: buttons = (Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT, Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT) dialog = Gtk.Dialog(title, self, Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT, buttons) - dialog.vbox.props.homogeneous = False + dialog.vbox.props.homogeneous = False # Let children differ in size. dialog.vbox.pack_start(label, False, False, 0) if column_names is not None and column_values is not None: types = [str for c in column_names] @@ -247,11 +247,11 @@ store.append(value) list_view = Gtk.TreeView(store) list_view.set_reorderable(False) + for offset, name in enumerate(column_names): + list_view.append_column(Gtk.TreeViewColumn(name, Gtk.CellRendererText(), text=offset)) sw = Gtk.ScrolledWindow() sw.set_shadow_type(Gtk.ShadowType.ETCHED_IN) sw.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) - for name, offset in zip(column_names, range(len(column_names))): - list_view.append_column(Gtk.TreeViewColumn(name, Gtk.CellRendererText(), text=offset)) sw.add(list_view) dialog.vbox.pack_start(sw, True, True, 0) dialog.show_all() @@ -280,7 +280,7 @@ self.fill_store() def on_randomize_clicked(self, widget): - order = range(len(self.initial_order)) + order = list(range(len(self.initial_order))) random.shuffle(order) self.store.reorder(order) self.on_order_changed() diff -Nru autorenamer-0.4/debian/autorenamer.menu autorenamer-0.5/debian/autorenamer.menu --- autorenamer-0.4/debian/autorenamer.menu 2019-10-26 06:32:54.000000000 +0000 +++ autorenamer-0.5/debian/autorenamer.menu 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -?package(autorenamer):needs="X11" section="Applications/File Management"\ - title="AutoRenamer" command="/usr/bin/autorenamer" diff -Nru autorenamer-0.4/debian/changelog autorenamer-0.5/debian/changelog --- autorenamer-0.4/debian/changelog 2019-10-26 06:32:54.000000000 +0000 +++ autorenamer-0.5/debian/changelog 2019-10-02 10:11:35.000000000 +0000 @@ -1,3 +1,32 @@ +autorenamer (0.5-2) unstable; urgency=low + + * Added recommends on gir1.2-gnomedesktop-3.0 for thumbnail support + (Closes: #941371) + * Bumped standards-version to 4.4.1 + - no changes needed + + -- Marcin Owsiany Wed, 02 Oct 2019 12:11:35 +0200 + +autorenamer (0.5-1) unstable; urgency=medium + + [Marcin Owsiany] + + * New upstream version. + - uses Python 3 (Closes: #936171) + * Bumped standards-version to 4.4.0 + - changed priority to optional from extra + - got rid of the menu file + * Declared source format + * Switched to debhelper compat level 10, updated build-deps + * Switched depends and build-depends to Python 3 + * Changed to pybuild buildsystem, moved flags to PYBUILD_INSTALL_ARGS + + [Jelmer Vernooij] + + * Use secure URI in Vcs-Git control header. + + -- Marcin Owsiany Tue, 10 Sep 2019 22:41:37 +0200 + autorenamer (0.4-1) unstable; urgency=medium * New upstream version: diff -Nru autorenamer-0.4/debian/compat autorenamer-0.5/debian/compat --- autorenamer-0.4/debian/compat 2019-10-26 06:32:54.000000000 +0000 +++ autorenamer-0.5/debian/compat 2019-09-10 20:39:24.000000000 +0000 @@ -1 +1 @@ -8 +10 diff -Nru autorenamer-0.4/debian/control autorenamer-0.5/debian/control --- autorenamer-0.4/debian/control 2019-10-26 06:32:54.000000000 +0000 +++ autorenamer-0.5/debian/control 2019-10-02 10:11:35.000000000 +0000 @@ -1,16 +1,17 @@ Source: autorenamer Section: utils -Priority: extra +Priority: optional Maintainer: Marcin Owsiany -Build-Depends: debhelper (>= 8), python, dh-python -Standards-Version: 3.9.6 +Build-Depends: debhelper (>> 10), python3, dh-python +Standards-Version: 4.4.1 Vcs-Browser: https://github.com/porridge/autorenamer -Vcs-Git: git://github.com/porridge/autorenamer.git -b debian +Vcs-Git: https://github.com/porridge/autorenamer.git -b debian Homepage: http://marcin.owsiany.pl/autorenamer-page Package: autorenamer Architecture: all -Depends: python, gir1.2-gtk-3.0, gir1.2-gdkpixbuf-2.0, gir1.2-glib-2.0, ${misc:Depends}, ${python:Depends} +Depends: ${misc:Depends}, ${python3:Depends}, gir1.2-gtk-3.0, gir1.2-gdkpixbuf-2.0, gir1.2-glib-2.0 +Recommends: ${misc:Recommends}, ${python3:Recommends}, gir1.2-gnomedesktop-3.0 Description: program to rename files to make them sort in given order This is a simple graphical program that lets you reorder the files using drag-and-drop and then changes the names of the files such that their diff -Nru autorenamer-0.4/debian/copyright autorenamer-0.5/debian/copyright --- autorenamer-0.4/debian/copyright 2019-10-26 06:32:54.000000000 +0000 +++ autorenamer-0.5/debian/copyright 2019-09-10 20:35:47.000000000 +0000 @@ -5,31 +5,34 @@ Files: * Copyright: 2011-2016, Marcin Owsiany -License: BSD-2-Clause +License: BSD-3-Clause Files: autorenamer.py Copyright: 2011-2016, Marcin Owsiany 2007-2009, Jan Bodnar -License: BSD-2-Clause +License: BSD-3-Clause -License: BSD-2-Clause - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - . - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - . - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - . - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS 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 HOLDER OR CONTRIBUTORS 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. +License: BSD-3-Clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the Authors nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS 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 AUTHORS OR CONTRIBUTORS 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. diff -Nru autorenamer-0.4/debian/rules autorenamer-0.5/debian/rules --- autorenamer-0.4/debian/rules 2019-10-26 06:32:54.000000000 +0000 +++ autorenamer-0.5/debian/rules 2019-09-10 20:39:24.000000000 +0000 @@ -1,9 +1,5 @@ #!/usr/bin/make -f export DH_VERBOSE=1 +export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/autorenamer --install-scripts=/usr/share/autorenamer %: - dh $@ --with python2 - -override_dh_auto_install: - python setup.py install --root=debian/autorenamer --install-layout=deb --install-lib=/usr/share/autorenamer --install-scripts=/usr/share/autorenamer - -override_dh_auto_build: + dh $@ --with=python3 --buildsystem=pybuild diff -Nru autorenamer-0.4/debian/source/format autorenamer-0.5/debian/source/format --- autorenamer-0.4/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ autorenamer-0.5/debian/source/format 2019-09-10 20:39:24.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru autorenamer-0.4/.gitignore autorenamer-0.5/.gitignore --- autorenamer-0.4/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ autorenamer-0.5/.gitignore 2019-09-05 20:39:51.000000000 +0000 @@ -0,0 +1,2 @@ +*.pyc +__pycache__ diff -Nru autorenamer-0.4/README autorenamer-0.5/README --- autorenamer-0.4/README 2016-03-02 16:11:23.000000000 +0000 +++ autorenamer-0.5/README 2019-09-05 20:39:51.000000000 +0000 @@ -1,7 +1,7 @@ AutoRenamer - a simple program to rename files so that they sort the way you want. -Requires Python, GTK and GNOME libraries. +Requires Python (3, but should also run on Python 2), GTK and GNOME libraries. The program is based on an example "iconview.py" program by Jan Bodnar, from the PyGTK tutorial at http://zetcode.com/tutorials/pygtktutorial/ diff -Nru autorenamer-0.4/setup.py autorenamer-0.5/setup.py --- autorenamer-0.4/setup.py 2016-03-02 16:11:23.000000000 +0000 +++ autorenamer-0.5/setup.py 2019-09-05 20:39:51.000000000 +0000 @@ -1,9 +1,9 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from distutils.core import setup setup(name='Autorenamer', - version='0.4', + version='0.5', description='Rrename files to make them sort in given order.', author='Marcin Owsiany', author_email='marcin@owsiany.pl',