Browse Source

Use Python 3

master
Jakub Valenta 1 year ago
parent
commit
6ba5054ad3
2 changed files with 31 additions and 47 deletions
  1. +25
    -32
      README.md
  2. +6
    -15
      setup.py

+ 25
- 32
README.md View File

@@ -5,42 +5,30 @@

## Installation

This software requires Python 2.7. See [Python's website](https://www.python.org/) for installation instructions.
### Mac

When you have Python 2.7 installed, install required packages with pip (Python's package management system):

```
pip2 install listio
pip2 install requests
pip2 install imdbpy
pip2 install "git+https://github.com/agonzalezro/python-opensubtitles#egg=python-opensubtitles"
pip2 install pysrt
pip2 install termcolor
pip2 install moviepy
``` shell
$ brew install python
$ pip install --user --upgrade .
```

Then you can call the executables:
### Arch Linux

```
./tv-series-download-subs -h
./tv-series-find-episode-ids -h
./tv-series-search-subs -h
./tv-series-matches-approve -h
./tv-series-matches-check-approved -h
./tv-series-matches-print-approved -h
``` shell
# pacman -S python
$ pip install --user --upgrade .
```

Or you can install this software as a Python package, which will also install all the dependencies and make the executables available globally:
### Other systems

```
python2 setup.py install
Install these dependencies manually:

tv-series-download-subs -h
tv-series-find-episode-ids -h
tv-series-search-subs -h
tv-series-matches-approve -h
tv-series-matches-check-approved -h
tv-series-matches-print-approved -h
- Python 3
Then run:
``` shell
$ pip install --user --upgrade .
```

## Usage
@@ -49,7 +37,9 @@ This software works in several phases:

### 1. Find IMDB IDs for all episodes of passed TV series

Create a file containing the names of the TV series you are interested in. One title per line. Empty lines and lines starting with the hash sign (`#`) are ignored. Example:
Create a file containing the names of the TV series you are interested in. One
title per line. Empty lines and lines starting with the hash sign (`#`) are
ignored. Example:

my_series.txt:

@@ -78,9 +68,11 @@ Episode IDs and titles for all the TV series mentioned in `my_series.txt` will b

### 2. Download subtitles for passed IMDB IDs

Sign up at [OpenSubtitles.org](https://www.opensubtitles.org/). Consider buying a VIP account, otherwise you will hit the download limit very soon.
Sign up at [OpenSubtitles.org](https://www.opensubtitles.org/). Consider buying
a VIP account, otherwise you will hit the download limit very soon.

Set environment variables `OPENSUB_USER` and `OPENSUB_PASSWD` to contain your OpenSubtitles.org credentials.
Set environment variables `OPENSUB_USER` and `OPENSUB_PASSWD` to contain your
OpenSubtitles.org credentials.

```
export OPENSUB_USER='you@example.com'
@@ -93,7 +85,8 @@ Then call:
tv-series-download-subs -i my_episodes.csv -o my_subs/
```

All the episodes's subtitles will be downloaded to the directory `my_subs/` as SRT files.
All the episodes's subtitles will be downloaded to the directory `my_subs/` as
SRT files.

### 3. Search downloaded subtitles



+ 6
- 15
setup.py View File

@@ -1,7 +1,8 @@
from setuptools import setup, find_packages
from codecs import open
from os import path

from setuptools import find_packages, setup

here = path.abspath(path.dirname(__file__))

with open(path.join(here, 'README.md'), encoding='utf-8') as f:
@@ -9,40 +10,30 @@ with open(path.join(here, 'README.md'), encoding='utf-8') as f:

setup(
name='tv_series_tools',

version='1.0.0',

version='1.1.0',
description='Tools to work with TV series\'s subtitles.',
long_description=long_description,

url='https://lab.saloun.cz/jakub/tv-series-tools',

author='Jakub Valenta',
author_email='jakub@jakubvalenta.cz',

license='Apache Software License',

classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Artistic Software',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
],

keywords='',

packages=find_packages(),

install_requires=[
'requests',
'imdbpy',
'python-opensubtitles>=0.2.dev0',
'python-opensubtitles',
'pysrt',
'termcolor',
'moviepy',
],

entry_points={
'console_scripts': [
'tv-series-download-subs='
@@ -57,6 +48,6 @@ setup(
'tv_series.approve_matches:check_positive_answers',
'tv-series-matches-print-approved='
'tv_series.approve_matches:print_positive_answers',
],
]
},
)

Loading…
Cancel
Save