Compare commits

...

5 Commits

Author SHA1 Message Date
Hugo Posnic
4a62b4e31c Bump version to 1.8.0 2023-11-03 09:50:24 +01:00
Hugo Posnic
0f8a3b9dcd Update pot 2023-11-03 09:47:02 +01:00
Hugo Posnic
a43aad1d24 Improve clarity of preference options 2023-11-03 09:39:24 +01:00
Hugo Posnic
9a12aeb01b Update oxipng 2023-11-03 09:11:37 +01:00
Hugo Posnic
0d1c98837d Fix #189 2023-11-03 08:57:48 +01:00
11 changed files with 557 additions and 360 deletions

View File

@ -1,6 +1,22 @@
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## 1.8.0 - 2023-11-03
### Added
- Add "Bulk Compress Directory (recursive)" feature. Thank's to @rk234.
- Add simplified Chinese translation. Thank's to @yuhldr.
- Add Ukrainian translation. Thank's to @Vovkiv.
- Add categories and keywords support in appdata. Thank's to @sabriunal.
### Changed
- Improve clarity of preference options.
- Update OxiPNG to v9.
- Update translations.
### Fixed
- Handle cases where previews can't be generated.
- Fix some "Format of this file is not supported".
## [1.7.0] - 2023-04-05 ## [1.7.0] - 2023-04-05
### Added ### Added

View File

@ -43,8 +43,8 @@
"sources": [ "sources": [
{ {
"type": "archive", "type": "archive",
"url": "https://github.com/shssoichiro/oxipng/archive/refs/tags/v8.0.0.tar.gz", "url": "https://github.com/shssoichiro/oxipng/archive/refs/tags/v9.0.0.tar.gz",
"sha256": "ef96d6340e70900de0a38ace8f5f20878f6c256b18b0c59cd87f2b515437b87b" "sha256": "534fa8f349f52b01c2ee4332cef25ce1311edca04209ac6d972e38b171550a1b"
}, },
"oxipng-sources.json" "oxipng-sources.json"
] ]

View File

@ -44,6 +44,22 @@
<translation type="gettext">curtail</translation> <translation type="gettext">curtail</translation>
<launchable type="desktop-id">com.github.huluti.Curtail.desktop</launchable> <launchable type="desktop-id">com.github.huluti.Curtail.desktop</launchable>
<releases> <releases>
<release version="1.8.0" date="2023-10-03">
<description translatable="no">
<p>Here's the changelog of this version:</p>
<ul>
<li>Add "Bulk Compress Directory (recursive)" feature. Thank's to @rk234</li>
<li>Add simplified Chinese translation. Thank's to @yuhldr</li>
<li>Add Ukrainian translation. Thank's to @Vovkiv.</li>
<li>Add categories and keywords support in appdata. Thank's to @sabriunal</li>
<li>Improve clarity of preference options</li>
<li>Update OxiPNG to v9</li>
<li>Update translations</li>
<li>Handle cases where previews can't be generated</li>
<li>Fix some "Format of this file is not supported"</li>
</ul>
</description>
</release>
<release version="1.7.0" date="2023-04-05"> <release version="1.7.0" date="2023-04-05">
<description translatable="no"> <description translatable="no">
<p>Here's the changelog of this version:</p> <p>Here's the changelog of this version:</p>

View File

