https://github.com/mueslo/pythonbits
A Python pretty printer for generating attractive movie descriptions with screenshots.
https://github.com/mueslo/pythonbits
automation form-submission media mediainfo torrent
Last synced: 28 days ago
JSON representation
A Python pretty printer for generating attractive movie descriptions with screenshots.
- Host: GitHub
- URL: https://github.com/mueslo/pythonbits
- Owner: mueslo
- License: gpl-3.0
- Created: 2018-01-26T04:52:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-06T16:32:17.000Z (over 3 years ago)
- Last Synced: 2025-03-16T12:48:42.773Z (about 2 months ago)
- Topics: automation, form-submission, media, mediainfo, torrent
- Language: Python
- Homepage:
- Size: 1.45 MB
- Stars: 29
- Watchers: 7
- Forks: 10
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# pythonBits
[](https://GitHub.com/mueslo/pythonBits/releases/)
[](https://GitHub.com/mueslo/pythonBits/releases/)
[](https://pypi.python.org/pypi/pythonbits/)
[](https://pypi.python.org/pypi/pythonbits/)
[](https://github.com/mueslo/pythonBits/commits/master)
[](https://github.com/mueslo/pythonbits/blob/master/LICENSE)
[](https://travis-ci.org/mueslo/pythonBits)
#### A Python description generator for movies and TV shows## Install
1. (Optional, highly recommended) Set up a virtualenv to avoid polluting your system with dependencies.
- with virtualenvwrapper: `mkvirtualenv pythonbits`
- activate the virtualenv with `workon pythonbits`
2. Install pythonBits in one of the following ways
- install via `pip install pythonbits`
- clone and `pip install .`
- pipx
- (dev) clone, install requirements from setup.py and run as `python -m pythonbits` instead of `pythonbits`
3. Install mediainfo, ffmpeg and mktorrent>=1.1 such that they are accessible for pythonBits
- you can also manually specify things such as the torrent file or screenshots, this will prevent the programs from being called, removing the dependencyIf you don't want to use a virtualenv but keep system pollution with PyPI packages to a minimum, install via `pip install --user`. For more information, visit [this site](https://packaging.python.org/guides/installing-using-pip-and-virtualenv/).
## Usage
```
usage: pythonbits [-h] [--version] [-v] [-c {tv,movie}] [-u FIELD VALUE] [-i]
[-t] [-s] [-d] [-b] [-f FIELD [FIELD ...]]
[--num-cast NUM_CAST] [--num-screenshots NUM_SCREENSHOTS]
PATH [TITLE]
```
Use `pythonbits --help` to get a more extensive usage overview## Examples
pythonBits will attempt to guess as much information as possible from the filename. Unlike in previous releases, explicitly specifying a category or title is usually not necessary. PATH can also reference a directory, e.g. for season packs.In most cases it is enough to just run `pythonbits ` to generate a media description. If running the desired features requires uploading data to remote servers, you will be prompted to confirm this finalization before it occurs.
* Print mediainfo: `pythonbits -i `, equivalent to `pythonbits -f mediainfo `
* Make screenshots: `pythonbits -s `
* Write a description: `pythonbits -d `
* Make a torrent file: `pythonbits -t `
* Generate complete submission and post it: `pythonbits -b ` (Note: YOU are responsible for your uploads)
* Generate complete submission, use supplied torrent file and tags: `pythonbits -b -u torrentfile -u tags "whatever,tags.you.like" `In case the media title and type cannot be guessed from the path alone, you can explicitly specify them, e.g. `pythonbits "Doctor Who (2005) S06"`or `pythonbits -c movie`.
You can increase the verbosity of log messages printed to the screen by appending `-v`. This would print `INFO` messages. To print `DEBUG` messages, append twice, i.e. `-vv`.
You can also import pythonbits to use in your own Python projects. For reference on how to best use it, take a look at `__main__.py`. Once you have created an appropriate `Submission` instance `s`, you can access any desired feature, for example `s['title']`, `s['tags']` or `s['cover']`.