From d60a28e8137849d0a33722672b0dc29a132c103b Mon Sep 17 00:00:00 2001 From: AlfredoSequeida Date: Wed, 7 Oct 2020 07:06:25 -0700 Subject: [PATCH 1/2] add license --- LICENSE.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..44ada6c --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Alfredo Sequeida + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From e4478d4c118d6d33623fbb16a64eff4d7dec23c6 Mon Sep 17 00:00:00 2001 From: AlfredoSequeida Date: Wed, 7 Oct 2020 07:14:32 -0700 Subject: [PATCH 2/2] structured setup.py --- fvid/__init__.py | 2 ++ fvid/__main__.py | 5 ++++ fvid.py => fvid/fvid.py | 3 +- setup.py | 66 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 fvid/__init__.py create mode 100644 fvid/__main__.py rename fvid.py => fvid/fvid.py (99%) create mode 100644 setup.py diff --git a/fvid/__init__.py b/fvid/__init__.py new file mode 100644 index 0000000..134c169 --- /dev/null +++ b/fvid/__init__.py @@ -0,0 +1,2 @@ +__version__ = "0.0.1" + diff --git a/fvid/__main__.py b/fvid/__main__.py new file mode 100644 index 0000000..906d387 --- /dev/null +++ b/fvid/__main__.py @@ -0,0 +1,5 @@ +import sys +from fvid import main + +if __name__ == '__main__': + sys.exit(main()) diff --git a/fvid.py b/fvid/fvid.py similarity index 99% rename from fvid.py rename to fvid/fvid.py index 9a68f12..3e309ab 100644 --- a/fvid.py +++ b/fvid/fvid.py @@ -188,8 +188,7 @@ def setup(): os.makedirs(FRAMES_DIR) -if __name__ == "__main__": - +def main(): parser = argparse.ArgumentParser(description="save files as videos") parser.add_argument( "-e", "--encode", help="encode file as video", action="store_true" diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..deea82f --- /dev/null +++ b/setup.py @@ -0,0 +1,66 @@ +import os +import codecs + +from setuptools import setup + +with open("README.md", "r") as fh: + long_description = fh.read() + + +def read(rel_path): + here = os.path.abspath(os.path.dirname(__file__)) + with codecs.open(os.path.join(here, rel_path), "r") as fp: + return fp.read() + + +def get_version(rel_path): + for line in read(rel_path).splitlines(): + if line.startswith("__version__"): + delim = '"' if '"' in line else "'" + return line.split(delim)[1] + else: + raise RuntimeError("Unable to find version string.") + + +dynamic_version = get_version("fvid/__init__.py") + +setup( + name="fvid", + version=dynamic_version, + author="Alfredo Sequeida", + description="fvid is a project that aims to encode any file as a video using 1-bit color images to survive compression algorithms for data retrieval.", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/AlfredoSequeida/fvid", + download_url="https://github.com/AlfredoSequeida/fvid/archive/" + + dynamic_version + + ".tar.gz", + keywords="fvid youtube videos files bitdum hexdump ffmpeg video file", + platforms="any", + classifiers=[ + "Intended Audience :: End Users/Desktop", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Operating System :: Microsoft :: Windows :: Windows 10", + "Operating System :: Microsoft :: Windows :: Windows 8", + "Operating System :: Microsoft :: Windows :: Windows 8.1", + "Operating System :: MacOS :: MacOS X", + "Operating System :: POSIX :: Linux", + ], + license="MIT", + packages=["fvid"], + install_requires=[ + "bitstring", + "python-magic", + "pillow", + "numpy", + "tqdm", + "ffmpeg-python", + ], + python_requires=">=3", + entry_points={"console_scripts": ["fvid = fvid.fvid:main"]}, +)