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
ee65c610
Commit
ee65c610
authored
Jul 25, 2019
by
Tony Mai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ebf7ebdc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
wireless_copy_files_to_backup.py
fusion/scripts/wireless_copy_files_to_backup.py
+24
-3
No files found.
fusion/scripts/wireless_copy_files_to_backup.py
View file @
ee65c610
...
@@ -14,9 +14,25 @@ if len(sys.argv) < 2:
...
@@ -14,9 +14,25 @@ if len(sys.argv) < 2:
print
(
"Usage cp_fusion_files.py <destination directory> "
)
print
(
"Usage cp_fusion_files.py <destination directory> "
)
exit
()
exit
()
file_path
=
sys
.
argv
[
1
]
file_path
=
"/backup/"
+
sys
.
argv
[
1
]
if
os
.
path
.
isdir
(
file_path
):
print
(
"directroy exist "
+
file_path
+
" exiting.."
)
exit
()
elif
os
.
path
.
exists
(
file_path
):
print
(
"file exist "
+
file_path
+
" exiting.."
)
exit
()
os
.
system
(
"mkdir "
+
file_path
)
print
(
"mkdir "
+
file_path
)
if
os
.
system
(
"ifconfig wlan1 | grep inet"
)
==
""
:
print
(
"wlan1 not connected to Gopro SSID. exiting..."
)
exit
()
print
(
"file_path: "
+
file_path
)
gpCam
=
GoProCamera
.
GoPro
()
gpCam
=
GoProCamera
.
GoPro
()
gpCam
.
pair
(
usepin
=
False
)
gpCam
.
pair
(
usepin
=
False
)
...
@@ -68,4 +84,9 @@ print ("Done")
...
@@ -68,4 +84,9 @@ print ("Done")
localtime
=
time
.
asctime
(
time
.
localtime
(
time
.
time
())
)
localtime
=
time
.
asctime
(
time
.
localtime
(
time
.
time
())
)
elapsed_time
=
time
.
time
()
-
start_time
elapsed_time
=
time
.
time
()
-
start_time
print
(
"End time :"
,
localtime
)
print
(
"End time :"
,
localtime
)
print
(
"Elapse time :"
,
elapsed_time
)
hours
,
rem
=
divmod
(
elasped_time
,
3600
)
minutes
,
seconds
=
divmod
(
rem
,
60
)
print
(
"Elaspse time: "
+
"{:0>2}:{:0>2}:{:05.2f}"
.
format
(
int
(
hours
),
int
(
minutes
),
seconds
))
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