Backup old material

时间:2020-05-11 18:31:00   收藏:0   阅读:73

First use the camera of a smart phone or scanner to prepare the original documents.

Rotate the image if necessary.

If you use the camera, you can rename the file, using

import os
a = os.listdir(‘./‘)
cnt=1
for i in a:
    os.rename(i, ‘%d.jpg‘%cnt)
    cnt+=1

Then compress the images to some satisfied level.
You can use this Python script.

Then convert the images to pdf format if necessary.

import os
from PIL import Image
a = os.listdir(‘./‘)
for i in a:
    im = Image.open(i)
    im.save(i.replace(‘jpg‘,‘pdf‘))

Merge these pdf to a single pdf file.

Upload necessary files to cloud.

原文:https://www.cnblogs.com/zhaofeng-shu33/p/12870273.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!