-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from alecastle/master
Implemented and tested CLI for multi-language support.
- Loading branch information
Showing
12 changed files
with
470 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
# to be run in the same directory as "setup.py" | ||
|
||
# Must use this unless there is an official release | ||
development_build() | ||
{ | ||
python3 -m venv env | ||
source env/bin/activate | ||
pip install --upgrade pip | ||
pip install -e . | ||
chmod +x bin/*.sh | ||
} | ||
|
||
development_build_uninstall() | ||
{ | ||
rm -rf env/ subtitle-downloader.egg-info/ | ||
pip uninstall . | ||
} | ||
|
||
# Version to use if offical release ever happens | ||
production_build() | ||
{ | ||
pip install subtitle-downloader | ||
} | ||
|
||
if [ $1 = "uninstall" ]; then | ||
development_build_uninstall | ||
exit 0 | ||
fi | ||
|
||
if [ $1 = "reinstall" ]; then | ||
development_build_uninstall | ||
fi | ||
|
||
development_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# to be run in the same directory as "setup.py" | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
# Forward all arguments directly to the program itself. | ||
# e.g. running "./bin/run.sh --list -v" is equivalent to | ||
# "python subtitle-downloader/subtitle_downloader.py --list -v" | ||
python $DIR/../subtitle-downloader/subtitle_downloader.py "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
for i in "$@" | ||
do | ||
python subtitle-downloader/subtitle_downloader.py "$i" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Subtitle downloader.""" | ||
|
||
|
||
from setuptools import setup | ||
|
||
|
||
setup( | ||
name='subtitle-downloader', | ||
version='0.1.0', | ||
packages=['subtitle-downloader'], | ||
include_package_data=True, | ||
install_requires=[ | ||
"beautifulsoup4==4.6.0", | ||
"bs4==0.0.1", | ||
"certifi==2017.4.17", | ||
"chardet==3.0.3", | ||
"click==6.7", | ||
"idna==2.5", | ||
"lxml==3.8.0", | ||
"requests==2.17.3", | ||
"sh==1.12.14", | ||
"urllib3==1.21.1" | ||
] | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"""Subtitle downloader package initialization.""" | ||
from subtitle_downloader import * |
Oops, something went wrong.