Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Pipfile
build/
dist/
vidsum.egg-info/
*.pyc
31 changes: 12 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,32 @@ This is the community driven approach towards the summarization by the **[OpenGe

# Installing vidsum

In order to install vidsum, simply clone the repository to a local directory. You can do this by running the following commands:
```sh
$ git clone https://github.com/OpenGenus/vidsum.git

$ cd vidsum/code
In order to install vidsum:
- simply clone the repository to a local directory.
- install pbr as a dependency for building the package.
- install vidsum

```
Please note that vidsum requires the following packages to be installed:
- [pysrt](https://github.com/byroot/pysrt)
- [imageio](https://imageio.github.io/)
- [moviepy](https://zulko.github.io/moviepy/)
- [pytube](https://github.com/nficano/pytube)
- [sumy](https://github.com/miso-belica/sumy)

If you do not have these packages installed, then you can do so by running this command:
You can do this by running the following commands:
```sh
$ pip install -r requirements.txt

$ git clone https://github.com/OpenGenus/vidsum.git
$ pip install pbr
$ python setup.py install
```
The previous command automaticaly install all requirements needed.

# Usage

To generate summary of a video file `sample.mp4` with subtitle file `subtitle.srt` :
```python
python sum.py -i sample.mp4 -s subtitle.srt
vidsum -i sample.mp4 -s subtitle.srt
```
To summarize a YouTube video from its url:
```python
python sum.py -u <url>
vidsum -u <url>
```
If you want to remain the downloaded YouTube video and subtitles:
```python
python sum.py -u <url> -k
vidsum -u <url> -k
```

# Future developments
Expand Down
32 changes: 32 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[metadata]
name = vidsum
home-page = https://github.com/OpenGenus/vidsum
summary = Generate summary of any video anywhere and anytime
description-file =
README.md
author = OpenGenus
author-email = team@opengenus.org
licence = GNU General Public License v3 (GPLv3)
classifier =
Development Status :: 5 - Production/Stable
Intended Audience :: Information Technology
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Operating System :: POSIX
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6

[files]
packages =
vidsum

[entry_points]
console_scripts =
vidsum = vidsum.__main__:main

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

setup(
requires=['pbd'],
pbr=True,
long_description_content_type="text/markdown",
)
Empty file added vidsum/__init__.py
Empty file.
6 changes: 5 additions & 1 deletion code/sum.py → vidsum/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def download_video_srt(subs):
return movie_filename, subtitle_filename


if __name__ == '__main__':
def main():
parser = argparse.ArgumentParser("Watch videos quickly")
parser.add_argument('-i', '--video-file', help="Input video file")
parser.add_argument('-s', '--subtitles-file',
Expand Down Expand Up @@ -249,3 +249,7 @@ def download_video_srt(subs):
os.remove(movie_filename)
os.remove(subtitle_filename)
print("[sum.py] Remove the original files")


if __name__ == '__main__':
main()
File renamed without changes.
File renamed without changes.