Write documentation about the new NFO usage and possibilities

This commit is contained in:
LecygneNoir 2020-04-03 12:44:29 +02:00
parent ef5d6b843a
commit 881a01f862
2 changed files with 44 additions and 4 deletions

View file

@ -3,12 +3,13 @@
## v0.9.0 ## v0.9.0
## Breaking changes ## Breaking changes
Now using poetry for packaging and installing! It's now easier to maintain and publish package, but means changes to use prismedia. Now using poetry for packaging and installing! It's easier to maintain and publish package, but means changes when using prismedia from command line.
Prismedia is now seen as a python module, so you may now use `python -m prismedia` (or even directly `prismedia` if you install with poetry) instead of `./prismedia_upload.py`. Prismedia is now seen as a python module, so you need to use `python -m prismedia` (or even directly `prismedia` if you install with poetry) instead of `./prismedia_upload.py`.
### Features ### Features
- Prismedia now uses [poetry](https://python-poetry.org) to allow easier installation usage and build, see the README - Prismedia now uses [poetry](https://python-poetry.org) to allow easier installation usage and build, see the README (fix #34)
- 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 (fix #43)
- Enhance the NFO system to allow a hierarchical loading of multiple NFO, with priorities. See README and [prismedia/samples](prismedia/samples) for details (fix #11)
## v0.8.0 ## v0.8.0

View file

@ -10,6 +10,7 @@ Scripting your way to upload videos to peertube and youtube. Works with Python 3
- [Peertube](#peertube) - [Peertube](#peertube)
- [Youtube](#youtube) - [Youtube](#youtube)
- [Usage](#usage) - [Usage](#usage)
- [Enhanced use of NFO](#enhanced-use-of-nfo)
- [Features](#features) - [Features](#features)
- [Compatibility](#compatibility) - [Compatibility](#compatibility)
- [Sources](#sources) - [Sources](#sources)
@ -149,6 +150,44 @@ Languages:
Japanese, Korean, Mandarin, Portuguese, Punjabi, Russian, Spanish Japanese, Korean, Mandarin, Portuguese, Punjabi, Russian, Spanish
``` ```
## Enhanced use of NFO
Since Prismedia v0.9.0, the NFO system has been improved to allow hierarchical loading.
First of all, if you already used nfo, either with `--nfo` or by using `videoname.txt`, nothing changes :-)
But you are now able to use a more flexible NFO system, by using priorities.
You'll find a complete set of samples in the [prismedia/samples](prismedia/samples) directory.
Let's take the following directory as an example:
```
$ tree Recipes/
Recipes/
├── cli_nfo.txt
├── nfo.txt
├── samples.txt
├── yourvideo1.mp4
├── yourvideo1.txt
├── yourvideo1.jpg
├── yourvideo2.mp4
└── yourvideo2.txt
```
By using
```
prismedia --file=/path/to/Recipes/yourvideo1.mp4 --nfo=/path/to/Recipes/cli_nfo.txt --cca
```
Prismedia will:
- look for options in `nfo.txt`
- look for options in `samples.txt` (from directory name) and erase any previous conflicting options
- look for options in `yourvideo1.txt` (from video name) and erase any previous conflicting options
- look for options in `cli_nfo.txt` (from the `--nfo` in command line) and erase any previous conflicting options
- erase any previous option regarding CCA as it's specified in cli with `--cca`
- take `yourvideo1.jpg` as thumbnail if no other files has been specified in previous NFO
In other word, Prismedia will now use nfo.txt, then directory_name.txt, then videoname.txt, then cli_nfo.txt, and finally the option directly passed in cli.
It allows to specify more easily default options for an entire set of video, directory, playlist and so on.
## Features ## Features
- [x] Youtube upload - [x] Youtube upload