首页 > 其他 > 详细

Backup old material

时间:2020-05-11 18:31:00      阅读:70      评论:0      收藏:0      [点我收藏+]

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.

Backup old material

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!