Skip to content

Latest commit

 

History

History
87 lines (55 loc) · 1.95 KB

install.md

File metadata and controls

87 lines (55 loc) · 1.95 KB

How to install opensub-utils

Dependencies

  • A Unix-like OS.

    I develop, test and use it on Debian GNU/Linux (sid). I did not test it on any other OS, though I believe it should run unmodified or with minor modifications on any recent Linux distribution or other POSIX OS.

  • python3

    Likely you have it already. Check it with python3 --version. Python2 is no longer supported.

  • docopt 0.6.1+

    apt install python3-docopt or pip can automatically install it for you

  • depending on your needs

    apt install python3-setuptools python3-pip python3-nose

Get the source

# Pick a directory to store the source.
mkdir ~/src
cd ~/src

# Download opensub-utils...

# ...either by cloning the repository:
git clone https://github.com/rubasov/opensub-utils
cd opensub-utils

# ...or by downloading a tarball (pick the latest tag from github):
wget https://github.com/rubasov/opensub-utils/archive/$TAG.tar.gz
tar xvzf $TAG.tar.gz
cd opensub-utils-$TAG

Install methods

Don't actually install, run from working copy

It works in place, without installation.

# Download docopt.py from github to src/lib/ .
wget -O ... http://.../docopt.py

# Add src/bin/ to your PATH.
vi ~/.bashrc

Install by pip.

# pip for python3 is available as Debian package python3-pip
# if you don't have it yet.

# Install opensub-utils (as a non-privileged user to your home) by pip.
cd src/
python3 -m pip install .

# Add $HOME/.local/bin/ to your PATH if you didn't do that already.
vi ~/.bashrc

Test the result

opensub-hash --version
opensub-hash --help
opensub-get --version
opensub-get --help

Uninstall

python3 -m pip uninstall opensub

Running the test suite

by hand

apt install pep8
ls src/test/test_*.py | xargs -n1 python3

by nose ;-)

apt install pep8 python3-nose
nosetests3