Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
finalizing 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shoeffner committed Nov 25, 2016
1 parent abba2d3 commit a2373e7
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 21 deletions.
36 changes: 30 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Packs the package into the dist directory
# Installs the package locally
install: uninstall package
pip install dist/cvloop*.tar.gz

# Packs the package into the dist directory and signs it
package: clean doc
python setup.py sdist
gpg --detach-sign --armor dist/cvloop*.tar.gz

# Uninstalls the package from a local installation
uninstall:
pip freeze | grep cvloop > /dev/null; if [ $$? -eq 0 ]; then pip uninstall cvloop -y ; fi

# Installs the package locally
install: uninstall package
pip install dist/cvloop-0.1.0.tar.gz
pip freeze | grep cvloop > /dev/null ; \
if [ $$? -eq 0 ]; then \
pip uninstall cvloop -y ; \
fi

# Cleans up: Removes the packed package and sanitizes the examples file.
clean:
Expand All @@ -18,3 +22,23 @@ clean:
# Creates the documentation and updates the functions ipynb.
doc:
python tools/create_functions_ipynb.py examples/cvloop_functions.ipynb

# Publishes to pypitest
testpublish:
@read -p "Enter the name of this package to verify upload to pypi test: " name ; \
if [ "$$name" == "cvloop" ]; then \
python setup.py register -r pypitest ; \
python setup.py sdist upload -r pypitest ; \
else \
echo 'Sorry, this was wrong. Please try again.' ; \
fi

# Publishes to pypi
publish: package
@read -p "Enter the name of this package to verify upload to pypi: " name ; \
if [ "$$name" == "cvloop" ]; then \
python setup.py register -r pypi ; \
python setup.py upload -r pypi ; \
else \
echo 'Sorry, this was wrong. Please try again.' ; \
fi
34 changes: 23 additions & 11 deletions README.md → README.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
# cvloop
cvloop
======

Provides cvloop, a way to show opencv video loops, especially in jupyter notebooks.
Provides cvloop, a way to show opencv video loops. Designed for jupyter notebooks.

**Simple example**: Show webcam feed.

.. code-block:: python
%matplotlib notebook
from cvloop import cvloop
cvloop()
**More complex example**: Show webcam feed side by side with inverted image.

.. code-block:: python
%matplotlib notebook
from cvloop import cvloop
cvloop(function=lambda frame: 255 - frame, side_by_side=True)
**Complex example**: Show video file with background extraction (See [OpenCV Documentation](http://docs.opencv.org/3.1.0/db/d5c/tutorial_py_bg_subtraction.html)).
**Complex example**: Show video file with background extraction (See `OpenCV Documentation`_).

.. code-block:: python
%matplotlib notebook
from cvloop import cvloop
Expand All @@ -26,16 +33,21 @@ Provides cvloop, a way to show opencv video loops, especially in jupyter noteboo
cvloop('test.avi', function=mog2, side_by_side=True)
**More examples**: For more examples check out the [examples notebook](examples/cvloop_examples.ipynb).
**More examples**: For more examples check out the `examples notebook`_.

Requirements
------------

## Requirements
- Python 3 (tested with 3.6)
- OpenCV 3.1
- Jupyter

- Python 3 (tested with 3.6)
- OpenCV 3.1
- Jupyter
Dependencies
------------

## Dependencies
- matplotlib
- numpy

- matplotlib
- numpy
.. _`OpenCV Documentation`: http://docs.opencv.org/3.1.0/db/d5c/tutorial_py_bg_subtraction.html
.. _`examples notebook`: examples/cvloop_examples.ipynb

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[metadata]
description-file = README.md
description-file = README.rst
18 changes: 15 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
from distutils.core import setup

VERSION = '0.1.0'
import re
import sys


VERSION = '0.1.0' # x.y.z[-dev#]
REPOSITORY = 'https://github.com/shoeffner/cvloop'

README = ''
with open('README.rst', 'r') as f:
README = f.read()
README = re.sub(r' _(.+): ([^(http)].+)', r' _\1: {}/blob/master/\2'.format(REPOSITORY), README)

setup(
name = 'cvloop',
version = VERSION,
description = 'cvloop allows online video transformation and evaluation with OpenCV. Designed for jupyter notebooks.',
long_description = README,
author = 'Sebastian Höffner',
author_email = '[email protected]',
url = 'https://github.com/shoeffner/cvloop',
download_url = 'https://github.com/shoeffner/cvloop/tarball/{}'.format(VERSION),
url = REPOSITORY,
download_url = '{}/tarball/{}'.format(REPOSITORY, VERSION),
packages = ['cvloop'],
classifiers = [
'Development Status :: 3 - Alpha',
Expand All @@ -22,6 +33,7 @@
'Programming Language :: Python :: 3.6',
'Topic :: Multimedia :: Video :: Display',
],
license = 'MIT',
keywords = [
'OpenCV', 'cv2', 'video', 'loop', 'jupyter', 'notebook'
],
Expand Down

0 comments on commit a2373e7

Please sign in to comment.