New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

简化的pypinyin命令行选项 #105

Merged
merged 6 commits into from Oct 26, 2017

Conversation

Projects
None yet
5 participants
@wdscxsj
Contributor

wdscxsj commented Oct 23, 2017

包括2个修改:

  • 增加了 short flags:-f, -s, -p(记如part), -e, -m(记如multiple,而且是heteronym的最后一个字母)
  • 增加了基于范例的“拼音风格”命令行选项,思路见Go版:mozillazg/go-pinyin#19

提出这些调整的原因,一是原命令行较难记忆,二是输起来太费劲了(尤其是在手机上),都可能吓走用户。

BOPOMOFO、CYRILLIC的4个选项,我不懂怎么设计范例,只好照抄。本来还想弄成不区分大小写、有没有下划线都无所谓的,但对于日常使用,这样应该已经挺方便了。

mozillazg and others added some commits Oct 12, 2017

@pep8speaks

This comment has been minimized.

pep8speaks commented Oct 23, 2017

Hello @wdscxsj! Thanks for updating the PR.

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on October 26, 2017 at 00:52 Hours UTC
@coveralls

This comment has been minimized.

coveralls commented Oct 23, 2017

Coverage Status

Coverage decreased (-47.6%) to 51.613% when pulling 4f60d39 on wdscxsj:simplified-pypinyin into 328ca43 on mozillazg:master.

@codecov

This comment has been minimized.

codecov bot commented Oct 23, 2017

Codecov Report

Merging #105 into develop will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #105      +/-   ##
===========================================
+ Coverage    99.23%   99.24%   +<.01%     
===========================================
  Files           20       20              
  Lines          523      527       +4     
===========================================
+ Hits           519      523       +4     
  Misses           4        4
Impacted Files Coverage Δ
pypinyin/phrases_dict.py 100% <ø> (ø) ⬆️
pypinyin/runner.py 100% <100%> (ø) ⬆️
pypinyin/__init__.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4e2e4a...064af5f. Read the comment docs.

@mozillazg

This comment has been minimized.

Owner

mozillazg commented Oct 24, 2017

@wdscxsj Thank you! 麻烦修改一下行长,以及 https://github.com/mozillazg/python-pinyin/blob/master/tests/test_cmd.py#L12 的测试。

@coveralls

This comment has been minimized.

coveralls commented Oct 24, 2017

Coverage Status

Coverage increased (+0.006%) to 99.241% when pulling 9cc8541 on wdscxsj:simplified-pypinyin into 328ca43 on mozillazg:master.

4 similar comments
@coveralls

This comment has been minimized.

coveralls commented Oct 24, 2017

Coverage Status

Coverage increased (+0.006%) to 99.241% when pulling 9cc8541 on wdscxsj:simplified-pypinyin into 328ca43 on mozillazg:master.

@coveralls

This comment has been minimized.

coveralls commented Oct 24, 2017

Coverage Status

Coverage increased (+0.006%) to 99.241% when pulling 9cc8541 on wdscxsj:simplified-pypinyin into 328ca43 on mozillazg:master.

@coveralls

This comment has been minimized.

coveralls commented Oct 24, 2017

Coverage Status

Coverage increased (+0.006%) to 99.241% when pulling 9cc8541 on wdscxsj:simplified-pypinyin into 328ca43 on mozillazg:master.

@coveralls

This comment has been minimized.

coveralls commented Oct 24, 2017

Coverage Status

Coverage increased (+0.006%) to 99.241% when pulling 9cc8541 on wdscxsj:simplified-pypinyin into 328ca43 on mozillazg:master.

@mozillazg mozillazg changed the base branch from master to develop Oct 25, 2017

'FINALS_TONE', 'FINALS_TONE2', 'FINALS_TONE3',
'BOPOMOFO', 'BOPOMOFO_FIRST', 'CYRILLIC', 'CYRILLIC_FIRST']
_layman_styles = ['zhao', 'zh4ao', 'zha4o', 'zhao4', 'zh', 'z',
'ao', 'ào', 'a4o', 'ao4']

This comment has been minimized.

@mozillazg

mozillazg Oct 25, 2017

Owner

ào 会不会也有难打的问题?

@wdscxsj

This comment has been minimized.

Contributor

wdscxsj commented Oct 26, 2017

抱歉,这个应该是4ao,是我草率了。今天不太方便,明天才能提交更新。

@coveralls

This comment has been minimized.

coveralls commented Oct 26, 2017

Coverage Status

Coverage increased (+0.006%) to 99.241% when pulling 064af5f on wdscxsj:simplified-pypinyin into b4e2e4a on mozillazg:develop.

@mozillazg

LGTM!

@mozillazg

This comment has been minimized.

Owner

mozillazg commented Oct 26, 2017

@wdscxsj Thanks for your work! 👍 我会抽空尽快发布一个新版本出来。

@bors-homu r+

@bors-homu

This comment has been minimized.

Collaborator

bors-homu commented Oct 26, 2017

📌 Commit 064af5f has been approved by mozillazg

bors-homu added a commit that referenced this pull request Oct 26, 2017

Auto merge of #105 - wdscxsj:simplified-pypinyin, r=mozillazg
简化的pypinyin命令行选项

包括2个修改:

- 增加了 short flags:`-f`, `-s`, `-p`(记如part), `-e`, `-m`(记如multiple,而且是heteronym的最后一个字母)
- 增加了基于范例的“拼音风格”命令行选项,思路见Go版:mozillazg/go-pinyin#19

提出这些调整的原因,一是原命令行较难记忆,二是输起来太费劲了(尤其是在手机上),都可能吓走用户。

BOPOMOFO、CYRILLIC的4个选项,我不懂怎么设计范例,只好照抄。本来还想弄成不区分大小写、有没有下划线都无所谓的,但对于日常使用,这样应该已经挺方便了。
@bors-homu

This comment has been minimized.

Collaborator

bors-homu commented Oct 26, 2017

⌛️ Testing commit 064af5f with merge 0073489...

@bors-homu

This comment has been minimized.

Collaborator

bors-homu commented Oct 26, 2017

☀️ Test successful - status-travis
Approved by: mozillazg
Pushing 0073489 to master...

@mozillazg mozillazg merged commit 957f8c0 into mozillazg:develop Oct 26, 2017

5 checks passed

codecov/patch 100% of diff hit (target 99.23%)
Details
codecov/project 99.24% (+<.01%) compared to b4e2e4a
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.006%) to 99.241%
Details
homu Test successful
Details
@mozillazg

This comment has been minimized.

Owner

mozillazg commented Oct 28, 2017

本次修改增加的功能已发布为 pypinyin 0.27.0 。 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment