diff --git a/captcha/.gitignore b/captcha/.gitignore new file mode 100644 index 0000000..ef8f28f --- /dev/null +++ b/captcha/.gitignore @@ -0,0 +1,111 @@ +#prjs +*.bin +*.build +*.dist +*.onefile-build +nuitka-crash-report.xml + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ diff --git a/captcha/_run.sh b/captcha/_run.sh index b4c1664..2cac9a1 100755 --- a/captcha/_run.sh +++ b/captcha/_run.sh @@ -1,3 +1,4 @@ #!/bin/bash cd "$(dirname "$0")" || exit +source venv/bin/activate exec python3 captcha_service.py diff --git a/captcha/_set.sh b/captcha/_set.sh new file mode 100755 index 0000000..e0f738f --- /dev/null +++ b/captcha/_set.sh @@ -0,0 +1,6 @@ +#!/bin/bash +cd "$(dirname "$0")" || exit +python3 -m venv venv +source venv/bin/activate +pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple +#nuitka --standalone smtp.py diff --git a/captcha/requirements.txt b/captcha/requirements.txt new file mode 100644 index 0000000..a7f5d85 --- /dev/null +++ b/captcha/requirements.txt @@ -0,0 +1,2 @@ +../pymsg +Pillow