Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoHsiao1 committed Feb 16, 2020
1 parent 6909184 commit bf6bc86
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test run
on: [push]

jobs:
Test run on :
Test_run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Read/Write metadata of digital image, including [EXIF](https://en.wikipedia.org/
- install: `pip install pyexiv2`
- [source code on github](https://github.com/LeoHsiao1/pyexiv2)

> Version 2.0 is not compatible with previous versions, because the API has changed. See the new [tutorial](https://github.com/LeoHsiao1/pyexiv2/blob/dev/docs/Tutorial.md).
## Features

- Base on C++ API of [Exiv2](https://www.exiv2.org/index.html) and [pybind11](https://github.com/pybind/pybind11).
Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorial-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Image(filename, encoding='utf-8')
>>> img.close()
```
- pyexiv2 支持包含 Unicode 字符的图片路径、元数据。默认编码格式为 utf-8 .
- 出于未知的原因,如果你在Windows上使用 pyexiv2 ,并且图片路径中包含中文,则无法使用 utf-8 进行编码,而只能使用 gbk 进行编码。例如:
- 如果你不能用`utf-8`编码图片数据或路径中的中文字符,请试试用`gbk`。例如:
```python
>>> img = Image(r'.\pyexiv2\tests\1 - 副本.jpg')
RuntimeError: d:\1\pyexiv2\pyexiv2\tests\1 - 副本.jpg: Failed to open the data source: No such file or directory (errno = 2)
Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Image(filename, encoding='utf-8')
>>> img.close()
```
- pyexiv2 supports Unicode characters that contained in image paths and metadata. The default encoding format is utf-8.
- For unknown reasons, if you are using pyexiv2 on Windows and the image path contains Chinese, it can't be encoded in utf-8, but in gbk. For example:
- If you cannot encode Chinese characters in the image data or path in `utf-8`, please try `gbk`. For example:
```python
>>> img = Image(r'.\pyexiv2\tests\1 - 副本.jpg')
RuntimeError: d:\1\pyexiv2\pyexiv2\tests\1 - 副本.jpg: Failed to open the data source: No such file or directory (errno = 2)
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
url='https://github.com/LeoHsiao1/pyexiv2',
install_requires=["pybind11==2.4.3"],
packages=setuptools.find_packages(),
package_data={'': ['*.py', '*.so', '*.dll', '*.pyd']},
package_data={'': ['*.py', '*.md', '*.cpp', '*.so', '*.dll', '*.pyd', '*.jpg']},
classifiers=[
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: POSIX :: Linux',
Expand All @@ -29,5 +29,7 @@


# upload to pypi.org:
# python -m pip install setuptools wheel twine
# git clean -df
# python setup.py sdist bdist_wheel
# python -m twine upload dist/*

0 comments on commit bf6bc86

Please sign in to comment.