Commit f7a33e43 authored by Mathieu Loiseau's avatar Mathieu Loiseau
Browse files

Select folder

parent 798de2b8
# -*- coding: UTF-8 -*-
# created by lzbk
import argparse
import os ,sys
import getpass
parser = argparse.ArgumentParser(description="Extraire les notes d'une liseuse Vivlio")
parser.add_argument("-s", "--source", help="le dossier de la liseuse", type=str, default=None)
parser.add_argument("-f","--format", help="le format d'export (JSON ou wiki)", type=str, default=None)
parser.add_argument("-d", "--destination", default=None, help="le chemin et nom du dossier d'export (un fichier par livre)", type=str)
args = parser.parse_args()
def getSource():
print("Warning, this only works for linux systems")
basepath = "/media/"+getpass.getuser()
files = os.listdir(basepath)
if len(files)>0:
for f in files:
print(str(i)+". "+f)
drive = int(input("Select drive #: "))
while (drive<1 or drive >= i):
drive = int(input("Select drive #: "))
res = basepath+"/"+files[drive - 1]
print("No mounted drive")
return res
if __name__ == "__main__":
if args.source == None:
source = getSource()
source = args.source
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment