Updated variable names
This commit is contained in:
parent
b26de7e56e
commit
83d2ac6e1a
@ -50,11 +50,11 @@ def main(user, password, server, label, inout_file, path="", ):
|
|||||||
print "Working with url {}".format(url)
|
print "Working with url {}".format(url)
|
||||||
try:
|
try:
|
||||||
res = check_output('calibredb search "Identifiers:{}" {}'.format(url, path), shell=True,stderr=STDOUT)
|
res = check_output('calibredb search "Identifiers:{}" {}'.format(url, path), shell=True,stderr=STDOUT)
|
||||||
id = res
|
storyId = res
|
||||||
print "\tStory is in calibre with id {}".format(id)
|
print "\tStory is in calibre with id {}".format(storyId)
|
||||||
try:
|
try:
|
||||||
print "\tExporting file"
|
print "\tExporting file"
|
||||||
res = check_output('calibredb export {} --dont-save-cover --dont-write-opf --single-dir {}'.format(id, path), shell=True)
|
res = check_output('calibredb export {} --dont-save-cover --dont-write-opf --single-dir {}'.format(storyId, path), shell=True)
|
||||||
onlyfiles = files(".")
|
onlyfiles = files(".")
|
||||||
for cur in onlyfiles:
|
for cur in onlyfiles:
|
||||||
if not cur.endswith(".epub"): continue
|
if not cur.endswith(".epub"): continue
|
||||||
@ -73,8 +73,8 @@ def main(user, password, server, label, inout_file, path="", ):
|
|||||||
print "\tForcing download update\n"
|
print "\tForcing download update\n"
|
||||||
res = check_output('fanficfare -u "{}" --force --update-cover'.format(cur), shell=True,stderr=STDOUT)
|
res = check_output('fanficfare -u "{}" --force --update-cover'.format(cur), shell=True,stderr=STDOUT)
|
||||||
|
|
||||||
print "\tRemoving {} from library".format(id)
|
print "\tRemoving {} from library".format(storyId)
|
||||||
res = check_output('calibredb remove {} {}'.format(id, path), shell=True,stderr=STDOUT)
|
res = check_output('calibredb remove {} {}'.format(storyId, path), shell=True,stderr=STDOUT)
|
||||||
#print res
|
#print res
|
||||||
print "\tAdding {} to library".format(cur)
|
print "\tAdding {} to library".format(cur)
|
||||||
res = check_output('calibredb add "{}" {}'.format(cur, path), shell=True,stderr=STDOUT)
|
res = check_output('calibredb add "{}" {}'.format(cur, path), shell=True,stderr=STDOUT)
|
||||||
@ -144,7 +144,6 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
options.input = updater(options.input, config.get('locations', 'input').strip())
|
options.input = updater(options.input, config.get('locations', 'input').strip())
|
||||||
|
|
||||||
print options
|
|
||||||
if not (options.user or options.password):
|
if not (options.user or options.password):
|
||||||
raise ValueError("User or Password not given")
|
raise ValueError("User or Password not given")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user