mirror of
https://git.lecygnenoir.info/LecygneNoir/prismedia.git
synced 2025-10-03 09:29:16 +02:00
add checks for the jq command and update README
This commit is contained in:
parent
4ec8960451
commit
c1e6e032c9
2 changed files with 9 additions and 2 deletions
|
@ -17,6 +17,7 @@ Search in your package manager, otherwise use ``pip install --upgrade``
|
|||
For Peertube and if you want to use the publishAt option, you also need some utilities on you local system
|
||||
- [atd](https://linux.die.net/man/8/atd) daemon
|
||||
- [curl](https://linux.die.net/man/1/curl)
|
||||
- [jq](https://stedolan.github.io/jq/)
|
||||
|
||||
## Configuration
|
||||
|
||||
|
@ -110,7 +111,7 @@ Options:
|
|||
--publishAt=DATE Publish the video at the given DATE using local server timezone.
|
||||
DATE should be on the form YYYY-MM-DDThh:mm:ss eg: 2018-03-12T19:00:00
|
||||
DATE should be in the future
|
||||
For Peertube, requires the "atd" and "curl utilities installed on the system
|
||||
For Peertube, requires the "atd", "curl" and "jq" utilities installed on the system
|
||||
-h --help Show this help.
|
||||
--version Show version.
|
||||
|
||||
|
@ -147,7 +148,7 @@ Languages:
|
|||
- ~~thumbnail/preview~~ Canceled, waiting for Youtube's API support
|
||||
- [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] Add publishAt option to plan your videos (need the [atd](https://linux.die.net/man/8/atd) daemon and [curl](https://linux.die.net/man/1/curl))
|
||||
- [x] Add publishAt option to plan your videos (need the [atd](https://linux.die.net/man/8/atd) daemon, [curl](https://linux.die.net/man/1/curl) and [jq](https://stedolan.github.io/jq/))
|
||||
- [ ] Record and forget: put the video in a directory, and the script uploads it for you
|
||||
- [ ] Usable on Desktop (Linux and/or Windows and/or MacOS)
|
||||
- [ ] Graphical User Interface
|
||||
|
|
|
@ -182,6 +182,12 @@ def publishAt(publishAt, oauth, url, idvideo, secret):
|
|||
except CalledProcessError:
|
||||
logging.error("You need to install the curl command line to use the publishAt option.")
|
||||
exit(1)
|
||||
try:
|
||||
FNULL = open(devnull, 'w')
|
||||
check_call(["jq", "-V"], stdout=FNULL, stderr=STDOUT)
|
||||
except CalledProcessError:
|
||||
logging.error("You need to install the jq command line to use the publishAt option.")
|
||||
exit(1)
|
||||
time = publishAt.split("T")
|
||||
# Remove leading seconds that atd does not manage
|
||||
if time[1].count(":") == 2:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue