|
| 1 | +# Add logo post process |
| 2 | + |
| 3 | +Add or change channel logos in xmltv files |
| 4 | + |
| 5 | +Content of the logos file |
| 6 | +------------------------- |
| 7 | + |
| 8 | +The syntax for the logo ini file is `channel name, logo link`. Each channel on its own line |
| 9 | + |
| 10 | +- The `channel name` must be the same as the `channel_id` value in the channel section of the input file |
| 11 | +- Lines starting with `*` are considered a comment text |
| 12 | + |
| 13 | +**Example logos file content:** |
| 14 | + |
| 15 | +```xml |
| 16 | +TV Camara , https://www.net.com.br/imagens/logo/tv_camara-1680_95x39.png |
| 17 | +TV Brasil , https://www.net.com.br/imagens/logo/tv_brasil-1683_95x39.png |
| 18 | +PREMIERE HD 3 , https://www.net.com.br/imagens/logo/premiere_hd_3_-1175_95x39.png |
| 19 | +``` |
| 20 | + |
| 21 | +## .NET version (add_logo.exe) |
| 22 | + |
| 23 | +Version 1.0.0 Jan van Straaten , November 2020 |
| 24 | + |
| 25 | +How to use |
| 26 | +---------- |
| 27 | + |
| 28 | +**Specify the following command line arguments following the syntax `/name=value` or `/name:value`:** |
| 29 | + |
| 30 | +- `/in=xmltv`: input file name. E.g. /in=guide.xml |
| 31 | +- `/out=xmltv`: output file name. This is an optional and default value is 'guide_logos.xml'. |
| 32 | + Cannot be the same as `/in`. E.g. /out=epg_logos.xml |
| 33 | +- `/logos=name`: Name of the file with the new logos. E.g. /logos=my_logos.ini |
| 34 | +- `/h` or `/?`: Print this help. Optional and takes no argument |
| 35 | + |
| 36 | +**Example of a valid command line:** |
| 37 | + |
| 38 | +```cmd |
| 39 | +add_logo.exe /in=guide.xml /out=epg_logos.xml /logos=logos.ini |
| 40 | +``` |
| 41 | + |
| 42 | +**Example as webgrab+plus postprocess plugin:** |
| 43 | + |
| 44 | +```xml |
| 45 | +<postprocess run=\"y\" grab=\"n\">add_logo.exe /in=guide+2.xml /logos=logos.txt</postprocess> |
| 46 | +``` |
| 47 | + |
| 48 | +# Python version (add_logo.py) |
| 49 | + |
| 50 | +Version 1.0.0 Thiago Crepaldi, December 2023 |
| 51 | + |
| 52 | +The python version internally works the ame way as the .NET version. The only difference is how the script is invoked by the user. |
| 53 | + |
| 54 | +## Requirements |
| 55 | + |
| 56 | +* Python 3 |
| 57 | + |
| 58 | +How to use |
| 59 | +---------- |
| 60 | + |
| 61 | +*add_logo.py [-h] --xmltv_in XMLTV_IN --logos LOGOS [--xmltv_out XMLTV_OUT] [--version VERSION] [--usage]* |
| 62 | + |
| 63 | +Options |
| 64 | +------- |
| 65 | + - `-h` or `--help`: Show this help message and exit |
| 66 | + - `--xmltv_in XMLTV_IN`: Path to XMLTV Guide file |
| 67 | + - `--logos LOGOS`: Path to Logos file |
| 68 | + - `--xmltv_out XMLTV_OUT`: Path to updated XMLTV Guide file that will be created |
| 69 | + - `--version VERSION`: Set script version |
| 70 | + |
| 71 | +**Example of a valid command line:** |
| 72 | + |
| 73 | +```sh |
| 74 | +/usr/bin/python3 add_logo.py --xmltv_in=guide.xml --logos=my_logos.ini --xmltv_out guide_with_logo.xml |
| 75 | +``` |
| 76 | + |
| 77 | +**Example as webgrab+plus postprocess plugin:** |
| 78 | + |
| 79 | +```xml |
| 80 | +<postprocess run=\"y\" grab=\"n\">python3 add_logo.py --xmltv_in=guide.xml --logos=my_logos.ini --xmltv_out guide_with_logo.xml</postprocess> |
| 81 | +``` |
0 commit comments