Skip to content
Commits on Source (3)
PYTHON_VERSION="$(python3 -c 'from sys import version_info as v; print(f"{v[0]}.{v[1]}")')"
export PYTHONPATH="$PWD/__pypackages__/$PYTHON_VERSION:${PYTHONPATH:-}"
......@@ -4,6 +4,7 @@
*.py[cod]
.DS_Store
__pycache__/
__pypackages__/
.vagrant/
vendor/
Thumbs.db
......
---
include:
- project: shore/ci-templates
file: templates/pre-commit.yml
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.0.1
hooks:
- id: check-added-large-files
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: \.diff$
- repo: https://github.com/codespell-project/codespell.git
rev: v2.1.0
hooks:
- id: codespell
- repo: https://github.com/Yelp/detect-secrets.git
rev: v1.1.0
hooks:
- id: detect-secrets
- repo: https://gitlab.com/devopshq/gitlab-ci-linter.git
rev: v1.0.4
hooks:
- id: gitlab-ci-linter
args:
- "--server"
- https://git.shore.co.il
- repo: https://github.com/amperser/proselint.git
rev: 0.10.2
hooks:
- id: proselint
types: [plain-text]
exclude: LICENSE
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.3
hooks:
- id: yamllint
- repo: https://github.com/ambv/black.git
rev: 21.9b0
hooks:
- id: black
args:
- |
--line-length=79
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup.git
rev: v1.0.1
hooks:
- id: rst-linter
- repo: https://github.com/myint/rstcheck.git
rev: master
hooks:
- id: rstcheck
- repo: https://github.com/PyCQA/prospector.git
rev: 1.5.1
hooks:
- id: prospector
args:
- |-
--max-line-length=79
- |-
--with-tool=bandit
- |-
--without-tool=pep257
- |-
--doc-warnings
- |-
--test-warnings
- |-
--full-pep8
- |-
--strictness=high
- |-
--no-autodetect
additional_dependencies:
- bandit
- repo: https://gitlab.com/pycqa/flake8.git
rev: 3.9.2
hooks:
- id: flake8
args:
- |-
--doctests
additional_dependencies:
- flake8-bugbear
- repo: https://github.com/asottile/pyupgrade
rev: v2.23.2
hooks:
- id: pyupgrade
args: [--py36-plus]
Transmission feeder
###################
.. image:: https://git.shore.co.il/nimrod/transmission-feeder/badges/master/pipeline.svg
:target: https://git.shore.co.il/nimrod/transmission-feeder/-/commits/master
:alt: pipeline status
Add torrent to Transmission from RSS or Atom feeds.
License
-------
......
[build-system]
requires = ["setuptools>=40.9.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "transmission_feeder"
authors = [{name = "Nimrod Adar", email = "nimrod@shore.co.il"}]
readme = "README.rst"
dynamic = ["version", "description"]
license = {"file" = "LICENSE.txt"}
requires-python = ">=3.6"
keywords = ["torrent", "rss", "atom", "transmission"]
dependencies = [
"feedparser>=6.0.0",
"transmission-rpc>=3.2.0",
"ruamel.yaml>=0.17.0",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Communications :: File Sharing",
"Topic :: Internet",
"Topic :: Utilities",
]
[project.urls]
Home = "https://git.shore.co.il/nimrod/transmission-feeder"
[project.scripts]
transmission-feeder = "transmission_feeder"
import setuptools
if __name__ == "__main__":
setuptools.setup()
"Add torrent to Transmission from RSS or Atom feeds."
__version__ = "0.0.1"
"""Main entrypoint module."""
import argparse
import transmission_feeder.config
import transmission_feeder.db
import transmission_feeder.transmission
def build_arg_parser():
"""Build the argument parser."""
return
def main():
"""Main entrypoint."""
return
import ruamel.yaml # pylint: disable=import-error
def get_config():
"""Return a configuration dictionary.
This should be the definitive configuration item, after including
environment variables, default values, etc.
"""
return
import sqlite3
def get_conn(config):
"""Return a SQLite database connection."""
return
import transmission_rpc # pylint: disable=import-error
def get_client(config):
"""Return a transmission_rpc client object."""
return