Pythonã®æ¥æ¬èªè¨³ããã¥ã¡ã³ããDevhelpã§åç §ãã(2011å¹´2æä¸æ¬æç¹ã»ä½æä¸ã®è¿½å ã¡ã¢)
ãPythonの日本語訳ドキュメントをDevhelpで参照する(2011年2月上旬時点・ファイル配布)ãã®ç¶ãã¨ãã¦ããã¡ã¤ã«ä½æä¸ã®è¿½å ã¡ã¢ãæ±ãã
ç®æ¬¡ãéä¸ã§åãã?
ä»åãHTMLãã¡ã¤ã«ããã¨ã«ãã¦æ£è¦è¡¨ç¾ç½®æã主ã«ä½¿ç¨ãã¦æä½æ¥ã§ç®æ¬¡ã®å 容ã.devhelp2ãã¡ã¤ã«ã«è¿½å ãã¦ãã£ãã®ã ãããã®ä¸ã§ã.devhelp2ãã¡ã¤ã«ã«æ¸ãè¾¼ãå 容(XMLææ¸ã®ä¸é¨)èªä½ã«ã¯åé¡ããªãã¦ãå®éã«Devhelpã§éãã¦ã¿ãã¨ç®æ¬¡ãéä¸ã§åããã¨ããç¾è±¡ãçºçããããã®éã«ã¯(Pythonã®æ¥æ¬èªè¨³ããã¥ã¡ã³ãå ã®)ç®æ¬¡ã®ä¸ä¸ã®ä¸¦ã³ãéã«ãªã£ã¦ãã¦ãä¸çªä¸ã«è¡¨ç¤ºãããã¹ãé ç®ãä¸çªä¸ã«è¡¨ç¤ºãããç¶æ ã«ãªããåå ãåãããã«è²ã ã¨è©¦ãã¦ããã®ã ããä½æ ã
<!-- [é©å½ãªé·ãã®é©å½ãªæåå] -->
ã®ãããªã³ã¡ã³ããå ¥ãããã¨ã§ãã®å ´æã§åããã®ãæ¹åãããã¨ãããã¨ãåãã£ãããPythonの日本語訳ドキュメントをDevhelpで参照する(2011年2月上旬時点・ファイル配布)ãã®ãã¡ã¤ã«ã«ããã®ãããªã³ã¡ã³ããå ¥ãã¦ããã
.devhelp2ãã¡ã¤ã«ã®èªåçæã¯å¯è½?
æå ã®Ubuntuã«ã¯ãpython2.6-docãã®ãããªè±èªã®ããã¥ã¡ã³ãããã±ã¼ã¸ãããããããã¯Devhelpã§HTMLããã¥ã¡ã³ããåç §ã§ãããã®ã¨ãªã£ã¦ãããã¨ãåãã£ãã®ã§ããã®ããã±ã¼ã¸ã®ã½ã¼ã¹ãåå¾ãã¦ã¿ãã¨ãããdebian/pyhtml2devhelp.pyã¨ããã¹ã¯ãªãããHTMLææ¸ããã®èªåçæãè¡ã£ã¦ãããã¨ãåãã£ãã®ã ããä½æ ãæ¥æ¬èªè¨³ããã¥ã¡ã³ãã®ããªã¼ã«é©ç¨ãã¦ãç®æ¬¡ããã¾ãçæãããªãã£ãã®ã§ã詳ãã調ã¹ã¦ã¿ããããã¨ãç®æ¬¡ã®aè¦ç´ ã®classå±æ§ãæ¥æ¬èªè¨³ã§å¤ãã£ã¦ãããã¨ãåãããä»ã®å°ããªä¿®æ£ã¨åãããã¨
--- python2.6-2.6.6.orig/debian/pyhtml2devhelp.py +++ python2.6-2.6.6/debian/pyhtml2devhelp.py @@ -4,7 +4,7 @@ import os, sys, re class PyHTMLParser(htmllib.HTMLParser): - pages_to_include = set(('whatsnew/index.html', 'tutorial/index.html', 'using/index.html', + pages_to_include = set(('whatsnew/2.6.html', 'tutorial/index.html', 'using/index.html', 'reference/index.html', 'library/index.html', 'howto/index.html', 'extending/index.html', 'c-api/index.html', 'install/index.html', 'distutils/index.html', 'documenting/index.html')) @@ -75,7 +75,7 @@ if self.link.has_key('class'): if self.link['class'] in ('biglink'): process = True - if self.link['class'] in ('reference external'): + if self.link['class'] in ('reference internal'): if self.next_link: process = True next_link = False @@ -202,7 +202,7 @@ version = sys.argv[3] parser = PyHTMLParser(formatter.NullFormatter(), base, fn, indent=0) - print '<?xml version="1.0" encoding="iso-8859-1"?>' + print '<?xml version="1.0" encoding="utf-8"?>' print '<book title="Python %s Documentation" name="Python" version="%s" link="index.html">' % (version, version) print '<chapters>' parser.parse_file(fn)
ã®ãããªå¤æ´ã¨ãªã£ããããã®ä¿®æ£çã¹ã¯ãªããã§æ¥æ¬èªè¨³ããã¥ã¡ã³ãããã¨ã«èªåçæããã¦ããé¨åçã«ã¯æ£å¸¸ãªãããä¸å®å
¨ãªãã¡ã¤ã«ãçæããã¦ãã¾ã(ä¸ã®å¤æ´ç¹ãä¸ååãããã¯ä¸é©å?)ãã¾ããåè¿°ã®ã³ã¡ã³ããæåã§æ¿å
¥ããªãã¨ç®æ¬¡ãåããç¾è±¡ãèµ·ããã
ç¾ç¶ã¯ãæ£ããç®æ¬¡ã表示ãããããã«ã³ã¡ã³ãã§èª¿æ´ãã¤ã¤åHTMLãã¡ã¤ã«ããã¨ã«æ£è¦è¡¨ç¾ç½®æãªã©ãç¨ãã¦æä½æ¥ã§ç·¨éãã¨ããã®ã確å®ããã ã...
使ç¨ãããã¼ã¸ã§ã³:
- Devhelp 2.30.1