diff --git a/.flake8 b/.flake8 index 6deafc2..7da1f96 100644 --- a/.flake8 +++ b/.flake8 @@ -1,2 +1,2 @@ [flake8] -max-line-length = 120 +max-line-length = 100 diff --git a/.gitignore b/.gitignore index e0dcdb0..85a10cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,16 @@ +# Build artifacts +/vkms/version.py +build/ +*.egg-info +dist/ + +# Python cache __pycache__/ *.pyc + +# Backups and sketches other/ -*.json + +# Program artifacts vkms-result* -build/ -*.egg-info -dist/ +*.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3afc1c4..fcb1047 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,6 @@ repos: - id: check-toml - id: end-of-file-fixer - id: trailing-whitespace - - id: requirements-txt-fixer - repo: https://github.com/PyCQA/isort rev: 5.10.1 diff --git a/README.md b/README.md index a2e3582..e0b9998 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,8 @@ pip install vkms - Сохранять переписки в программном формате (JSON), доступна многопоточная загрузка (`vkms dump`) - Сохранять переписки в удобном для чтения формате (`vkms parse`) + - TXT, за основу была взята структура формата [hikiko4ern'а](https://github.com/hikiko4ern/vk_dump) + - HTML, кастомная верстка, максимально приближенная к официальному приложению VK Android - Загружать вложения, доступна многопоточная загрузка (`vkms atch`) - Фото - Документы diff --git a/pyproject.toml b/pyproject.toml index 9df48d5..3c598ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools"] +requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"] build-backend = "setuptools.build_meta" [project] @@ -14,7 +14,7 @@ dependencies = [ "requests~=2.24", "Jinja2~=3.1", "minify-html~=0.8", - "vk>=3.0.dev" + "vk>=3.0" ] urls.Homepage = "https://github.com/YariKartoshe4ka/vk-messages-saver" readme = "README.md" @@ -46,5 +46,11 @@ version = {attr = "vkms.__version__"} [tool.setuptools.package-data] vkms = ["templates/*.html"] -[tool.flake8] -max-line-length = 100 +[tool.setuptools_scm] +write_to = "vkms/version.py" +write_to_template = ''' +"""Version information""" + +__version__ = '{version}' +__version_tuple__ = {version_tuple} +''' diff --git a/vkms/__init__.py b/vkms/__init__.py index b794fd4..a416973 100644 --- a/vkms/__init__.py +++ b/vkms/__init__.py @@ -1 +1,6 @@ -__version__ = '0.1.0' +from .version import __version__, __version_tuple__ + +__all__ = ( + __version__, + __version_tuple__ +)