Add documentation for poetry and adjust Changelog

This commit is contained in:
LecygneNoir 2020-04-01 11:38:08 +02:00
parent 72b47b95ec
commit 8faae852ea
3 changed files with 45 additions and 38 deletions

View file

@ -1,8 +1,9 @@
# Changelog # Changelog
## v0.8.1 ## v0.9.0
### Features ### Features
- Prismedia now uses [poetry](https://python-poetry.org) to allow easier installation usage and build, see the README
- Add two new options to schedule video by platform. You may now use youtubeAt and peertubeAt to prepare previews - Add two new options to schedule video by platform. You may now use youtubeAt and peertubeAt to prepare previews
## v0.8.0 ## v0.8.0

View file

@ -2,35 +2,41 @@
Scripting your way to upload videos to peertube and youtube. Works with Python 3.5+. Scripting your way to upload videos to peertube and youtube. Works with Python 3.5+.
## Dependencies [TOC]: #
Search in your package manager, or with `pip` use ``pip install -r requirements.txt``
- configparser ## Table of Contents
- docopt - [Installation](#installation)
- future - [Configuration](#configuration)
- google-api-python-client - [Peertube](#peertube)
- google-auth - [Youtube](#youtube)
- google-auth-httplib2 - [Usage](#usage)
- google-auth-oauthlib - [Features](#features)
- httplib2 - [Compatibility](#compatibility)
- oauthlib - [Sources](#sources)
- python-magic - [Contributors](#contributors)
- python-magic-bin (Windows only)
- requests ## Installation
- requests-oauthlib
- requests-toolbelt You may use pip to install requirements: `pip install -r requirements.txt`
- schema (*note:* requirements are generated via `poetry export -f requirements.txt`)
- tzlocal
- Unidecode Otherwise, you can use [poetry](https://python-poetry.org):
- uritemplate
- urllib3 ```
poetry install # installs the dependency in the current virtualenv,
or creates one specific to the project if no virtualenv is currently active
```
## Configuration ## Configuration
Edit peertube_secret and youtube_secret.json with your credentials. Generate sample files with `python -m prismedia.genconfig`.
Then edit `peertube_secret` and `youtube_secret.json` with your credentials.
### Peertube ### Peertube
Set your credentials, peertube server URL. Set your credentials, peertube server URL.
You can get client_id and client_secret by logging in your peertube website and reaching the URL: https://domain.example/api/v1/oauth-clients/local You can get client_id and client_secret by logging in your peertube website and reaching the URL:
https://domain.example/api/v1/oauth-clients/local
You can set ``OAUTHLIB_INSECURE_TRANSPORT`` to 1 if you do not use https (not recommended) You can set ``OAUTHLIB_INSECURE_TRANSPORT`` to 1 if you do not use https (not recommended)
### Youtube ### Youtube
@ -56,33 +62,32 @@ If you plan an larger usage, please consider creating your own youtube_secret fi
- Download JSON: Under the section "OAuth 2.0 client IDs". Save the file to your local system. - Download JSON: Under the section "OAuth 2.0 client IDs". Save the file to your local system.
- Save this JSON as your youtube_secret.json file. - Save this JSON as your youtube_secret.json file.
## How To ## Usage
Support only mp4 for cross compatibility between Youtube and Peertube Support only mp4 for cross compatibility between Youtube and Peertube
Simply upload a video: Upload a video:
``` ```
./prismedia_upload.py --file="yourvideo.mp4" python -m prismedia --file="yourvideo.mp4"
``` ```
Specify description and tags: Specify description and tags:
``` ```
./prismedia_upload.py --file="yourvideo.mp4" -d "My supa description" -t "tag1,tag2,foo" python -m prismedia --file="yourvideo.mp4" -d "My supa description" -t "tag1,tag2,foo"
``` ```
Provide a thumbnail: Provide a thumbnail:
``` ```
./prismedia_upload.py --file="yourvideo.mp4" -d "Video with thumbnail" --thumbnail="/path/to/your/thumbnail.jpg" python -m prismedia --file="yourvideo.mp4" -d "Video with thumbnail" --thumbnail="/path/to/your/thumbnail.jpg"
``` ```
Use a NFO file to specify your video options: Use a NFO file to specify your video options:
(See nfo_example.txt for more precise example)
``` ```
./prismedia_upload.py --file="yourvideo.mp4" --nfo /path/to/your/nfo.txt python -m prismedia --file="yourvideo.mp4" --nfo /path/to/your/nfo.txt
``` ```
@ -166,6 +171,7 @@ Languages:
- [x] Use a config file (NFO) file to retrieve videos arguments - [x] Use a config file (NFO) file to retrieve videos arguments
- [x] Allow to choose peertube or youtube upload (to resume failed upload for example) - [x] Allow to choose peertube or youtube upload (to resume failed upload for example)
- [x] Usable on Desktop (Linux and/or Windows and/or MacOS) - [x] Usable on Desktop (Linux and/or Windows and/or MacOS)
- [x] Different schedules on platforms to prepare preview
## Compatibility ## Compatibility

View file

@ -2,13 +2,13 @@
# coding: utf-8 # coding: utf-8
""" """
prismedia_upload - tool to upload videos to Peertube and Youtube prismedia - tool to upload videos to Peertube and Youtube
Usage: Usage:
prismedia_upload.py --file=<FILE> [options] prismedia --file=<FILE> [options]
prismedia_upload.py -f <FILE> --tags=STRING [options] prismedia -f <FILE> --tags=STRING [options]
prismedia_upload.py -h | --help prismedia -h | --help
prismedia_upload.py --version prismedia --version
Options: Options:
-f, --file=STRING Path to the video file to upload in mp4 -f, --file=STRING Path to the video file to upload in mp4