Skip to content

Commit

Permalink
Add status
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Nov 13, 2018
1 parent 8f9bcc6 commit 1f7156f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions status
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import os
import glob
import re
import yaml

for folder in glob.glob('/home/sbrunner/dsl/paperless/scan/*/'):
print()
print(re.sub(r'.', '-', folder))
print(folder)
print(re.sub(r'.', '-', folder))

if not os.path.exists(os.path.join(folder, 'config.yaml')):
print("No config")
else:
with open(os.path.join(folder, 'config.yaml')) as config_file:
config = yaml.load(config_file.read())

if config.get('waiting', False):
if os.path.exists(os.path.join(folder, 'waiting')):
print('To be validated')
else:
print('Waiting to be imported')
else:
print('Not ready')

0 comments on commit 1f7156f

Please # to comment.