Skip to content

Commit

Permalink
Move to setuptools from Pipenv
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronmurphy committed Apr 1, 2024
1 parent 21948be commit 84466fe
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 366 deletions.
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python 3.12.2
2 changes: 0 additions & 2 deletions Brewfile

This file was deleted.

15 changes: 0 additions & 15 deletions Pipfile

This file was deleted.

326 changes: 0 additions & 326 deletions Pipfile.lock

This file was deleted.

40 changes: 25 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
organise-tv-shows
=================
# organise_tv_shows
A python script to organise episodes of TV shows into your library.

Install requirements
--------------------
```bash
$ brew bundle
$ pipenv install
## Installation (macOS)
```shell
$ brew instal asdf
```
[Configure your shell](https://asdf-vm.com/guide/getting-started.html#_3-install-asdf) for asdf. You will need to
restart your terminal session.
```shell
$ asdf plugin add python
$ asdf install
$ pip install .
```

Configure
---------
```bash
$ cp config.yml.dist config.yml
## Configure
Create a config file in its default location.
```shell
$ mkdir -p ~/.config/organise_tv_shows
$ cp config.yml.dist ~/.config/organise_tv_shows/config.yml
```
Configure the values in config.yml.

Running
-------
```bash
$ pipenv run python .
## Usage
```shell
$ organise_tv_shows

# Run with a different config file (~/.config/organise_tv_shows/config.other.yml)
$ organise_tv_shows --config-file config.other.yml

# Run with a config file outside of the default config directory
$ organise_tv_shows --config-file /usr/local/etc/organise_tv_shows/config.yml
```
7 changes: 0 additions & 7 deletions __main__.py

This file was deleted.

1 change: 1 addition & 0 deletions organise_tv_shows/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '2.0.0'
4 changes: 4 additions & 0 deletions organise_tv_shows/main.py → organise_tv_shows/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ def main():

processor = Processor(config)
processor.process()


if __name__ == '__main__':
main()
7 changes: 6 additions & 1 deletion organise_tv_shows/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os

DEFAULT_CONFIG_FILENAME = 'config.yml'
DEFAULT_CONFIG_DIR = '~/.config/organise_tv_shows'


def get_args():
Expand All @@ -20,6 +21,10 @@ def get_args():

# Support relative paths
if not os.path.isabs(config_file):
config_file = os.path.join(os.path.dirname(os.path.realpath(__file__ + '/..')), config_file)
config_file = os.path.join(DEFAULT_CONFIG_DIR, config_file)

# Support homedir paths
if config_file.startswith('~'):
config_file = os.path.expanduser(config_file)

return {'config_file': config_file}
Empty file.
Empty file.
Empty file.
35 changes: 35 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[metadata]
name = organise_tv_shows
version = attr: organise_tv_shows.__version__
author = Cameron Murphy
author_email = [email protected]
description = A CLI tool to organise episodes of TV shows into your library.
long_description = file: README.md
keywords = tv, tvdb, show, episode, library, plex
license = MIT
classifiers =
Programming Language :: Python :: 3
project_urls =
GitHub = https://github.com/cameronmurphy/organise_tv_shows

[options]
packages = find:
install_requires =
pydantic
pyyaml
requests
tvdb-v4-official
python_requires = >=3.8

[options.packages.find]
include =
organise_tv_shows
organise_tv_shows.*

[options.entry_points]
console_scripts =
organise_tv_shows = organise_tv_shows.__main__:main

[options.extras_require]
dev =
wheel
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from setuptools import setup

setup()

0 comments on commit 84466fe

Please sign in to comment.