video2gif script for next readme and pypi projects i guess

This commit is contained in:
2020-09-07 01:28:15 +02:00
parent eb2e642d60
commit 902fa80a3a
5 changed files with 45 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
{
max-price=600,
min-price=0,
type=
}
+4 -1
View File
@@ -5,8 +5,11 @@ from googlemaps_keys import api_keys
def login_no_matter_how(keys):
for key in keys:
try:
return googlemaps.Client(key=key)
print(key)
client = googlemaps.Client(key=key)
return client
except:
print('caught error')
pass
client = login_no_matter_how(api_keys)
+5
View File
@@ -0,0 +1,5 @@
machin = 1
bidule = ""
truc = "bidule chouette"
machin
Executable
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env python
import os
import sys
DEFAULT_RATIO = 15
if len(sys.argv)>1:
args = sys.argv[1].split('.')
file = '.'.join(args[:-1])
extension = args[-1]
else:
print("You must give at least file as an argument.")
if len(sys.argv)>2:
ratio = sys.argv[2]
else:
ratio = DEFAULT_RATIO
if len(sys.argv)>3:
pass
print(f"file is {file}")
print(f"extension is {extension}")
cmd = f"ffmpeg -i {file}.{extension}"
cmd += f" -r {ratio}"
cmd += f" {file}.gif"
os.system(cmd)