IPTCInfo3 2.3.0__tar.gz → 2.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {iptcinfo3-2.3.0 → iptcinfo3-2.3.2}/.gitignore +6 -0
- {iptcinfo3-2.3.0 → iptcinfo3-2.3.2}/CHANGELOG.md +25 -0
- {iptcinfo3-2.3.0 → iptcinfo3-2.3.2}/PKG-INFO +15 -9
- {iptcinfo3-2.3.0 → iptcinfo3-2.3.2}/README.rst +8 -2
- {iptcinfo3-2.3.0 → iptcinfo3-2.3.2}/iptcinfo3.py +6 -2
- {iptcinfo3-2.3.0 → iptcinfo3-2.3.2}/pyproject.toml +8 -8
- {iptcinfo3-2.3.0 → iptcinfo3-2.3.2}/LICENSE +0 -0
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
## 2.3.2
|
|
2
|
+
|
|
3
|
+
### New Features
|
|
4
|
+
- Added `'creator'` alias for `'by-line'` (dataset 80) per IPTC Core — `info['creator']` now works for reading and writing (idea from adityamulik's PR #34, corrected: raw dataset 1 does not exist in IIM)
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 2.3.1
|
|
9
|
+
|
|
10
|
+
### Compatibility
|
|
11
|
+
- Verified on Python 3.15 (all 8 tests pass); supports Python 3.10 through 3.15
|
|
12
|
+
- Dropped EOL interpreters: 3.8 (EOL Oct 2024) and 3.9 (EOL Oct 2025); `requires-python` is now `>=3.10`
|
|
13
|
+
- Added PyPI classifiers for Python 3.14 and 3.15
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
- Fixed `SyntaxWarning: 'return' in a 'finally' block` in `file_is_jpeg()` (return moved out of `finally`; behavior unchanged, file position still reset)
|
|
17
|
+
|
|
18
|
+
### Build / Dev
|
|
19
|
+
- Fixed `pytest` config: `testpaths` pointed at a non-existent `tests/` dir so bare `pytest` collected nothing; now points at repo root so `iptcinfo_test.py` is found
|
|
20
|
+
- Bumped Ruff `target-version` from `py38` to `py310`
|
|
21
|
+
- Updated dev pins: `.python-version` 3.9.7 → 3.15, `Pipfile` requires 3.10, CircleCI image `cimg/python:3.9.7` → `cimg/python:3.15`
|
|
22
|
+
- Added GitHub Actions CI matrix (Python 3.10–3.15)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
1
26
|
## 2.3.0 (2025-12-02)
|
|
2
27
|
|
|
3
28
|
### Bug Fixes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: IPTCInfo3
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.2
|
|
4
4
|
Summary: Extract and modify IPTC metadata from JPEG images
|
|
5
5
|
Project-URL: Homepage, https://github.com/jamesacampbell/iptcinfo3
|
|
6
6
|
Project-URL: Repository, https://github.com/jamesacampbell/iptcinfo3
|
|
@@ -16,19 +16,19 @@ Classifier: License :: OSI Approved :: Artistic License
|
|
|
16
16
|
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
|
|
17
17
|
Classifier: Programming Language :: Python
|
|
18
18
|
Classifier: Programming Language :: Python :: 3
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
21
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
22
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
23
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
24
22
|
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
25
25
|
Classifier: Topic :: Multimedia :: Graphics
|
|
26
26
|
Classifier: Topic :: Utilities
|
|
27
|
-
Requires-Python: >=3.
|
|
27
|
+
Requires-Python: >=3.10
|
|
28
28
|
Provides-Extra: dev
|
|
29
|
-
Requires-Dist: pytest-cov>=
|
|
29
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
30
30
|
Requires-Dist: pytest-watch>=4.2; extra == 'dev'
|
|
31
|
-
Requires-Dist: pytest>=
|
|
31
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
32
32
|
Description-Content-Type: text/x-rst
|
|
33
33
|
|
|
34
34
|
``IPTCINFO 3``
|
|
@@ -42,7 +42,7 @@ Ported from Josh Carter's Perl IPTCInfo-1.9.pm by Tamas Gulacsi
|
|
|
42
42
|
|
|
43
43
|
Ever wish you add information to your photos like a caption, the place
|
|
44
44
|
you took it, the date, and perhaps even keywords and categories? You
|
|
45
|
-
already can. The International Press Telecommunications Council (IPTC)
|
|
45
|
+
already can. The `International Press Telecommunications Council (IPTC) <https://en.wikipedia.org/wiki/International_Press_Telecommunications_Council>`_
|
|
46
46
|
defines a format for exchanging meta-information in news content, and
|
|
47
47
|
that includes photographs. You can embed all kinds of information in
|
|
48
48
|
your images. The trick is putting it to use.
|
|
@@ -54,6 +54,8 @@ programs -- pull it back out. You can use the information directly in
|
|
|
54
54
|
Python programs, export it to XML, or even export SQL statements ready
|
|
55
55
|
to be fed into a database.
|
|
56
56
|
|
|
57
|
+
Wikidata item https://www.wikidata.org/wiki/Q137179516
|
|
58
|
+
|
|
57
59
|
Installation
|
|
58
60
|
------------
|
|
59
61
|
|
|
@@ -65,10 +67,12 @@ Or with uv::
|
|
|
65
67
|
|
|
66
68
|
uv pip install IPTCInfo3
|
|
67
69
|
|
|
70
|
+
On Gentoo Linux: on `gentoo-zh overlay <https://github.com/microcai/gentoo-zh/tree/master/dev-python/iptcinfo3>`_.
|
|
71
|
+
|
|
68
72
|
Requirements
|
|
69
73
|
------------
|
|
70
74
|
|
|
71
|
-
- Python 3.
|
|
75
|
+
- Python 3.10 or higher
|
|
72
76
|
- No external dependencies required
|
|
73
77
|
|
|
74
78
|
Usage
|
|
@@ -101,3 +105,5 @@ Lists for keywords, so you can just append!
|
|
|
101
105
|
Save new info to file
|
|
102
106
|
``info.save()``
|
|
103
107
|
``info.save_as('very_meta.jpg')``
|
|
108
|
+
|
|
109
|
+
For real life usage example see https://gitlab.com/vitaly-zdanevich/upload_to_commons_with_categories_from_iptc/-/blob/master/upload_to_commons_with_categories_from_iptc.py
|
|
@@ -9,7 +9,7 @@ Ported from Josh Carter's Perl IPTCInfo-1.9.pm by Tamas Gulacsi
|
|
|
9
9
|
|
|
10
10
|
Ever wish you add information to your photos like a caption, the place
|
|
11
11
|
you took it, the date, and perhaps even keywords and categories? You
|
|
12
|
-
already can. The International Press Telecommunications Council (IPTC)
|
|
12
|
+
already can. The `International Press Telecommunications Council (IPTC) <https://en.wikipedia.org/wiki/International_Press_Telecommunications_Council>`_
|
|
13
13
|
defines a format for exchanging meta-information in news content, and
|
|
14
14
|
that includes photographs. You can embed all kinds of information in
|
|
15
15
|
your images. The trick is putting it to use.
|
|
@@ -21,6 +21,8 @@ programs -- pull it back out. You can use the information directly in
|
|
|
21
21
|
Python programs, export it to XML, or even export SQL statements ready
|
|
22
22
|
to be fed into a database.
|
|
23
23
|
|
|
24
|
+
Wikidata item https://www.wikidata.org/wiki/Q137179516
|
|
25
|
+
|
|
24
26
|
Installation
|
|
25
27
|
------------
|
|
26
28
|
|
|
@@ -32,10 +34,12 @@ Or with uv::
|
|
|
32
34
|
|
|
33
35
|
uv pip install IPTCInfo3
|
|
34
36
|
|
|
37
|
+
On Gentoo Linux: on `gentoo-zh overlay <https://github.com/microcai/gentoo-zh/tree/master/dev-python/iptcinfo3>`_.
|
|
38
|
+
|
|
35
39
|
Requirements
|
|
36
40
|
------------
|
|
37
41
|
|
|
38
|
-
- Python 3.
|
|
42
|
+
- Python 3.10 or higher
|
|
39
43
|
- No external dependencies required
|
|
40
44
|
|
|
41
45
|
Usage
|
|
@@ -68,3 +72,5 @@ Lists for keywords, so you can just append!
|
|
|
68
72
|
Save new info to file
|
|
69
73
|
``info.save()``
|
|
70
74
|
``info.save_as('very_meta.jpg')``
|
|
75
|
+
|
|
76
|
+
For real life usage example see https://gitlab.com/vitaly-zdanevich/upload_to_commons_with_categories_from_iptc/-/blob/master/upload_to_commons_with_categories_from_iptc.py
|
|
@@ -26,7 +26,7 @@ import tempfile
|
|
|
26
26
|
from struct import pack, unpack
|
|
27
27
|
import json
|
|
28
28
|
|
|
29
|
-
__version__ = '2.3.
|
|
29
|
+
__version__ = '2.3.2'
|
|
30
30
|
__author__ = 'Gulácsi, Tamás'
|
|
31
31
|
__updated_by__ = 'Campbell, James'
|
|
32
32
|
|
|
@@ -162,7 +162,7 @@ def file_is_jpeg(fh):
|
|
|
162
162
|
ered = ff == 0xff
|
|
163
163
|
finally:
|
|
164
164
|
fh.seek(0)
|
|
165
|
-
|
|
165
|
+
return ered
|
|
166
166
|
|
|
167
167
|
|
|
168
168
|
def jpeg_get_variable_length(fh):
|
|
@@ -554,6 +554,10 @@ class IPTCData(dict):
|
|
|
554
554
|
# Alias for compatibility with gThumb/exiftool
|
|
555
555
|
elif isinstance(key, str) and key.lower() == 'destination':
|
|
556
556
|
return 103 # Maps to 'original transmission reference'
|
|
557
|
+
# Alias per IPTC Core: 'creator' is stored as 'by-line' (dataset 80).
|
|
558
|
+
# (Closes adityamulik's PR #34 idea; raw dataset 1 does not exist in IIM.)
|
|
559
|
+
elif isinstance(key, str) and key.lower() == 'creator':
|
|
560
|
+
return 80 # Maps to 'by-line'
|
|
557
561
|
elif key.startswith(cls.c_cust_pre) and key[len(cls.c_cust_pre):].isdigit():
|
|
558
562
|
# example: nonstandard_69 -> 69
|
|
559
563
|
return int(key[len(cls.c_cust_pre):])
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "IPTCInfo3"
|
|
7
|
-
version = "2.3.
|
|
7
|
+
version = "2.3.2"
|
|
8
8
|
description = "Extract and modify IPTC metadata from JPEG images"
|
|
9
9
|
readme = "README.rst"
|
|
10
10
|
license = { text = "Artistic-1.0 OR GPL-1.0-or-later" }
|
|
@@ -22,16 +22,16 @@ classifiers = [
|
|
|
22
22
|
"Intended Audience :: Developers",
|
|
23
23
|
"Programming Language :: Python",
|
|
24
24
|
"Programming Language :: Python :: 3",
|
|
25
|
-
"Programming Language :: Python :: 3.8",
|
|
26
|
-
"Programming Language :: Python :: 3.9",
|
|
27
25
|
"Programming Language :: Python :: 3.10",
|
|
28
26
|
"Programming Language :: Python :: 3.11",
|
|
29
27
|
"Programming Language :: Python :: 3.12",
|
|
30
28
|
"Programming Language :: Python :: 3.13",
|
|
29
|
+
"Programming Language :: Python :: 3.14",
|
|
30
|
+
"Programming Language :: Python :: 3.15",
|
|
31
31
|
"Topic :: Multimedia :: Graphics",
|
|
32
32
|
"Topic :: Utilities",
|
|
33
33
|
]
|
|
34
|
-
requires-python = ">=3.
|
|
34
|
+
requires-python = ">=3.10"
|
|
35
35
|
dependencies = []
|
|
36
36
|
|
|
37
37
|
[project.urls]
|
|
@@ -41,8 +41,8 @@ Issues = "https://github.com/jamesacampbell/iptcinfo3/issues"
|
|
|
41
41
|
|
|
42
42
|
[project.optional-dependencies]
|
|
43
43
|
dev = [
|
|
44
|
-
"pytest>=
|
|
45
|
-
"pytest-cov>=
|
|
44
|
+
"pytest>=8.0",
|
|
45
|
+
"pytest-cov>=5.0",
|
|
46
46
|
"pytest-watch>=4.2",
|
|
47
47
|
]
|
|
48
48
|
|
|
@@ -59,7 +59,7 @@ packages = ["."]
|
|
|
59
59
|
only-include = ["iptcinfo3.py"]
|
|
60
60
|
|
|
61
61
|
[tool.pytest.ini_options]
|
|
62
|
-
testpaths = ["
|
|
62
|
+
testpaths = ["."]
|
|
63
63
|
python_files = ["test_*.py", "*_test.py"]
|
|
64
64
|
|
|
65
65
|
[tool.coverage.run]
|
|
@@ -72,7 +72,7 @@ skip_covered = true
|
|
|
72
72
|
|
|
73
73
|
[tool.ruff]
|
|
74
74
|
line-length = 100
|
|
75
|
-
target-version = "
|
|
75
|
+
target-version = "py310"
|
|
76
76
|
|
|
77
77
|
[tool.ruff.lint]
|
|
78
78
|
select = ["E", "F", "W", "I", "N", "UP"]
|
|
File without changes
|