Browse Source

Merge branch 'fixFirstSetup' of Zykino/prismedia into develop

Thanks again for the help!
pull/18/head
LecygneNoir 5 years ago
committed by Gogs
parent
commit
56873c0063
5 changed files with 12 additions and 10 deletions
  1. +6
    -5
      README.md
  2. +2
    -1
      lib/pt_upload.py
  3. +1
    -1
      lib/yt_upload.py
  4. +2
    -2
      peertube_secret.sample
  5. +1
    -1
      prismedia_upload.py

+ 6
- 5
README.md View File

@ -1,6 +1,6 @@
# Prismedia
A scripting way to upload videos to peertube and youtube
A scripting way to upload videos to peertube and youtube written in python2
## Dependencies
Search in your package manager, otherwise use ``pip install --upgrade``
@ -11,6 +11,7 @@ Search in your package manager, otherwise use ``pip install --upgrade``
- docopt
- schema
- python-magic
- python-magic-bin
- requests-toolbelt
- tzlocal
@ -60,12 +61,12 @@ Simply upload a video:
```
./prismedia_upload.py --file="yourvideo.mp4"
```
```
Specify description and tags:
```
```
./prismedia_upload.py --file="yourvideo.mp4" -d "My supa description" -t "tag1,tag2,foo"
```
@ -168,5 +169,5 @@ Languages:
If your server uses peertube before 1.0.0-beta4, use the version inside tag 1.0.0-beta3!
## Sources
inspired by [peeror](https://git.drycat.fr/rigelk/Peeror) and [youtube-upload](https://github.com/tokland/youtube-upload)
## Sources
inspired by [peeror](https://git.drycat.fr/rigelk/Peeror) and [youtube-upload](https://github.com/tokland/youtube-upload)

+ 2
- 1
lib/pt_upload.py View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2
# coding: utf-8
import os
@ -138,6 +138,7 @@ def upload_video(oauth, secret, options):
else:
logging.error(('Peertube: The upload failed with an unexpected response: '
'%s') % response)
print(response.json())
exit(1)

+ 1
- 1
lib/yt_upload.py View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2
# coding: utf-8
# From Youtube samples : https://raw.githubusercontent.com/youtube/api-samples/master/python/upload_video.py # noqa

+ 2
- 2
peertube_secret.sample View File

@ -1,5 +1,5 @@
# This information is obtained upon registration/once logged in a new PeerTube
# on url+'/oauth-clients/local'
# on url+'/api/v1/oauth-clients/local'
# ex: http://domain.example/api/v1/oauth-clients/local
# Warn, no quote " inside this file
[peertube]
@ -8,4 +8,4 @@ client_secret = your_client_secret
username = LecygneNoir
password = your_secure_pwd
peertube_url = https://domain.example
OAUTHLIB_INSECURE_TRANSPORT = '0' #Default use https
OAUTHLIB_INSECURE_TRANSPORT = '0' #Default use https

+ 1
- 1
prismedia_upload.py View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2
# coding: utf-8
"""

Loading…
Cancel
Save