Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
imgyaso
提交
32e80173
I
imgyaso
项目概览
OpenDocCN
/
imgyaso
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
imgyaso
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
32e80173
编写于
4月 28, 2020
作者:
W
wizardforcel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
set up package
上级
ab815541
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
81 addition
and
1 deletion
+81
-1
.travis.yml
.travis.yml
+15
-0
imgyaso/__main__.py
imgyaso/__main__.py
+2
-1
setup.py
setup.py
+64
-0
未找到文件。
.travis.yml
0 → 100644
浏览文件 @
32e80173
language
:
python
python
:
3.6
install
:
-
'
pip
install
-r
requirements.txt'
script
:
-
imgyaso -v
deploy
:
-
provider
:
pypi
user
:
__token__
password
:
$PYPI_TOKEN
distributions
:
'
sdist
bdist_wheel'
skip_existing
:
true
imgyaso/__main__.py
浏览文件 @
32e80173
...
...
@@ -10,8 +10,9 @@ from .util import *
modes
=
[
'grid'
,
'noise'
,
'trunc'
,
'quant'
,
'thres'
]
def
main
():
parser
=
argparse
.
ArgumentParser
(
description
=
'ImgYaso'
)
parser
=
argparse
.
ArgumentParser
(
prog
=
"ImgYaso"
,
description
=
"provide various image compression methods"
,
formatter_class
=
argparse
.
RawDescriptionHelpFormatter
)
parser
.
add_argument
(
"-v"
,
"--version"
,
action
=
"version"
,
version
=
f
"ImgYaso version:
{
__version__
}
"
)
parser
.
add_argument
(
'fname'
,
help
=
'file name to be processed'
)
parser
.
add_argument
(
'-c'
,
'--colors'
,
type
=
int
,
default
=
8
,
help
=
'num of colors'
)
parser
.
add_argument
(
'-m'
,
'--mode'
,
default
=
modes
[
0
],
choices
=
modes
,
help
=
'processing mode'
)
...
...
setup.py
0 → 100644
浏览文件 @
32e80173
#!/usr/bin/env python3.7
# -*- coding: utf-8 -*-
import
setuptools
import
imgyaso
with
open
(
"README.md"
,
"r"
,
encoding
=
"utf-8"
)
as
fh
:
long_description
=
fh
.
read
()
with
open
(
"requirements.txt"
,
"r"
,
encoding
=
"utf-8"
)
as
fh
:
install_requires
=
fh
.
read
().
splitlines
()
setuptools
.
setup
(
name
=
"imgyaso"
,
version
=
imgyaso
.
__version__
,
url
=
"https://github.com/apachecn/imgyaso"
,
author
=
imgyaso
.
__author__
,
author_email
=
imgyaso
.
__email__
,
classifiers
=
[
"Development Status :: 4 - Beta"
,
"Environment :: Console"
,
"Intended Audience :: Developers"
,
"Intended Audience :: End Users/Desktop"
,
"License :: Other/Proprietary License"
,
"Natural Language :: Chinese (Simplified)"
,
"Natural Language :: English"
,
"Operating System :: OS Independent"
,
"Programming Language :: Python :: 3"
,
"Programming Language :: Python :: 3 :: Only"
,
"Programming Language :: Python :: 3.6"
,
"Programming Language :: Python :: 3.7"
,
"Topic :: Multimedia :: Graphics"
,
"Topic :: Utilities"
,
],
description
=
"提供多种图片有损压缩方式,包括自适应二值化、网格仿色、颜色缩减"
,
long_description
=
long_description
,
long_description_content_type
=
"text/markdown"
,
keywords
=
[
"image"
,
"processing"
,
"lossy"
,
"compression"
,
"adaptive"
,
"threshold"
,
"bilevel"
,
"grid"
,
"dither"
,
"quantize"
,
"图像处理"
,
"有损压缩"
,
"自适应阈值"
,
"二值化"
,
"网格仿色"
,
"颜色缩减"
,
],
install_requires
=
install_requires
,
python_requires
=
">=3.6"
,
entry_points
=
{
'console_scripts'
:
[
"imgyaso=imgyaso.__main__:main"
,
],
},
packages
=
setuptools
.
find_packages
(),
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录