Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
gopro
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tony Mai
gopro
Commits
8cc4b6e5
Commit
8cc4b6e5
authored
Jul 22, 2019
by
Tony Mai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add scripts
parent
23246920
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
4 deletions
+75
-4
setup.py
fusion/py-api/setup.py
+4
-4
wireless_copy_files.py
fusion/scripts/wireless_copy_files.py
+71
-0
No files found.
fusion/py-api/setup.py
View file @
8cc4b6e5
...
...
@@ -2,13 +2,13 @@ from setuptools import setup
with
open
(
"README.md"
,
"r"
)
as
fh
:
long_description
=
fh
.
read
()
setup
(
name
=
'goprocam'
,
version
=
'3.0.
3
'
,
description
=
'GoPro WiFi API Wrapper for Python -
Compatible with HERO3, HERO3+, HERO4, HERO5, HERO+, HERO6
'
,
url
=
'http://git
hub.com/konradit/gopro-py-api
'
,
version
=
'3.0.
4
'
,
description
=
'GoPro WiFi API Wrapper for Python -
Fusion
'
,
url
=
'http://git
folder.com/tonymai/gopro
'
,
long_description
=
long_description
,
long_description_content_type
=
"text/markdown"
,
author
=
'Konrad Iturbe'
,
author_email
=
'mail@
chernowii
.com'
,
author_email
=
'mail@
tonymai@mobiusmail
.com'
,
license
=
'MIT'
,
packages
=
[
'goprocam'
],
zip_safe
=
False
)
fusion/scripts/wireless_copy_files.py
0 → 100755
View file @
8cc4b6e5
#!/usr/bin/python3
from
goprocam
import
GoProCamera
from
goprocam
import
constants
import
os
import
sys
import
re
import
time
if
len
(
sys
.
argv
)
<
2
:
print
(
"Usage cp_fusion_files.py <destination directory> "
)
exit
()
file_path
=
sys
.
argv
[
1
]
print
(
"file_path: "
+
file_path
)
gpCam
=
GoProCamera
.
GoPro
()
gpCam
.
pair
(
usepin
=
False
)
#gpCam.pair(usepin=True)
if
not
os
.
path
.
exists
(
file_path
):
os
.
makedirs
(
file_path
);
print
(
"Start..."
)
localtime
=
time
.
asctime
(
time
.
localtime
(
time
.
time
())
)
start_time
=
time
.
time
()
print
(
"Start time :"
,
localtime
)
gpCam
.
overview
()
#print(gpCam.getMedia())
#print(gpCam.getMediaInfo("file"))
gpCam
.
listMedia
(
True
)
#exit()
data
=
gpCam
.
listMedia
(
True
,
True
)
for
i
in
data
:
folder
=
i
[
0
]
if
not
os
.
path
.
exists
(
file_path
+
"/"
+
folder
):
os
.
makedirs
(
file_path
+
"/"
+
folder
);
mp4_file
=
i
[
1
]
lrv_file
=
re
.
sub
(
".MP4"
,
".LRV"
,
mp4_file
)
print
(
"copy "
+
folder
+
"/"
+
mp4_file
+
" to "
+
file_path
);
gpCam
.
downloadMedia
(
folder
,
mp4_file
,
file_path
+
"/"
+
folder
+
"/"
+
mp4_file
)
print
(
"copy "
+
folder
+
"/"
+
lrv_file
+
" to "
+
file_path
);
gpCam
.
downloadMedia
(
folder
,
lrv_file
,
file_path
+
"/"
+
folder
+
"/"
+
lrv_file
)
if
re
.
search
(
"GPBK"
,
mp4_file
)
or
re
.
search
(
"GB"
,
mp4_file
):
wav_file
=
re
.
sub
(
".MP4"
,
".WAV"
,
mp4_file
)
#print("copy "+folder+"/"+wav_file+" to "+file_path);
gpCam
.
downloadMedia
(
folder
,
wav_file
,
file_path
+
"/"
+
folder
+
"/"
+
wav_file
)
if
re
.
search
(
"GPBK"
,
mp4_file
):
thm_file
=
re
.
sub
(
".MP4"
,
".THM"
,
mp4_file
)
#print("copy "+folder+"/"+thm_file+" to "+file_path);
gpCam
.
downloadMedia
(
folder
,
thm_file
,
file_path
+
"/"
+
folder
+
"/"
+
thm_file
)
if
re
.
search
(
"GPFR"
,
mp4_file
):
thm_file
=
re
.
sub
(
".MP4"
,
".THM"
,
mp4_file
)
#print("copy "+folder+"/"+thm_file+" to "+file_path);
gpCam
.
downloadMedia
(
folder
,
thm_file
,
file_path
+
"/"
+
folder
+
"/"
+
thm_file
)
print
(
"Done"
)
localtime
=
time
.
asctime
(
time
.
localtime
(
time
.
time
())
)
elapsed_time
=
time
.
time
()
-
start_time
print
(
"End time :"
,
localtime
)
print
(
"Elapse time :"
,
elapsed_time
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment