Git Product home page Git Product logo

myscript's Introduction

介绍

这里存放我写的脚本或工具,用于帮助处理一些繁琐的任务。

CheckNet

CheckNet 可以简单的把Win10系统中的UWP应用添加至隔离排除列表,以便使其应用系统代理。简单的说,Win10应用商店中的软件无法使用系统代理,此工具可以让某一软件使用系统代理。

更多使用详情可以参考我博客中写的介绍

Timg

以 TinyPNG 为基础的图片压缩处理命令行工具。

TinyPNG 是一个很好用的在线图片压缩工具,它相比起其他图片压缩工具来说,它的最大优点在于在不影响肉眼可见图片清晰度的情况下最大程度的压缩图片体积。

因为 TinyPNG 本身提供了良好的接口,所以开发此命令行程序很简单,Github 上也存在其他实现方式,但 Timg 的优点在于在命令行的使用上具有更良好的体验和功能。

使用环境

  • Python3
  • tinify

Timg 使用 tinify 模块作为 TinyPNG 的接口,所以在使用前需要安装此依赖,用 pip 可以轻松解决这个问题。

pip install --upgrade tinify

简单使用

使用 Timg 需要 TinyPNG 的 API key,你可以使用自己的邮箱免费注册一个,也可以使用程序中自带的 key 试用。修改 key 的方法就是修改程序中 tinify.key 的值。

# 查看程序帮助
python timg.py -h

# 压缩一个图片,直接替换源文件
python timg.py example.png
# 压缩一个图片,不覆盖源文件,创建为 optimized.png
python timg.py example.png -c optimized.png

# 压缩 Picture 目录下的图片,直接替换源文件
python timg.py Picture
# 压缩 Picture 目录下的图片,压缩完成后的图片放到 Optimized 文件夹中
python timg.py Picture -c Optimized
# 递归的压缩 Picture 目录下的图片(即包含子目录),压缩完成后的图片放到 Optimized 文件夹中
python timg.py -r Picture -c Optimized

# TinyPNG 接口每个月有 500 张图片的限制,我们可以使用[-f | --info] 参数查看使用量。
python timg.py -i
> 6 images you have made this month.

copyimages

[自用脚本]用于递归的将某目录下的图片、视频文件复制到另一个目录中(不保留原目录结构)。

此脚本仅为自用,原先用于将 Google Photo 备份的照片拷贝到一个目录下,而不是分散出一堆以日期命名的子目录。

myscript's People

Contributors

yearliny avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.