summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-05 10:40:29 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-05 10:40:29 +0000
commit65de1f2b2539b78ab85d4f6dd4e458da39c48057 (patch)
tree729459b6bb6376a1e9a82d9c4e081467a50565b2
parent7fc19b202d5f70c5ffb909bca15f5096d73a5460 (diff)
automatic import of python-multicolorcaptchaopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-multicolorcaptcha.spec256
-rw-r--r--sources1
3 files changed, 258 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..f466d8f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/multicolorcaptcha-1.2.0.tar.gz
diff --git a/python-multicolorcaptcha.spec b/python-multicolorcaptcha.spec
new file mode 100644
index 0000000..da13ee5
--- /dev/null
+++ b/python-multicolorcaptcha.spec
@@ -0,0 +1,256 @@
+%global _empty_manifest_terminate_build 0
+Name: python-multicolorcaptcha
+Version: 1.2.0
+Release: 1
+Summary: Python random image-captcha generator library.
+License: GPLv3
+URL: https://github.com/J-Rios/multicolorcaptcha
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/2e/97/7b47adde8e6074b6020454dea3f44b9ad21e4d2a3272de7fb4e431089257/multicolorcaptcha-1.2.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-Pillow
+
+%description
+# multicolorcaptcha
+Python random image-captcha generator library.
+
+## Installation
+To generate the images of the Captchas, the library uses Pillow module.
+- For Linux systems, it is necessary to install Pillow prerequisites (also, Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL):
+```bash
+sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk
+```
+
+- Install the module
+```bash
+pip3 install multicolorcaptcha
+```
+
+## API Usage
+```py
+from multicolorcaptcha import CaptchaGenerator
+
+# Captcha image size number (2 -> 640x360)
+CAPCTHA_SIZE_NUM = 2
+
+# Create Captcha Generator object of specified size
+generator = CaptchaGenerator(CAPCTHA_SIZE_NUM)
+
+# Generate a captcha image
+captcha = generator.gen_captcha_image(difficult_level=3)
+math_captcha = generator.gen_math_captcha_image(difficult_level=2)
+
+# Get information of standard captcha
+image = captcha.image
+characters = captcha.characters
+
+# Get information of math captcha
+math_image = math_captcha.image
+math_equation_string = math_captcha.equation_str
+math_equation_result = math_captcha.equation_result
+
+# Save the images to files
+image.save("captcha.png", "png")
+math_image.save("captcha.png", "png")
+```
+
+## Generated Captchas Examples
+
+### Monocolor Background Captchas
+![Monocolor Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Monocolor_Background.png)
+
+### Multicolor Background Captchas
+![Multicolor Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Multicolor_Background.png)
+
+### ASCII Captchas
+![Multicolor Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Ascii.png)
+
+### Modificable Difficult Level Captchas
+![Multicolor Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Max_Complex.png)
+
+### Math Equation Captchas
+![Math Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Math.png)
+
+
+
+
+%package -n python3-multicolorcaptcha
+Summary: Python random image-captcha generator library.
+Provides: python-multicolorcaptcha
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-multicolorcaptcha
+# multicolorcaptcha
+Python random image-captcha generator library.
+
+## Installation
+To generate the images of the Captchas, the library uses Pillow module.
+- For Linux systems, it is necessary to install Pillow prerequisites (also, Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL):
+```bash
+sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk
+```
+
+- Install the module
+```bash
+pip3 install multicolorcaptcha
+```
+
+## API Usage
+```py
+from multicolorcaptcha import CaptchaGenerator
+
+# Captcha image size number (2 -> 640x360)
+CAPCTHA_SIZE_NUM = 2
+
+# Create Captcha Generator object of specified size
+generator = CaptchaGenerator(CAPCTHA_SIZE_NUM)
+
+# Generate a captcha image
+captcha = generator.gen_captcha_image(difficult_level=3)
+math_captcha = generator.gen_math_captcha_image(difficult_level=2)
+
+# Get information of standard captcha
+image = captcha.image
+characters = captcha.characters
+
+# Get information of math captcha
+math_image = math_captcha.image
+math_equation_string = math_captcha.equation_str
+math_equation_result = math_captcha.equation_result
+
+# Save the images to files
+image.save("captcha.png", "png")
+math_image.save("captcha.png", "png")
+```
+
+## Generated Captchas Examples
+
+### Monocolor Background Captchas
+![Monocolor Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Monocolor_Background.png)
+
+### Multicolor Background Captchas
+![Multicolor Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Multicolor_Background.png)
+
+### ASCII Captchas
+![Multicolor Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Ascii.png)
+
+### Modificable Difficult Level Captchas
+![Multicolor Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Max_Complex.png)
+
+### Math Equation Captchas
+![Math Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Math.png)
+
+
+
+
+%package help
+Summary: Development documents and examples for multicolorcaptcha
+Provides: python3-multicolorcaptcha-doc
+%description help
+# multicolorcaptcha
+Python random image-captcha generator library.
+
+## Installation
+To generate the images of the Captchas, the library uses Pillow module.
+- For Linux systems, it is necessary to install Pillow prerequisites (also, Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL):
+```bash
+sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk
+```
+
+- Install the module
+```bash
+pip3 install multicolorcaptcha
+```
+
+## API Usage
+```py
+from multicolorcaptcha import CaptchaGenerator
+
+# Captcha image size number (2 -> 640x360)
+CAPCTHA_SIZE_NUM = 2
+
+# Create Captcha Generator object of specified size
+generator = CaptchaGenerator(CAPCTHA_SIZE_NUM)
+
+# Generate a captcha image
+captcha = generator.gen_captcha_image(difficult_level=3)
+math_captcha = generator.gen_math_captcha_image(difficult_level=2)
+
+# Get information of standard captcha
+image = captcha.image
+characters = captcha.characters
+
+# Get information of math captcha
+math_image = math_captcha.image
+math_equation_string = math_captcha.equation_str
+math_equation_result = math_captcha.equation_result
+
+# Save the images to files
+image.save("captcha.png", "png")
+math_image.save("captcha.png", "png")
+```
+
+## Generated Captchas Examples
+
+### Monocolor Background Captchas
+![Monocolor Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Monocolor_Background.png)
+
+### Multicolor Background Captchas
+![Multicolor Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Multicolor_Background.png)
+
+### ASCII Captchas
+![Multicolor Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Ascii.png)
+
+### Modificable Difficult Level Captchas
+![Multicolor Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Max_Complex.png)
+
+### Math Equation Captchas
+![Math Captcha](https://github.com/J-Rios/multicolorcaptcha/raw/master/images/Math.png)
+
+
+
+
+%prep
+%autosetup -n multicolorcaptcha-1.2.0
+
+%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-multicolorcaptcha -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.2.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..2c0489f
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+15f6f89989e970c2a5ba4def5645c90e multicolorcaptcha-1.2.0.tar.gz