Skip to content

Commit

Permalink
Add copy file and destination
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Oct 29, 2018
1 parent 95c7819 commit 7ecaa30
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scan
Expand Up @@ -79,9 +79,8 @@ def transform(config):
os.makedirs(root_folder + '/scantailor')
os.makedirs(root_folder + '/preview')
for img in config['images']:
os.path.join(root_folder, img)
name = os.path.splitext(img)[0]
img = os.path.join(root_folder, img)
shutil.copyfile(os.path.join(root_folder, img), os.path.join(root_folder, os.path.basename(img)))
img = os.path.join(root_folder, os.path.basename(img))
# call(mogrify + ['-level-colors', '#202020,#d0d0d0', img])
# force-cleanup
if config['args']['force_cleanup']:
Expand Down Expand Up @@ -176,7 +175,8 @@ def finalise(config):
call(convert + [img, root_folder + '/{}.pdf'.format(name)])
pdf.append(root_folder + '/{}.pdf'.format(name))

full_name = config['name']
full_name = config['full_name']
destination = config['destination']
call(['pdftk'] + pdf + ['output', destination, 'compress'])
call(['exiftool', '-overwrite_original_in_place', '-Title=' + full_name, destination])

Expand Down Expand Up @@ -214,7 +214,8 @@ while True:
destination = '/home/sbrunner/dsl/paperless/consume/{}.pdf'.format(
full_name
)
config['name'] = full_name
config['full_name'] = full_name
config['destination'] = destination

config['waiting'] = True

Expand Down

0 comments on commit 7ecaa30

Please sign in to comment.