Skip to main content

Introduction

Currently, June 1, 2015, Sphinx 1.3.1 cannot generate localized heading in index pages and glossary directives. This package make the gate to make the Sphinx internationalized. This means another package is required to do, I will make the one named ‘Gosyu’, please find that on pip.

This package does not depends on the Sphinx. You can use this for another text proccesing product.

License

2-clause BSD, same as the Sphinx project.

Installation

You can install or uninstall this package like another Python packages. Also, you can use this package without installing this package on your Python systems, the configuration file of Sphinx(conf.py) enable you to use.

Requirements

Tested with 32bit version of Python 2.7.9 and 64bit version of 3.4.3, both on the Microsoft Windows 8.1 Pro 64bit edition. But with another versions and on another OSs would be usable.

How to install

Again, you can install this package as you will do with another one.

  1. Open a console and do pip install sortorder.

    On the MS-Windows, <python_installed_path>\Scripts\pip.exe install sortorder.

  2. Or when you get zip archive like sortorder-2.0.6(.zip) where ‘2.0.6’ is version number, change current directiory to the folder that has the zip file, and do setup.py sortorder-2.0.6.zip.

    On the MS-Windows, <python_installed_path>\Scripts\pip.exe install sortorder-2.0.6.zip.

  3. Or, this way is the Sphinx specific, you can use this package just extracted any folder you want. the conf.py enables you to use the themes and extensions.

How to use (with Sphinx)

To know how to use the sort order you already have, see yogosyu or gosyu.

If you want to use one of the preset sort orders this package has, just language = 'xx'. it causes automatically load sortorder.xx.

Currently, xx is available ja, eo, el and ru for the presets.

To know how to make your own sortorder, see sortorder/__init__.py.

In short:

  • determine the filename of the new module and create it. if you name sort_order_xx.py, it will automatically loaded when language = 'xx' is declared.

  • write import sortorder.

  • make the class inherits sortorder.SortOrderBase.

  • override get_string_to_sort and get_group_name.

  • make get_default_sort_orderreturns the instance of the class.

  • make setup. see any of sortorder.xx included this package.

How to use (General)

If you have this module not installed by pip, you should first do sys.path.insert(0, '<the_folder_you_copied_the_extension_file>').

Second, if you want directly use ja.py (Japanese), eo.py (Esperanto), el.py (Greek) or ru.py (Russian), Just do import sortorder.xxx where xxx is language code like ja, eo, etc.

Otherwise, you should make the your sort-order module as you want. You should define the new class which inherits sortorder.SortOrderBase. The filename of the module should prefixed sort_order_, like sort_order_xx.py.

get_default_sort_order and setup methods are only used by the Sphinx document generator.

After you make sort_order_xx.py or you have it someone gives, add the path of the .py file to sys.path like above. Next import the module:

sys.path.insert(0, '<the_folder_you_copied_the_extension_file>')
# (snip...)
import sort_order_xx # may automatically import sortorder.__init__.py

But sortorder.__init__ has the method get_sort_order. You can add your code some automatic feature like used with the Sphinx, by defining get_default_sort_order method in your module.

Author

Suzumizaki-Kimitaka(鈴見咲君高), 2011-2015

History

2.0.6(2015-07-04):

Fix document(this file) for PyPI.

2.0.5(2015-07-04):

  • Part from yogosyu extension.

  • First uploded to PyPI.

2013-12-07:

Add Python 3 support.

2013-12-06:

Updated to meet Sphinx 1.2.

2011-06-28:

Russian and Greek versions added.

2011-05-24:

First release. Included in yogosyu extension. Japanese and Esperanto versions included.

Metadata

Release files for sortorder 2.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sortorder 2.0.6
File Size Uploaded
sortorder-2.0.6.zip 32.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sortorder 2.0.6
File Interpreter ABI Platform
sortorder-2.0.6-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 61.6 kB

Release files / sortorder-2.0.6.zip

Download URL sortorder-2.0.6.zip
Size 32.3 kB
Tags Source
SHA-256 checksum
How to use checksums
de1f113dea4e66d00812276c41ea52f7a502db1906b61a31d48d8ae5aab5593b
BLAKE2b-256 checksum
How to use checksums
f2e33a2b5e174a867745825a41644466c77d976eb316efb1924cdbdd3d249617
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / sortorder-2.0.6-py2.py3-none-any.whl

Download URL sortorder-2.0.6-py2.py3-none-any.whl
Size 29.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
1ffd33b3cddc4b470881eab99e5fa1ab7f0c06c781dc0759dd38b04a58d68721
BLAKE2b-256 checksum
How to use checksums
0f5733eb9846603ea495663f19c2c18bfbecc79b5bccf744af1b447419048fdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

2.0.6 This release

2 release files

2.0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page