Skip to content

Commit

Permalink
CLI switching logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bartbroere committed Aug 11, 2018
1 parent d6cb885 commit 4d11a92
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions blackvue_wifi.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def list_recordings(self):
lines = self.get('blackvue_vod.cgi').text.split('\n')
version, recordings = lines[0], lines[1:]
recordings = [recording.split(',') for recording in recordings]
print(recordings)
recordings = [recording[0].split(":")[1] for recording in
recordings[:-1]]
return recordings
Expand All @@ -73,7 +72,6 @@ def set_config(self):
:return:
"""
# return self.upload

def get_dashcam_metadata(self):
"""
Expand Down Expand Up @@ -111,8 +109,16 @@ def download(self, path, *args, **kwargs):


if __name__ == "__main__":
BlackVueClient(config=confidence.Configuration(
client = BlackVueClient(config=confidence.Configuration(
confidence.Configuration({'endpoint': '10.99.77.1'}),
confidence.load_name('blackvue'),
confidence.Configuration(docopt(__doc__)))
)
confidence.Configuration(docopt(__doc__))
))
options = docopt(__doc__)
if options['--download-all-recordings']:
client.download_all_recordings(out=options['<foldername>'])
if options['--download-missing-recordings']:
if options['--continuously']:
print("Continous syncing will be included in the next version")
else:
print("Incremental downloads will be included in the next version")

0 comments on commit 4d11a92

Please sign in to comment.