diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-06-20 07:12:37 +0000 | 
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-06-20 07:12:37 +0000 | 
| commit | 4a307b42c48c86a12c9a3783257b84c455aa99ac (patch) | |
| tree | 5733f9c91dd18e19d60d2070eed66946f9d814dc | |
| parent | 25febcb2b814d3cd5762daf0133889dafc5d4163 (diff) | |
automatic import of python-mediasorteropeneuler20.03
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-mediasorter.spec | 169 | ||||
| -rw-r--r-- | sources | 1 | 
3 files changed, 171 insertions, 0 deletions
@@ -0,0 +1 @@ +/mediasorter-0.1.3.tar.gz diff --git a/python-mediasorter.spec b/python-mediasorter.spec new file mode 100644 index 0000000..f29ac9a --- /dev/null +++ b/python-mediasorter.spec @@ -0,0 +1,169 @@ +%global _empty_manifest_terminate_build 0 +Name:		python-mediasorter +Version:	0.1.3 +Release:	1 +Summary:	A tool to sort and copy images/videos to a defined directory structure. +License:	MIT +URL:		https://github.com/shireenrao/mediasorter +Source0:	https://mirrors.aliyun.com/pypi/web/packages/52/17/5075d21afe4faae946b8b0f7fd3291272858c01c4e36b9816ba03f4b968f/mediasorter-0.1.3.tar.gz +BuildArch:	noarch + +Requires:	python3-click +Requires:	python3-tqdm +Requires:	python3-filetype +Requires:	python3-exifread +Requires:	python3-pillow +Requires:	python3-hachoir +Requires:	python3-pytest + +%description +# mediasorter + +A CLI tool to sort and copy images/videos to a defined directory structure. This will look at the metadata for each picture/video in the source directory and copy it to the target directory preserving the files metadata. The target directory is by default in the format %Y/%B/%Y_%m_%d.  + +For example if there is an image under ~/phonepics/someimage.jpg with a create date of 2021-10-21. If I run the following: +     +    $ mediasorter --source ~/phonepics --target ~/images + +The picture someimage.jpg will be saved under ~/images/2021/October/2021_10_21. + +## Installation + +    pip install mediasorter + +## Usage + + +    Usage: mediasorter [OPTIONS] + +    The mediasorter Python project. + +    Options: +    -s, --source PATH  Source directory of Images/Videos  [default: current directory] +    -t, --target PATH  Target directory of Images/Videos  [required] +    -f, --format TEXT  Directory format for how images/videos are saved to target  [default: %Y/%B/%Y_%m_%d] +    -d, --debug +    --version          Show the version and exit. +    --help             Show this message and exit. + + + + +%package -n python3-mediasorter +Summary:	A tool to sort and copy images/videos to a defined directory structure. +Provides:	python-mediasorter +BuildRequires:	python3-devel +BuildRequires:	python3-setuptools +BuildRequires:	python3-pip +%description -n python3-mediasorter +# mediasorter + +A CLI tool to sort and copy images/videos to a defined directory structure. This will look at the metadata for each picture/video in the source directory and copy it to the target directory preserving the files metadata. The target directory is by default in the format %Y/%B/%Y_%m_%d.  + +For example if there is an image under ~/phonepics/someimage.jpg with a create date of 2021-10-21. If I run the following: +     +    $ mediasorter --source ~/phonepics --target ~/images + +The picture someimage.jpg will be saved under ~/images/2021/October/2021_10_21. + +## Installation + +    pip install mediasorter + +## Usage + + +    Usage: mediasorter [OPTIONS] + +    The mediasorter Python project. + +    Options: +    -s, --source PATH  Source directory of Images/Videos  [default: current directory] +    -t, --target PATH  Target directory of Images/Videos  [required] +    -f, --format TEXT  Directory format for how images/videos are saved to target  [default: %Y/%B/%Y_%m_%d] +    -d, --debug +    --version          Show the version and exit. +    --help             Show this message and exit. + + + + +%package help +Summary:	Development documents and examples for mediasorter +Provides:	python3-mediasorter-doc +%description help +# mediasorter + +A CLI tool to sort and copy images/videos to a defined directory structure. This will look at the metadata for each picture/video in the source directory and copy it to the target directory preserving the files metadata. The target directory is by default in the format %Y/%B/%Y_%m_%d.  + +For example if there is an image under ~/phonepics/someimage.jpg with a create date of 2021-10-21. If I run the following: +     +    $ mediasorter --source ~/phonepics --target ~/images + +The picture someimage.jpg will be saved under ~/images/2021/October/2021_10_21. + +## Installation + +    pip install mediasorter + +## Usage + + +    Usage: mediasorter [OPTIONS] + +    The mediasorter Python project. + +    Options: +    -s, --source PATH  Source directory of Images/Videos  [default: current directory] +    -t, --target PATH  Target directory of Images/Videos  [required] +    -f, --format TEXT  Directory format for how images/videos are saved to target  [default: %Y/%B/%Y_%m_%d] +    -d, --debug +    --version          Show the version and exit. +    --help             Show this message and exit. + + + + +%prep +%autosetup -n mediasorter-0.1.3 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then +	find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then +	find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/bin ]; then +	find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then +	find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then +	find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-mediasorter -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.3-1 +- Package Spec generated @@ -0,0 +1 @@ +7c7d73f8def23736b10403bc3be0ddb6  mediasorter-0.1.3.tar.gz  | 
