Restructure project

This commit is contained in:
Augusto Gunsch 2021-11-14 18:06:21 -03:00
parent 7120d76aad
commit cb142d3e30
No known key found for this signature in database
GPG Key ID: F7EEFE29825C72DC
7 changed files with 108 additions and 54 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
dist/
*.egg-info/
__pycache__/

View File

@ -1,6 +1,12 @@
# fsub # fsub
`fsub` is a Python script for cleaning, editing and fixing a SubRip (.srt) file `fsub` is a Python script for cleaning, editing and fixing a SubRip (.srt) file
# Installation
Through Python's pip:
```
pip install fsub
```
# Usage # Usage
``` ```
usage: fsub [-h] [-c] [-s MS] [-n] [-f FILE] file [file ...] usage: fsub [-h] [-c] [-s MS] [-n] [-f FILE] file [file ...]

6
build.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
rm -rv dist
python3 -m build
# Upload to PyPI with:
# python3 -m twine upload --repository pypi dist/*

6
pyproject.toml Normal file
View File

@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"

28
setup.cfg Normal file
View File

@ -0,0 +1,28 @@
[metadata]
name = fsub
version = 0.0.1
author = Augusto Lenz Gunsch
author_email = augustogunsch@tutanota.com
description = CLI SubRip editor
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/augustogunsch/fsub
project_urls =
Bug Tracker = https://github.com/augustogunsch/fsub/issues
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Operating System :: OS Independent
[options]
package_dir =
= src
packages = find:
python_requires = >=3.9
[options.packages.find]
where = src
[options.entry_points]
console_scripts =
fsub = fsub.fsub:main

0
src/fsub/__init__.py Normal file
View File

View File

@ -188,6 +188,7 @@ def process_file(args, file):
output.write(os.linesep) output.write(os.linesep)
def main():
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description='Fix, edit and clean SubRip (.srt) files.', description='Fix, edit and clean SubRip (.srt) files.',
add_help=True add_help=True
@ -252,3 +253,7 @@ for file in args.files:
for file in args.files: for file in args.files:
process_file(args, file) process_file(args, file)
if __name__ == '__main__':
main()