Add Python 2.7 Japanese documentation to Dash.app

I referred to here for the basic method. [How to add Sphinx-based documentation to Dash.app (Japanese documentation is OK) --Programmer March Chapter 2](http://takuan-osho.hatenablog.com/entry/2013/02/20 / how-to-add-sphinx-based-documentation-in-dash-app)

So, as mentioned on this site, I couldn't index Classes or Modules just by simply converting.

Below are the steps for Mac OS X 10.9.2.

Step 1 Install doc2dash

I didn't have pip, so I installed it with easy_install. You need to install command line tools. If you get an error while building the dependent package lxml,

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future easy_install doc2dash

It was okay if I set the flag and execute it. Probably the same with pip. Reference: Error installing python module lxml on osx mavericks --Stack Overflow

Step 2 Convert Japanese document

Download a set of html from python-doc-ja --Python document Japanese translation project --Google Project Hosting and convert it with doc2dash.

doc2dash -n Python2.7ja -i _static/py.png -I index.html -d pathto/output pathto/python-doc-2.7ja1-html

When I tried feeding this to Dash, the index was not created after all.

Step 3 Convert English document and extract index

So I decided to convert the same version of the English document and see the difference. Download a set of html from Download — Python v2.7.6 documentation and convert it with doc2dash. It took longer than the Japanese document, and the index was completed normally. Looking inside the docset, the size of docSet.dsidx was clearly different, so I copied this to the Japanese docset. Then I got a list of Classes and Modules and the links worked fine. I haven't validated all the indexes, so it may be inconsistent somewhere.

スクリーンショット

It may be possible to extract from the genuine Dash docset, but it seems that the conversion method is different from doc2dash, and the index file type is different.

I think you can do the same with Python 3 series, but I haven't tried it because there seems to be no place to download Japanese documents all at once.

Dash - Documentation Browser, Snippet Manager - Kapeli doc2dash 1.2.0 : Python Package Index

Addendum 2017-05-17: Python 3.6.1

I made the 3.6.1 version by forcibly replacing the html of the English version of docset. You can use the full index of the English version as it is. It's a bit complicated script because you need to embed the anchor in the html. https://gist.github.com/hetima/26f21023c417e68be1d4db2d1e388816

Recommended Posts

Add Python 2.7 Japanese documentation to Dash.app
Add TRACE log level to Python ...?
How to handle Japanese in Python
How to display python Japanese with lolipop
[Python] Add total rows to Pandas DataFrame
Add Gaussian noise to images with python2.7
How to enter Japanese with Python curses
How to add python module to anaconda environment
Add a Python virtual environment to VSCode
[Python] Add comments to standard input files
Updated to Python 2.7.9
"Backport" to python 2
Just add the python array to the json data
Add diagonal lines (hatch) to heatmap (python, matplotlib)
[Python] Memo to translate Matplotlib into Japanese [Windows]
How to add a Python module search path
To add a module to python put in Julialang
Speed: Add element to end of Python array
[Python] How to handle Japanese characters with openCV
Python practice Convert the input year to the Japanese calendar
[Python] [Django] How to use ChoiceField and how to add options
How to add help to HDA (with Python script bonus)
Changes from Python 3.0 to Python 3.5
How to install python
python decorator to retry
Introduction to Python language
Introduction to OpenCV (python)-(2)
It's too troublesome to display Japanese with Vim's python3.
Python error list (Japanese)
[Python3] I want to generate harassment names from Japanese!
Note to daemonize python
How to add page numbers to PDF files (in Python)
Introducing Python 2.7 to CentOS 6.6
Japanese output in Python
Python3> documentation string / docstring
Connect python to mysql
[Python MinMaxScaler] Normalize to 0 ~ 1
python Environmentally-friendly Japanese setting
Program to weaken Japanese
I tried various methods to send Japanese mail with Python
Connect to BigQuery with Python
[2020.8 latest] How to install Python
[python] Convert date to string
I wrote python in Japanese
Post from Python to Slack
How to install Python [Windows]
Post to vim → Python → Slack
Introduction to Python Django (2) Win
To flush stdout in Python
Convert numpy int64 to python int
python3: How to use bottle (2)
Add / remove kernel to JupyterLab
[Python] Convert list to Pandas [Pandas]
Cheating from PHP to Python
A road to intermediate Python
Python: Japanese text: Morphological analysis
Try to understand Python self
Python notes to forget soon
[Python] How to use list 1
Add a dictionary to MeCab
Login to website in Python