video2gif script for next readme and pypi projects i guess
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
{
|
||||
max-price=600,
|
||||
min-price=0,
|
||||
type=
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
machin = 1
|
||||
bidule = ""
|
||||
truc = "bidule chouette"
|
||||
|
||||
machin
|
||||
Executable
+31
@@ -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)
|
||||
Reference in New Issue
Block a user