From 881a01f862f3ed53e6d12d80b1c000d1a206d5fe Mon Sep 17 00:00:00 2001 From: LecygneNoir Date: Fri, 3 Apr 2020 12:44:29 +0200 Subject: [PATCH] Write documentation about the new NFO usage and possibilities --- CHANGELOG.md | 9 +++++---- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36e16c0..aeb8b6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,13 @@ ## v0.9.0 ## Breaking changes -Now using poetry for packaging and installing! It's now easier to maintain and publish package, but means changes to use prismedia. -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`. +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 need to use `python -m prismedia` (or even directly `prismedia` if you install with poetry) instead of `./prismedia_upload.py`. ### 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 + - 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 (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 diff --git a/README.md b/README.md index 5be531c..17a006a 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Scripting your way to upload videos to peertube and youtube. Works with Python 3 - [Peertube](#peertube) - [Youtube](#youtube) - [Usage](#usage) +- [Enhanced use of NFO](#enhanced-use-of-nfo) - [Features](#features) - [Compatibility](#compatibility) - [Sources](#sources) @@ -149,6 +150,44 @@ Languages: 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 - [x] Youtube upload