@ -29,6 +29,7 @@
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
<property name="title" translatable="yes">Keep metadata</property> <property name="title" translatable="yes">Keep metadata</property>
<property name="subtitle" translatable="yes">Keep metadata chunks that do not affect rendering.</property>
<property name="activatable-widget">toggle_metadata</property> <property name="activatable-widget">toggle_metadata</property>
<child> <child>
<object class="GtkSwitch" id="toggle_metadata"> <object class="GtkSwitch" id="toggle_metadata">
@ -40,6 +41,7 @@
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
<property name="title" translatable="yes">Preserve file attributes if possible</property> <property name="title" translatable="yes">Preserve file attributes if possible</property>
<property name="subtitle" translatable="yes">Ensure the output file has the same permissions and timestamps as the input file.</property>
<property name="activatable-widget">toggle_file_attributes</property> <property name="activatable-widget">toggle_file_attributes</property>
<child> <child>
<object class="GtkSwitch" id="toggle_file_attributes"> <object class="GtkSwitch" id="toggle_file_attributes">
@ -82,7 +84,8 @@
<property name="title" translatable="no">PNG</property> <property name="title" translatable="no">PNG</property>
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
<property name="title" translatable="yes">PNG Lossy Compression Level</property> <property name="title" translatable="yes">Lossy Compression</property>
<property name="subtitle" translatable="yes">In percentage. 100% is the best quality.</property>
<property name="activatable-widget">spin_png_lossy_level</property> <property name="activatable-widget">spin_png_lossy_level</property>
<child> <child>
<object class="GtkSpinButton" id="spin_png_lossy_level"> <object class="GtkSpinButton" id="spin_png_lossy_level">
@ -101,8 +104,8 @@
</child> </child>
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
<property name="title" translatable="yes">PNG Lossless Compression Level</property> <property name="title" translatable="yes">Lossless Compression Level</property>
<property name="subtitle" translatable="yes">The higher it is, the slower it is</property> <property name="subtitle" translatable="yes">Between 0 and 6. 6 is the highest (but slower) level.</property>
<property name="activatable-widget">spin_png_lossless_level</property> <property name="activatable-widget">spin_png_lossless_level</property>
<child> <child>
<object class="GtkSpinButton" id="spin_png_lossless_level"> <object class="GtkSpinButton" id="spin_png_lossless_level">
@ -126,7 +129,8 @@
<property name="title" translatable="no">JPG</property> <property name="title" translatable="no">JPG</property>
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
<property name="title" translatable="yes">JPG Lossy Compression Level</property> <property name="title" translatable="yes">Lossy Compression</property>
<property name="subtitle" translatable="yes">In percentage. 100% is the best quality.</property>
<property name="activatable-widget">spin_jpg_lossy_level</property> <property name="activatable-widget">spin_jpg_lossy_level</property>
<child> <child>
<object class="GtkSpinButton" id="spin_jpg_lossy_level"> <object class="GtkSpinButton" id="spin_jpg_lossy_level">
@ -145,7 +149,8 @@
</child> </child>
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
<property name="title" translatable="yes">Progressive Encode JPG</property> <property name="title" translatable="yes">Progressive Encode</property>
<property name="subtitle" translatable="yes">To enable incremental image rendering: blurry to clear.</property>
<property name="activatable-widget">toggle_jpg_progressive</property> <property name="activatable-widget">toggle_jpg_progressive</property>
<child> <child>
<object class="GtkSwitch" id="toggle_jpg_progressive"> <object class="GtkSwitch" id="toggle_jpg_progressive">
@ -161,7 +166,8 @@
<property name="title" translatable="no">WebP</property> <property name="title" translatable="no">WebP</property>
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
<property name="title" translatable="yes">WebP Lossy Compression Level</property> <property name="title" translatable="yes">Lossy Compression</property>
<property name="subtitle" translatable="yes">In percentage. 100% is the best quality.</property>
<property name="activatable-widget">spin_webp_lossy_level</property> <property name="activatable-widget">spin_webp_lossy_level</property>
<child> <child>
<object class="GtkSpinButton" id="spin_webp_lossy_level"> <object class="GtkSpinButton" id="spin_webp_lossy_level">
@ -180,8 +186,8 @@
</child> </child>
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
<property name="title" translatable="yes">WebP Lossless Compression Level</property> <property name="title" translatable="yes">Lossless Compression Level</property>
<property name="subtitle" translatable="yes">The higher it is, the slower it is</property> <property name="subtitle" translatable="yes">Between 0 and 6. 6 is the highest (but slower) level.</property>
<property name="activatable-widget">spin_webp_lossless_level</property> <property name="activatable-widget">spin_webp_lossless_level</property>
<child> <child>
<object class="GtkSpinButton" id="spin_webp_lossless_level"> <object class="GtkSpinButton" id="spin_webp_lossless_level">
@ -205,8 +211,8 @@
<property name="title" translatable="no">SVG</property> <property name="title" translatable="no">SVG</property>
<child> <child>
<object class="AdwActionRow"> <object class="AdwActionRow">
<property name="title" translatable="yes">SVG Maximum Compression Level</property> <property name="title" translatable="yes">Maximum Compression Level</property>
<property name="subtitle" translatable="yes">Can be more destructive for the image</property> <property name="subtitle" translatable="yes">Can be more destructive for the image.</property>
<child> <child>
<object class="GtkSwitch" id="toggle_svg_maximum_level"> <object class="GtkSwitch" id="toggle_svg_maximum_level">
<property name="valign">center</property> <property name="valign">center</property>

