Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
295 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.. pypinyin documentation master file, created by | ||
sphinx-quickstart on Fri Sep 06 22:22:13 2013. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
${readme} | ||
|
||
|
||
API | ||
--- | ||
|
||
拼音风格: | ||
|
||
+-----------------------+----------------------------------------------------------------------------------+ | ||
|pypinyin.NORMAL |普通风格(0),不带声调。如: ``pin yin`` | | ||
+-----------------------+----------------------------------------------------------------------------------+ | ||
|pypinyin.TONE |声调风格(1),拼音声调在韵母第一个字母上(默认风格)。如: ``pīn yīn`` | | ||
+-----------------------+----------------------------------------------------------------------------------+ | ||
|pypinyin.TONE2 |声调风格2(2),即拼音声调在各个拼音之后,用数字 [0-4] 进行表示。如: ``pi1n yi1n`` | | ||
+-----------------------+----------------------------------------------------------------------------------+ | ||
|pypinyin.INITIALS |声母风格(3),只返回各个拼音的声母部分。如: ``中国`` 的拼音 ``zh g`` | | ||
+-----------------------+----------------------------------------------------------------------------------+ | ||
|pypinyin.FIRST_LETTER |首字母风格(4),只返回拼音的首字母部分。如: ``p y`` | | ||
+-----------------------+----------------------------------------------------------------------------------+ | ||
|pypinyin.FINALS |韵母风格1(5),只返回各个拼音的韵母部分,不带声调。如: ``ong uo`` | | ||
+-----------------------+----------------------------------------------------------------------------------+ | ||
|pypinyin.FINALS_TONE |韵母风格2(6),带声调,声调在韵母第一个字母上。如: ``ōng uó`` | | ||
+-----------------------+----------------------------------------------------------------------------------+ | ||
|pypinyin.FINALS_TONE2 |韵母风格2(7),带声调,声调在各个拼音之后,用数字 [0-4] 进行表示。如: ``o1ng uo2``| | ||
+-----------------------+----------------------------------------------------------------------------------+ | ||
|
||
|
||
.. autofunction:: pypinyin.pinyin | ||
|
||
.. autofunction:: pypinyin.slug | ||
|
||
.. autofunction:: pypinyin.lazy_pinyin | ||
|
||
.. autofunction:: pypinyin.load_single_dict | ||
|
||
.. autofunction:: pypinyin.load_phrases_dict | ||
|
||
|
||
${changelog} | ||
|
||
|
||
Indices and tables | ||
------------------ | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
"""更新 index.rst""" | ||
|
||
from string import Template | ||
|
||
readme_rst = '../README.rst' | ||
changelog_rst = '../CHANGELOG.rst' | ||
template_file = 'index.rst.txt' | ||
index_rst = 'index.rst' | ||
|
||
kwargs = {} | ||
|
||
with open(readme_rst) as f: | ||
kwargs['readme'] = f.read() | ||
with open(changelog_rst) as f: | ||
kwargs['changelog'] = f.read() | ||
|
||
with open(index_rst, 'w') as f: | ||
with open(template_file) as f2: | ||
f.write(Template(f2.read()).safe_substitute(kwargs)) |
Oops, something went wrong.