From a9bb689c2edb4c2935028a593fdbed57df34a1c4 Mon Sep 17 00:00:00 2001 From: coderkun Date: Thu, 16 Feb 2017 21:43:14 +0100 Subject: [PATCH] =?UTF-8?q?Remove=20script=20=E2=80=9Cdropbox.py=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dropbox.py | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100755 dropbox.py diff --git a/dropbox.py b/dropbox.py deleted file mode 100755 index d4f56fe..0000000 --- a/dropbox.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/env python3 - - -import json -import os -import sys -from subprocess import call - - -if len(sys.argv) > 1: - path = sys.argv[1] - if len(path) > 10: - path = path[10:] - config_file = os.path.expanduser('~/.dropbox/info.json') - if os.path.isfile(config_file): - with open(config_file) as file: - config = json.load(file) - if config and 'personal' in config and 'path' in config['personal']: - base_path = config['personal']['path'] - path = os.path.join(base_path, path) - if os.path.exists(path): - call(['xdg-open', path]) - else: - print("path {} does not exist".format(path)) - else: - print("config format not recognized") - else: - print("config not found") - else: - print("url invalid") -else: - print("no url given")