14
debian/changelog vendored
View File

@ -1,3 +1,17 @@
curtail (1.8.0) focal; urgency=medium
* Add "Bulk Compress Directory (recursive)" feature. Thank's to @rk234.
* Add simplified Chinese translation. Thank's to @yuhldr.
* Add Ukrainian translation. Thank's to @Vovkiv.
* Add categories and keywords support in appdata. Thank's to @sabriunal.
* Improve clarity of preference options.
* Update OxiPNG to v9.
* Update translations.
* Handle cases where previews can't be generated.
* Fix some "Format of this file is not supported".
-- Archisman Panigrahi <apandada1@gmail.com> Fri, 03 Nov 2023 10:00 +0200
curtail (1.7.0) focal; urgency=medium curtail (1.7.0) focal; urgency=medium
* SVG support. * SVG support.

View File

@ -1,5 +1,5 @@
project('curtail', project('curtail',
version: '1.7.0', version: '1.8.0',
meson_version: '>= 0.59.0', meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2', 'werror=false', ], default_options: [ 'warning_level=2', 'werror=false', ],
) )

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: curtail\n" "Project-Id-Version: curtail\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-02 13:35+0200\n" "POT-Creation-Date: 2023-11-03 09:45+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -34,8 +34,24 @@ msgid ""
"whether keep or not metadata of images." "whether keep or not metadata of images."
msgstr "" msgstr ""
#: data/com.github.huluti.Curtail.appdata.xml.in:28
msgid "compress"
msgstr ""
#: data/com.github.huluti.Curtail.appdata.xml.in:29
msgid "optimize"
msgstr ""
#: data/com.github.huluti.Curtail.appdata.xml.in:30
msgid "image"
msgstr ""
#: data/com.github.huluti.Curtail.appdata.xml.in:31
msgid "photo"
msgstr ""
#: data/com.github.huluti.Curtail.desktop.in:3 data/ui/window.ui:4 #: data/com.github.huluti.Curtail.desktop.in:3 data/ui/window.ui:4
#: data/ui/window.ui:122 #: data/ui/window.ui:32
msgid "Curtail" msgid "Curtail"
msgstr "" msgstr ""
@ -61,7 +77,7 @@ msgstr ""
msgid "This setting preserves metadata of images." msgid "This setting preserves metadata of images."
msgstr "" msgstr ""
#: data/com.github.huluti.Curtail.gschema.xml:16 data/ui/preferences.ui:42 #: data/com.github.huluti.Curtail.gschema.xml:16 data/ui/preferences.ui:43
msgid "Preserve file attributes if possible" msgid "Preserve file attributes if possible"
msgstr "" msgstr ""
@ -81,7 +97,7 @@ msgstr ""
msgid "Suffix to append at end of new file." msgid "Suffix to append at end of new file."
msgstr "" msgstr ""
#: data/com.github.huluti.Curtail.gschema.xml:31 data/ui/preferences.ui:85 #: data/com.github.huluti.Curtail.gschema.xml:31
msgid "PNG Lossy Compression Level" msgid "PNG Lossy Compression Level"
msgstr "" msgstr ""
@ -89,7 +105,7 @@ msgstr ""
msgid "Lossy compression level to use for PNG images." msgid "Lossy compression level to use for PNG images."
msgstr "" msgstr ""
#: data/com.github.huluti.Curtail.gschema.xml:36 data/ui/preferences.ui:104 #: data/com.github.huluti.Curtail.gschema.xml:36
msgid "PNG Lossless Compression Level" msgid "PNG Lossless Compression Level"
msgstr "" msgstr ""
@ -97,7 +113,7 @@ msgstr ""
msgid "Lossless compression level to use for PNG images." msgid "Lossless compression level to use for PNG images."
msgstr "" msgstr ""
#: data/com.github.huluti.Curtail.gschema.xml:41 data/ui/preferences.ui:129 #: data/com.github.huluti.Curtail.gschema.xml:41
msgid "JPG Lossy Compression Level" msgid "JPG Lossy Compression Level"
msgstr "" msgstr ""
@ -105,7 +121,7 @@ msgstr ""
msgid "Lossy compression level to use for JPG images." msgid "Lossy compression level to use for JPG images."
msgstr "" msgstr ""
#: data/com.github.huluti.Curtail.gschema.xml:46 data/ui/preferences.ui:164 #: data/com.github.huluti.Curtail.gschema.xml:46
msgid "WebP Lossy Compression Level" msgid "WebP Lossy Compression Level"
msgstr "" msgstr ""
@ -113,7 +129,7 @@ msgstr ""
msgid "Lossy compression level to use for WebP images." msgid "Lossy compression level to use for WebP images."
msgstr "" msgstr ""
#: data/com.github.huluti.Curtail.gschema.xml:51 data/ui/preferences.ui:183 #: data/com.github.huluti.Curtail.gschema.xml:51
msgid "WebP Lossless Compression Level" msgid "WebP Lossless Compression Level"
msgstr "" msgstr ""
@ -186,32 +202,60 @@ msgstr ""
msgid "Save the compressed image into a new file" msgid "Save the compressed image into a new file"
msgstr "" msgstr ""
#: data/ui/preferences.ui:53 #: data/ui/preferences.ui:32
msgid "Keep metadata chunks that do not affect rendering."
msgstr ""
#: data/ui/preferences.ui:44
msgid ""
"Ensure the output file has the same permissions and timestamps as the input "
"file."
msgstr ""
#: data/ui/preferences.ui:55
msgid "Compression timeout" msgid "Compression timeout"
msgstr "" msgstr ""
#: data/ui/preferences.ui:54 #: data/ui/preferences.ui:56
msgid "For each image" msgid "For each image"
msgstr "" msgstr ""
#: data/ui/preferences.ui:78 #: data/ui/preferences.ui:80
msgid "Compression" msgid "Compression"
msgstr "" msgstr ""
#: data/ui/preferences.ui:105 data/ui/preferences.ui:184 #: data/ui/preferences.ui:87 data/ui/preferences.ui:132
msgid "The higher it is, the slower it is" #: data/ui/preferences.ui:169
msgid "Lossy Compression"
msgstr "" msgstr ""
#: data/ui/preferences.ui:148 #: data/ui/preferences.ui:88 data/ui/preferences.ui:133
msgid "Progressive Encode JPG" #: data/ui/preferences.ui:170
msgid "In percentage. 100% is the best quality."
msgstr "" msgstr ""
#: data/ui/preferences.ui:208 #: data/ui/preferences.ui:107 data/ui/preferences.ui:189
msgid "SVG Maximum Compression Level" msgid "Lossless Compression Level"
msgstr "" msgstr ""
#: data/ui/preferences.ui:209 #: data/ui/preferences.ui:108 data/ui/preferences.ui:190
msgid "Can be more destructive for the image" msgid "Between 0 and 6. 6 is the highest (but slower) level."
msgstr ""
#: data/ui/preferences.ui:152
msgid "Progressive Encode"
msgstr ""
#: data/ui/preferences.ui:153
msgid "To enable incremental image rendering: blurry to clear."
msgstr ""
#: data/ui/preferences.ui:214
msgid "Maximum Compression Level"
msgstr ""
#: data/ui/preferences.ui:215
msgid "Can be more destructive for the image."
msgstr "" msgstr ""
#: data/ui/menu.ui:6 #: data/ui/menu.ui:6
@ -226,42 +270,42 @@ msgstr ""
msgid "About Curtail" msgid "About Curtail"
msgstr "" msgstr ""
#: data/ui/window.ui:12 #: data/ui/window.ui:18 src/window.py:188
msgid "_Change Mode"
msgstr ""
#: data/ui/window.ui:13
msgid "Images will be overwritten, proceed carefully."
msgstr ""
#: data/ui/window.ui:21
msgid "Drop images here to compress them"
msgstr ""
#: data/ui/window.ui:27
msgid "_Browse Files"
msgstr ""
#: data/ui/window.ui:46
msgid "Lossless"
msgstr ""
#: data/ui/window.ui:58
msgid "Lossy"
msgstr ""
#: data/ui/window.ui:108 src/window.py:188
msgid "Browse Files" msgid "Browse Files"
msgstr "" msgstr ""
#: data/ui/window.ui:115 #: data/ui/window.ui:25
msgid "Clear Results" msgid "Clear Results"
msgstr "" msgstr ""
#: data/ui/window.ui:129 #: data/ui/window.ui:39
msgid "Main Menu" msgid "Main Menu"
msgstr "" msgstr ""
#: data/ui/window.ui:51
msgid "_Change Mode"
msgstr ""
#: data/ui/window.ui:52
msgid "Images will be overwritten, proceed carefully."
msgstr ""
#: data/ui/window.ui:60
msgid "Drop images here to compress them"
msgstr ""
#: data/ui/window.ui:66
msgid "_Browse Files"
msgstr ""
#: data/ui/window.ui:85
msgid "Lossless"
msgstr ""
#: data/ui/window.ui:97
msgid "Lossy"
msgstr ""
#: src/compressor.py:89 #: src/compressor.py:89
msgid "Compression has reached the configured timeout of {} seconds." msgid "Compression has reached the configured timeout of {} seconds."
msgstr "" msgstr ""
@ -294,8 +338,8 @@ msgstr ""
msgid "SVG images" msgid "SVG images"
msgstr "" msgstr ""
#: src/tools.py:137 src/tools.py:144 src/tools.py:151 src/tools.py:158 #: src/tools.py:134 src/tools.py:141 src/tools.py:148 src/tools.py:155
#: src/tools.py:165 src/tools.py:195 #: src/tools.py:162 src/tools.py:192
msgid "Version not found" msgid "Version not found"
msgstr "" msgstr ""

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "curtail" name = "curtail"
version = "1.7.0" version = "1.8.0"
description = "" description = ""
authors = ["Hugo Posnic <hugo.posnic@protonmail.com>"] authors = ["Hugo Posnic <hugo.posnic@protonmail.com>"]
license = "GPLv3" license = "GPLv3"

