removed pics.json

This commit is contained in:
ClF3 2024-04-30 08:43:00 +08:00
parent c8d1d274cd
commit af350028fd
2 changed files with 2 additions and 9 deletions

File diff suppressed because one or more lines are too long

10
sync.py
View File

@ -14,8 +14,6 @@ parser.add_argument('--ignore', help='Files to ignore', default=defaults['ignore
parser.add_argument('--overwrite', help='Overwrite existing images', action='store_true') parser.add_argument('--overwrite', help='Overwrite existing images', action='store_true')
args=parser.parse_args() args=parser.parse_args()
pics=[]
if args.remote!='' and args.remote[-1] != '/': if args.remote!='' and args.remote[-1] != '/':
args.remote += '/' args.remote += '/'
@ -28,7 +26,6 @@ try:
for root,fir,files in os.walk(args.local): for root,fir,files in os.walk(args.local):
for file in files: for file in files:
pics.append(file)
if file in args.ignore: if file in args.ignore:
print("ignored: " + file) print("ignored: " + file)
continue continue
@ -37,7 +34,7 @@ try:
print("Overwriting: " + file) print("Overwriting: " + file)
blob_client = blob_service_client.get_blob_client(container=args.container, blob=args.remote+file) blob_client = blob_service_client.get_blob_client(container=args.container, blob=args.remote+file)
blob_client.delete_blob() blob_client.delete_blob()
else: else:
print("skipped: " + file) print("skipped: " + file)
continue continue
try: try:
@ -53,7 +50,4 @@ try:
except Exception as ex: except Exception as ex:
print('Exception:') print('Exception:')
print(ex) print(ex)
finally:
json.dump(pics, open('pics.json', 'w'))