generated from pavel.muhortov/template-bash
add publisher.sh
This commit is contained in:
parent
16b14c1b3a
commit
f878aa1676
46
README.md
46
README.md
|
@ -3,6 +3,7 @@ PTZ IP-Camera management
|
||||||
|
|
||||||
* [`sequences.sh`](https://git.hmp.today/pavel.muhortov/cctv-scheduler#sequences-sh)
|
* [`sequences.sh`](https://git.hmp.today/pavel.muhortov/cctv-scheduler#sequences-sh)
|
||||||
* [`converter.sh`](https://git.hmp.today/pavel.muhortov/cctv-scheduler#converter-sh)
|
* [`converter.sh`](https://git.hmp.today/pavel.muhortov/cctv-scheduler#converter-sh)
|
||||||
|
* [`publisher.sh`](https://git.hmp.today/pavel.muhortov/cctv-scheduler#publisher-sh)
|
||||||
|
|
||||||
____
|
____
|
||||||
## `sequences.sh`
|
## `sequences.sh`
|
||||||
|
@ -11,7 +12,8 @@ ____
|
||||||
> Additionally:
|
> Additionally:
|
||||||
> - getting temperature from ds-18b20 over SSH,
|
> - getting temperature from ds-18b20 over SSH,
|
||||||
> - saving pictures to FTP.
|
> - saving pictures to FTP.
|
||||||
> - This is only a local "proof of conept" for testing and debugging.
|
>
|
||||||
|
> This is only a local "proof of conept" for testing and debugging.
|
||||||
|
|
||||||
**Dependencies:**
|
**Dependencies:**
|
||||||
> - bash (tested version 5.1.4 on Debian GNU/Linux 11)
|
> - bash (tested version 5.1.4 on Debian GNU/Linux 11)
|
||||||
|
@ -38,6 +40,8 @@ ____
|
||||||
## `converter.sh`
|
## `converter.sh`
|
||||||
**Description:**
|
**Description:**
|
||||||
> JPEG to MP4 converter.
|
> JPEG to MP4 converter.
|
||||||
|
>
|
||||||
|
> This is only a local "proof of conept" for testing and debugging.
|
||||||
|
|
||||||
**Dependencies:**
|
**Dependencies:**
|
||||||
> - bash (tested version 5.1.4 on Debian GNU/Linux 11)
|
> - bash (tested version 5.1.4 on Debian GNU/Linux 11)
|
||||||
|
@ -81,5 +85,43 @@ Example usage with cron:
|
||||||
7 0 * * 1 bash /home/user/cctv-scheduler/converter.sh qn - -w
|
7 0 * * 1 bash /home/user/cctv-scheduler/converter.sh qn - -w
|
||||||
30 0 1 * * bash /home/user/cctv-scheduler/converter.sh qn - -m
|
30 0 1 * * bash /home/user/cctv-scheduler/converter.sh qn - -m
|
||||||
36 0 1 1 * bash /home/user/cctv-scheduler/converter.sh qn - -y
|
36 0 1 1 * bash /home/user/cctv-scheduler/converter.sh qn - -y
|
||||||
|
```
|
||||||
|
____
|
||||||
|
## `publisher.sh`
|
||||||
|
**Description:**
|
||||||
|
> Uploading MP4 to Wordpress and Telegram.
|
||||||
|
> Additionally:
|
||||||
|
> - editing Wordpress page from template
|
||||||
|
> - recompressing video if size over 50MB
|
||||||
|
>
|
||||||
|
> This is only a local "proof of conept" for testing and debugging.
|
||||||
|
|
||||||
|
**Dependencies:**
|
||||||
|
> - bash (tested version 5.1.4 on Debian GNU/Linux 11)
|
||||||
|
> - curl (tested version 7.74 on Debian GNU/Linux 11)
|
||||||
|
> - ffmpeg (tested version 4.3.4 on Debian GNU/Linux 11)
|
||||||
|
> - libxml2-utils (tested version 2.9.10 on Debian GNU/Linux 11)
|
||||||
|
> - jq (tested version 1.6 on Debian GNU/Linux 11)
|
||||||
|
>
|
||||||
|
|
||||||
|
| POSITION | PARAMETERS | DESCRIPTION | DEFAULT |
|
||||||
|
|-----------|--------------|------------------------|---------------|
|
||||||
|
| 1 | **[qn]** |execution without pauses||
|
||||||
|
| 2 | **[/path/to/conf]** |path to config| ./converter.conf |
|
||||||
|
| 3 | **[-d\|-w\|-m\|-y]** |periods: '' - 0 day \| '-d' - -X day \| '-w' - -X week \| '-m' - -X month \| '-y' - -X year||
|
||||||
|
| 4 | **[1\|2\|3..XXX]** |multiplier for period: '' - 1 day\|week\|month\|year|1|
|
||||||
|
| 5 | **[--onlytg\|--onlywp]** |'--onlytg' - only publish to Telegram \|'--onlywp' - only publish to Wordpress||
|
||||||
|
|
||||||
|
|
||||||
|
Example usage in terminal with bash for publish today's MP4 maked:
|
||||||
|
```bash
|
||||||
|
bash ./publisher.sh - ./publisher.conf - --onlytg
|
||||||
|
```
|
||||||
|
Example usage with cron:
|
||||||
|
```bash
|
||||||
|
# crontab -e
|
||||||
|
1 1 * * * bash /home/user/cctv-scheduler/publisher.sh qn - -d
|
||||||
|
7 1 * * 1 bash /home/user/cctv-scheduler/publisher.sh qn - -w
|
||||||
|
30 1 1 * * bash /home/user/cctv-scheduler/publisher.sh qn - -m
|
||||||
|
36 1 1 1 * bash /home/user/cctv-scheduler/publisher.sh qn - -y
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user