View File

@ -62,18 +62,15 @@ def add_filechooser_filters(dialog):
def get_file_type(filename): def get_file_type(filename):
content_type, uncertain = Gio.content_type_guess(filename=str(filename)) content_type = Gio.content_type_guess(filename=str(filename))[0]
if not uncertain: if content_type == 'image/jpeg':
if content_type == 'image/jpeg': return 'jpg'
return 'jpg' elif content_type == 'image/png':
elif content_type == 'image/png': return 'png'
return 'png' elif content_type == 'image/webp':
elif content_type == 'image/webp': return 'webp'
return 'webp' elif content_type == 'image/svg+xml':
elif content_type == 'image/svg+xml': return 'svg'
return 'svg'
else:
return None
else: else:
return None return None

View File

@ -362,7 +362,7 @@ class CurtailWindow(Adw.ApplicationWindow):
license_type=Gtk.License.GPL_3_0, license_type=Gtk.License.GPL_3_0,
website='https://github.com/Huluti/Curtail', website='https://github.com/Huluti/Curtail',
issue_url='https://github.com/Huluti/Curtail/issues/new', issue_url='https://github.com/Huluti/Curtail/issues/new',
version='1.7.0', version='1.8.0',
developers=[ developers=[
'Hugo Posnic https://github.com/Huluti' 'Hugo Posnic https://github.com/Huluti'
], ],