Thanks to visit codestin.com
Credit goes to github.com

Skip to content

smallstrong0/Lazy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lazy是一个Python脚本处理UI设计师给我们用sketch切出的图进行一键更名,批量压缩的工具。----- 解放双手,值得拥有。

Prepare

  1. 自行安装python环境
  2. pip install tinify(https://github.com/tinify/tinify-python)
  3. https://tinypng.com/developers 去官网注册账户拿到自己的api_key

Use

  1. 将工程中的3个Python文件copy到UI设计师给的hdpi,xhdpi,xxhdpi,xxxhdpi的同级目录下(可以是一套图,也可以是多套图,请保持多套图中的同一文件命名相同,谢谢)。

  2. 根据提示依次运行,python list.py 之后在name.txt里面进行翻译图片名字之后运行python cname.py进行更名之后运行python tinypng.py对图片进行压缩处理。ok,在命令行中我写了大量提示,可以参照提示进行步骤。

  3. 我在我的mac上运行正常,但是一定还存在很多兼容问题 ~ 欢迎issus & star

License

Copyright 2017 smallstrong0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

切图一键更名压缩

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages