diff options
author | Leonard Richardson <leonardr@segfault.org> | 2019-11-11 12:26:58 -0500 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2019-11-11 12:26:58 -0500 |
commit | 65259b4700e741ac440b07e33c4a42eebe32aa8b (patch) | |
tree | 1a400361d44d380a1f2a13e3f05701620f69b9bf | |
parent | d24a72dc676cbf3d2f2e3aa951afd7d0d6bce1d5 (diff) |
Improved the presentation of the Korean translation.
-rw-r--r-- | doc.jp/index.html (renamed from doc.html/index.jp.html) | 0 | ||||
-rw-r--r-- | doc.ko/6.1.jpg | bin | 0 -> 22619 bytes | |||
-rw-r--r-- | doc.ko/index.css | 599 | ||||
-rw-r--r-- | doc.ko/index.html (renamed from doc.html/index.kr.html) | 48 | ||||
-rw-r--r-- | doc.ptbr/source/index.rst | 8 | ||||
-rw-r--r-- | doc.zh/source/index.rst | 5 | ||||
-rw-r--r-- | doc/source/README | 7 | ||||
-rw-r--r-- | doc/source/index.rst | 6 |
8 files changed, 636 insertions, 37 deletions
diff --git a/doc.html/index.jp.html b/doc.jp/index.html index 7f5d8e6..7f5d8e6 100644 --- a/doc.html/index.jp.html +++ b/doc.jp/index.html diff --git a/doc.ko/6.1.jpg b/doc.ko/6.1.jpg Binary files differnew file mode 100644 index 0000000..97014f0 --- /dev/null +++ b/doc.ko/6.1.jpg diff --git a/doc.ko/index.css b/doc.ko/index.css new file mode 100644 index 0000000..c89fc7e --- /dev/null +++ b/doc.ko/index.css @@ -0,0 +1,599 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox input[type="text"] { + width: 170px; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + width: 30px; +} + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li div.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable dl, table.indextable dd { + margin-top: 0; + margin-bottom: 0; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- general body styles --------------------------------------------------- */ + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.field-list ul { + padding-left: 1em; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px 7px 0 7px; + background-color: #ffe; + width: 40%; + float: right; +} + +p.sidebar-title { + font-weight: bold; +} + +/* -- topics ---------------------------------------------------------------- */ + +div.topic { + border: 1px solid #ccc; + padding: 7px 7px 0 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +div.admonition dl { + margin-bottom: 0; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + border: 0; + border-collapse: collapse; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +table.field-list td, table.field-list th { + border: 0 !important; +} + +table.footnote td, table.footnote th { + border: 0 !important; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text { +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +dl { + margin-bottom: 15px; +} + +dd p { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dt:target, .highlighted { + background-color: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +td.linenos pre { + padding: 5px 0px; + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + margin-left: 0.5em; +} + +table.highlighttable td { + padding: 0 0.5em 0 0.5em; +} + +div.code-block-caption { + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +div.code-block-caption + div > div.highlight > pre { + margin-top: 0; +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + padding: 1em 1em 0; +} + +div.literal-block-wrapper div.highlight { + margin: 0; +} + +code.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; +} + +code.descclassname { + background-color: transparent; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +}
\ No newline at end of file diff --git a/doc.html/index.kr.html b/doc.ko/index.html index 03319c6..48f4de9 100644 --- a/doc.html/index.kr.html +++ b/doc.ko/index.html @@ -13,16 +13,16 @@ - <link rel="top" title="뷰티플수프 4.0.0 documentation" href="http://www.crummy.com/software/BeautifulSoup/bs4/doc/#"> + <link rel="top" title="뷰티플수프 4.0.0 documentation" href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/#"> -<link rel="stylesheet" type="text/css" href="/web/20150319200824cs_/http://coreapython.hosting.paran.com/etc/index_files/index.css" media="all"> +<link rel="stylesheet" type="text/css" href="index.css" media="all"> </head> <body> <div class="related"> <h3>목차</h3> <ul> <li class="right" style="margin-right: 10px;"> - <a href="https://web.archive.org/web/20150319200824/http://www.crummy.com/software/BeautifulSoup/bs4/doc/genindex.html" title="General Index" accesskey="I">인덱스</a></li> + <a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/genindex.html" title="General Index" accesskey="I">인덱스</a></li> <li><a href="#">뷰티플수프 4.0.0 문서</a> »</li> </ul> </div> @@ -33,15 +33,15 @@ <div class="body"> <div class="section" id="beautiful-soup-documentation"> -<h1>뷰티플수프 문서<a class="headerlink" href="#beautiful-soup-documentation" title="Permalink to this headline">¶</a></h1> 한글판 johnsonj 2012.11.08 <a href="https://web.archive.org/web/20150319200824/http://www.crummy.com/software/BeautifulSoup/bs4/doc/index.html">원문 위치</a> -<img alt=""The Fish-Footman began by producing from under his arm a great letter, nearly as large as himself."" class="align-right" src="/web/20150319200824im_/http://coreapython.hosting.paran.com/etc/index_files/6.jpg"> -<p><a class="reference external" href="https://web.archive.org/web/20150319200824/http://www.crummy.com/software/BeautifulSoup/">뷰티플수프</a>는 HTML과 XML 파일로부터 데이터를 뽑아내기 위한 파이썬 라이브러리이다. 여러분이 선호하는 해석기와 함께 사용하여 일반적인 방식으로 해석 트리를 항해, 검색, 변경할 수 있다. 주로 프로그래머의 수고를 덜어준다.</p> +<h1>뷰티플수프 문서<a class="headerlink" href="#beautiful-soup-documentation" title="Permalink to this headline">¶</a></h1> 한글판 johnsonj 2012.11.08 <a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.html">원문 위치</a> +<img alt=""The Fish-Footman began by producing from under his arm a great letter, nearly as large as himself."" class="align-right" src="6.1.jpg"> +<p><a class="reference external" href="https://www.crummy.com/software/BeautifulSoup/">뷰티플수프</a>는 HTML과 XML 파일로부터 데이터를 뽑아내기 위한 파이썬 라이브러리이다. 여러분이 선호하는 해석기와 함께 사용하여 일반적인 방식으로 해석 트리를 항해, 검색, 변경할 수 있다. 주로 프로그래머의 수고를 덜어준다.</p> <p>이 지도서에서는 뷰티플수프 4의 중요한 특징들을 예제와 함께 모두 보여준다. 이 라이브러리가 어느 곳에 유용한지, 어떻게 작동하는지, 또 어떻게 사용하는지, 어떻게 원하는대로 바꿀 수 있는지, 예상을 빗나갔을 때 어떻게 해야 하는지를 보여준다.</p> <p>이 문서의 예제들은 파이썬 2.7과 Python 3.2에서 똑 같이 작동한다.</p> -<p>혹시 <a class="reference external" href="https://web.archive.org/web/20150319200824/http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html">뷰티플수프 3</a>에 관한 문서를 찾고 계신다면 뷰티플수프 3는 더 이상 개발되지 않는다는 사실을 꼭 아셔야겠다. 새로 프로젝트를 시작한다면 뷰티플수프 4를 적극 추천한다. 뷰티플수프 3와 뷰티플수프 4의 차이점은 <a class="reference internal" href="#porting-code-to-bs4">BS4 코드 이식하기</a>를 참조하자.</p> +<p>혹시 <a class="reference external" href="https://www.crummy.com/software/BeautifulSoup/bs3/documentation.html">뷰티플수프 3</a>에 관한 문서를 찾고 계신다면 뷰티플수프 3는 더 이상 개발되지 않는다는 사실을 꼭 아셔야겠다. 새로 프로젝트를 시작한다면 뷰티플수프 4를 적극 추천한다. 뷰티플수프 3와 뷰티플수프 4의 차이점은 <a class="reference internal" href="#porting-code-to-bs4">BS4 코드 이식하기</a>를 참조하자.</p> <div class="section" id="getting-help"> <h2>도움 얻기<a class="headerlink" href="#getting-help" title="Permalink to this headline">¶</a></h2> -<p>뷰피플수프에 의문이 있거나, 문제에 봉착하면 <a class="reference external" href="https://web.archive.org/web/20150319200824/http://groups.google.com/group/beautifulsoup/">토론 그룹에 메일을 보내자</a>.</p> +<p>뷰피플수프에 의문이 있거나, 문제에 봉착하면 <a class="reference external" href="http://groups.google.com/group/beautifulsoup/">토론 그룹에 메일을 보내자</a>.</p> </div> </div> <div class="section" id="quick-start"> @@ -166,9 +166,9 @@ <tt class="docutils literal"><span class="pre">pip</span></tt>로 설치할 수 있다. 꾸러미 이름은 <tt class="docutils literal"><span class="pre">beautifulsoup4</span></tt>이며, 같은 꾸러미로 파이썬 2 그리고 파이썬 3에 작동한다.</p> <p><tt class="kbd docutils literal"><span class="pre">$</span> <span class="pre">easy_install</span> <span class="pre">beautifulsoup4</span></tt></p> <p><tt class="kbd docutils literal"><span class="pre">$</span> <span class="pre">pip</span> <span class="pre">install</span> <span class="pre">beautifulsoup4</span></tt></p> -<p>(이 <tt class="docutils literal"><span class="pre">BeautifulSoup</span></tt> 꾸러미가 혹시 <cite>원하는 것이 아니라면</cite>. 이전 버전으로 <a class="reference external" href="https://web.archive.org/web/20150319200824/http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html">뷰티플수프 3</a>가 있다. 많은 소프트웨에서 BS3를 사용하고 있으므로, 여전히 사용할 수 있다. 그러나 새로 코드를 작성할 생각이라면 <tt class="docutils literal"><span class="pre">beautifulsoup4</span></tt>를 설치하시기 바란다.)</p> +<p>(이 <tt class="docutils literal"><span class="pre">BeautifulSoup</span></tt> 꾸러미가 혹시 <cite>원하는 것이 아니라면</cite>. 이전 버전으로 <a class="reference external" href="https://www.crummy.com/software/BeautifulSoup/bs3/documentation.html">뷰티플수프 3</a>가 있다. 많은 소프트웨에서 BS3를 사용하고 있으므로, 여전히 사용할 수 있다. 그러나 새로 코드를 작성할 생각이라면 <tt class="docutils literal"><span class="pre">beautifulsoup4</span></tt>를 설치하시기 바란다.)</p> <p><tt class="docutils literal"><span class="pre">easy_install</span></tt>도 <tt class="docutils literal"><span class="pre">pip</span></tt>도 설치되어 있지 않다면, -<a class="reference external" href="https://web.archive.org/web/20150319200824/http://www.crummy.com/software/BeautifulSoup/download/4.x/">뷰티플수프 4 소스</a>를 내려 받아 <tt class="docutils literal"><span class="pre">setup.py</span></tt>로 설치하실 수 있다.</p> +<a class="reference external" href="https://www.crummy.com/software/BeautifulSoup/download/4.x/">뷰티플수프 4 소스</a>를 내려 받아 <tt class="docutils literal"><span class="pre">setup.py</span></tt>로 설치하실 수 있다.</p> <p><tt class="kbd docutils literal"><span class="pre">$</span> <span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">install</span></tt></p> <p> 다른 모든 것이 실패하더라도, 뷰티플수프 라이센스는 여러분의 어플리케이션에 통채로 꾸려 넣는 것을 허용하므로 전혀 설치할 필요없이 소스를 내려받아 <tt class="docutils literal"><span class="pre">bs4</span></tt> 디렉토리를 통채로 코드베이스에 복사해서 사용하셔도 된다.</p> @@ -188,11 +188,11 @@ </div> <div class="section" id="installing-a-parser"> <span id="parser-installation"></span><h2>해석기 설치하기<a class="headerlink" href="#installing-a-parser" title="Permalink to this headline">¶</a></h2> -<p>뷰티플수프는 파이썬 표준 라이브러리에 포함된 HTML 해석기를 지원하지만, 또 수 많은 제-삼자 파이썬 해석기도 지원한다. 그 중 하나는 <a class="reference external" href="https://web.archive.org/web/20150319200824/http://lxml.de/">lxml 해석기</a>이다. 설정에 따라, 다음 명령어들 중 하나로 lxml을 설치하는 편이 좋을 경우가 있다:</p> +<p>뷰티플수프는 파이썬 표준 라이브러리에 포함된 HTML 해석기를 지원하지만, 또 수 많은 제-삼자 파이썬 해석기도 지원한다. 그 중 하나는 <a class="reference external" href="http://lxml.de/">lxml 해석기</a>이다. 설정에 따라, 다음 명령어들 중 하나로 lxml을 설치하는 편이 좋을 경우가 있다:</p> <p><tt class="kbd docutils literal"><span class="pre">$</span> <span class="pre">apt-get</span> <span class="pre">install</span> <span class="pre">python-lxml</span></tt></p> <p><tt class="kbd docutils literal"><span class="pre">$</span> <span class="pre">easy_install</span> <span class="pre">lxml</span></tt></p> <p><tt class="kbd docutils literal"><span class="pre">$</span> <span class="pre">pip</span> <span class="pre">install</span> <span class="pre">lxml</span></tt></p> -<p>파이썬 2를 사용중이라면, 또다른 대안은 순수-파이썬 <a class="reference external" href="https://web.archive.org/web/20150319200824/http://code.google.com/p/html5lib/">html5lib 해석기</a>를 사용하는 것인데, 이 해석기는 HTML을 웹 브라우저가 해석하는 방식으로 해석한다. 설정에 따라 다음 명령어중 하나로 html5lib를 설치하는 것이 좋을 때가 있다:</p> +<p>파이썬 2를 사용중이라면, 또다른 대안은 순수-파이썬 <a class="reference external" href="http://code.google.com/p/html5lib/">html5lib 해석기</a>를 사용하는 것인데, 이 해석기는 HTML을 웹 브라우저가 해석하는 방식으로 해석한다. 설정에 따라 다음 명령어중 하나로 html5lib를 설치하는 것이 좋을 때가 있다:</p> <p><tt class="kbd docutils literal"><span class="pre">$</span> <span class="pre">apt-get</span> <span class="pre">install</span> <span class="pre">python-html5lib</span></tt></p> <p><tt class="kbd docutils literal"><span class="pre">$</span> <span class="pre">easy_install</span> <span class="pre">html5lib</span></tt></p> <p><tt class="kbd docutils literal"><span class="pre">$</span> <span class="pre">pip</span> <span class="pre">install</span> <span class="pre">html5lib</span></tt></p> @@ -1316,7 +1316,7 @@ a_string.find_parents("p", class="title") </div> <div class="section" id="css-selectors"> <h2>CSS 선택자<a class="headerlink" href="#css-selectors" title="Permalink to this headline">¶</a></h2> -<p>뷰티플수프는 <a class="reference external" href="https://web.archive.org/web/20150319200824/http://www.w3.org/TR/CSS2/selector.html">CSS 선택자 표준</a>의 부분집합을 지원한다. 그냥 문자열로 선택자를 구성하고 그것을 <tt class="docutils literal"><span class="pre">Tag</span></tt>의 <tt class="docutils literal"><span class="pre">.select()</span></tt> 메쏘드 또는 <tt class="docutils literal"><span class="pre">BeautifulSoup</span></tt> 객체 자체에 건네면 된다.</p> +<p>뷰티플수프는 <a class="reference external" href="http://www.w3.org/TR/CSS2/selector.html">CSS 선택자 표준</a>의 부분집합을 지원한다. 그냥 문자열로 선택자를 구성하고 그것을 <tt class="docutils literal"><span class="pre">Tag</span></tt>의 <tt class="docutils literal"><span class="pre">.select()</span></tt> 메쏘드 또는 <tt class="docutils literal"><span class="pre">BeautifulSoup</span></tt> 객체 자체에 건네면 된다.</p> <p>다음과 같이 태그를 검색할 수 있다:</p> <div class="highlight-python"><div class="highlight"><pre><span class="n">soup</span><span class="o">.</span><span class="n">select</span><span class="p">(</span><span class="s">"title"</span><span class="p">)</span> <span class="c"># [<title>The Dormouse's story</title>]</span> @@ -2136,7 +2136,7 @@ soup.original_encoding <li>알고 있는데 문서에서 그 태그를 발견할 수 없다면 (다시 말해, <tt class="docutils literal"><span class="pre">find_all()</span></tt>이 <tt class="docutils literal"><span class="pre">[]</span></tt>를 돌려주거나 <tt class="docutils literal"><span class="pre">find()</span></tt>가 <tt class="docutils literal"><span class="pre">None</span></tt>을 돌려줄 경우), 아마도 파이썬의 내장 HTML 해석기를 사용하고 있을 가능성이 높다. 이 해석기는 가끔 이해하지 못하면 그 태그를 무시하고 지나간다. 해결책: <a class="reference internal" href="#parser-installation"><em>lxml이나 html5lib를 설치하자.</em></a></li> <li> -<a class="reference external" href="https://web.archive.org/web/20150319200824/http://www.w3.org/TR/html5/syntax.html#syntax">HTML 태그와 속성</a>은 대소문자를 구별하므로, 세가지 HTML 해석기 모두 태그와 속성 이름을 소문자로 변환한다. 다시 말해, 다음 조판 <TAG></TAG>는 <tag></tag>로 변환된다. 태그와 속성에 대소문자 혼합 또는 대문자를 그대로 유지하고 싶다면, <a class="reference internal" href="#parsing-xml"><em>문서를 XML로 해석할 필요가 있다.</em></a></li> +<a class="reference external" href="http://www.w3.org/TR/html5/syntax.html#syntax">HTML 태그와 속성</a>은 대소문자를 구별하므로, 세가지 HTML 해석기 모두 태그와 속성 이름을 소문자로 변환한다. 다시 말해, 다음 조판 <TAG></TAG>는 <tag></tag>로 변환된다. 태그와 속성에 대소문자 혼합 또는 대문자를 그대로 유지하고 싶다면, <a class="reference internal" href="#parsing-xml"><em>문서를 XML로 해석할 필요가 있다.</em></a></li> </ul> </div> <div class="section" id="miscellaneous"> @@ -2145,14 +2145,14 @@ soup.original_encoding <li><tt class="docutils literal"><span class="pre">KeyError:</span> <span class="pre">[attr]</span></tt> - <tt class="docutils literal"><span class="pre">tag['attr']</span></tt>에 접근했는데 해당 태그에 <tt class="docutils literal"><span class="pre">attr</span></tt> 속성이 정의되어 있지 않을 때 야기된다. 가장 흔한 에러는 <tt class="docutils literal"><span class="pre">KeyError:</span> <span class="pre">'href'</span></tt> 그리고 <tt class="docutils literal"><span class="pre">KeyError:</span> <span class="pre">'class'</span></tt>이다. <tt class="docutils literal"><span class="pre">attr</span></tt>이 정의되어 있는지 잘 모르겠다면, 파이썬 사전에 그렇게 하듯이, <tt class="docutils literal"><span class="pre">tag.get('attr')</span></tt>을 사용하자.</li> <li><tt class="docutils literal"><span class="pre">UnicodeEncodeError:</span> <span class="pre">'charmap'</span> <span class="pre">codec</span> <span class="pre">can't</span> <span class="pre">encode</span> <span class="pre">character</span> -<span class="pre">u'\xfoo'</span> <span class="pre">in</span> <span class="pre">position</span> <span class="pre">bar</span></tt> (또는 그냥 기타 다른 <tt class="docutils literal"><span class="pre">UnicodeEncodeError</span></tt>에 관한 모든 것) - 이 에러는 뷰티플수프에 관련된 문제가 아니다 .이 문제는 두 가지 상황에서 출현한다. 첫 째, 유니코드 문자열을 인쇄했는데 콘솔이 표시할 줄 모를 경우가 있다. (<a class="reference external" href="https://web.archive.org/web/20150319200824/http://wiki.python.org/moin/PrintFails">파이썬 위키에서</a> 도움을 받자.) 둘째, 파일에 쓰는데 기본 인코딩으로 지원되지 않는 유니코드 문자열을 건넬 경우가 있다. 이런 경우, 가장 쉬운 해결책은 <tt class="docutils literal"><span class="pre">u.encode("utf8")</span></tt>을 지정해서 그 유니코드 문자열을 UTF-8로 명시적으로 인코드하는 것이다.</li> +<span class="pre">u'\xfoo'</span> <span class="pre">in</span> <span class="pre">position</span> <span class="pre">bar</span></tt> (또는 그냥 기타 다른 <tt class="docutils literal"><span class="pre">UnicodeEncodeError</span></tt>에 관한 모든 것) - 이 에러는 뷰티플수프에 관련된 문제가 아니다 .이 문제는 두 가지 상황에서 출현한다. 첫 째, 유니코드 문자열을 인쇄했는데 콘솔이 표시할 줄 모를 경우가 있다. (<a class="reference external" href="http://wiki.python.org/moin/PrintFails">파이썬 위키에서</a> 도움을 받자.) 둘째, 파일에 쓰는데 기본 인코딩으로 지원되지 않는 유니코드 문자열을 건넬 경우가 있다. 이런 경우, 가장 쉬운 해결책은 <tt class="docutils literal"><span class="pre">u.encode("utf8")</span></tt>을 지정해서 그 유니코드 문자열을 UTF-8로 명시적으로 인코드하는 것이다.</li> </ul> </div> <div class="section" id="improving-performance"> <h2>수행성능 개선<a class="headerlink" href="#improving-performance" title="Permalink to this headline">¶</a></h2> -<p>뷰티플수프는 그 밑에 깔린 해석기보다 더 빠를 수는 없다. 응답 시간이 중요하다면, 다시 말해, 시간제로 컴퓨터를 쓰고 있거나 아니면 컴퓨터 시간이 프로그래머 시간보다 더 가치가 있는 다른 이유가 조금이라도 있다면, 그렇다면 뷰티플수프는 잊어 버리고 직접 <a class="reference external" href="https://web.archive.org/web/20150319200824/http://lxml.de/">lxml</a> 위에 작업하는 편이 좋을 것이다.</p> +<p>뷰티플수프는 그 밑에 깔린 해석기보다 더 빠를 수는 없다. 응답 시간이 중요하다면, 다시 말해, 시간제로 컴퓨터를 쓰고 있거나 아니면 컴퓨터 시간이 프로그래머 시간보다 더 가치가 있는 다른 이유가 조금이라도 있다면, 그렇다면 뷰티플수프는 잊어 버리고 직접 <a class="reference external" href="http://lxml.de/">lxml</a> 위에 작업하는 편이 좋을 것이다.</p> <p>그렇지만, 뷰티플수프의 속도를 높일 수 있는 방법이 있다. 아래에 해석기로 lxml을 사용하고 있지 않다면, <a class="reference internal" href="#parser-installation"><em>당장 시작해 보기를</em></a> 조언한다. 뷰티플수프는 html.parser나 html5lib를 사용하는 것보다 lxml을 사용하는 것이 문서를 상당히 더 빠르게 해석한다.</p> -<p><a class="reference external" href="https://web.archive.org/web/20150319200824/http://pypi.python.org/pypi/cchardet/">cchardet</a> 라이브러리를 설치하면 인코딩 탐지 속도를 상당히 높일 수 있다.</p> +<p><a class="reference external" href="http://pypi.python.org/pypi/cchardet/">cchardet</a> 라이브러리를 설치하면 인코딩 탐지 속도를 상당히 높일 수 있다.</p> <p>가끔 <a class="reference internal" href="#unicode-dammit">Unicode, Dammit</a>는 바이트별로 파일을 조사해서 인코딩을 탐지할 수 있을 뿐이다. 이 때문에 뷰티플수프가 기어가는 원인이 된다. 본인의 테스트에 의하면 이런 일은 파이썬 2.x 버전대에서만 일어나고, 러시아나 중국어 인코딩을 사용한 문서에 아주 많이 발생했다. 이런 일이 일어나면, cchardet을 설치하거나, 스크립트에 Python 3를 사용하여 문제를 해결할 수 있다. 혹시 문서의 인코딩을 안다면, 그 인코딩을 <tt class="docutils literal"><span class="pre">BeautifulSoup</span></tt> 구성자에 <tt class="docutils literal"><span class="pre">from_encoding</span></tt>로 건네면, 인코딩 탐지를 완전히 건너뛴다.</p> <p><a class="reference internal" href="#parsing-only-part-of-a-document">문서의 일부만 해석하기</a>는 문서를 해석하는 시간을 많이 절약해 주지는 못하겠지만, 메모리가 절약되고, 문서를 훨씬 더 빨리 <cite>탐색할 수 있을 것이다</cite>.</p> </div> @@ -2165,9 +2165,9 @@ soup.original_encoding <p><tt class="kbd docutils literal"><span class="pre">$</span> <span class="pre">easy_install</span> <span class="pre">BeautifulSoup</span></tt></p> <p><tt class="kbd docutils literal"><span class="pre">$</span> <span class="pre">pip</span> <span class="pre">install</span> <span class="pre">BeautifulSoup</span></tt></p> <p> -또한 <a class="reference external" href="https://web.archive.org/web/20150319200824/http://www.crummy.com/software/BeautifulSoup/bs3/download/3.x/BeautifulSoup-3.2.0.tar.gz">뷰티플수프 3.2.0</a> 압축파일을 내려받을 수 있다.</p> +또한 <a class="reference external" href="https://www.crummy.com/software/BeautifulSoup/bs3/download/3.x/BeautifulSoup-3.2.0.tar.gz">뷰티플수프 3.2.0</a> 압축파일을 내려받을 수 있다.</p> <p><tt class="docutils literal"><span class="pre">easy_install</span> <span class="pre">beautifulsoup</span></tt>이나 <tt class="docutils literal"><span class="pre">easy_install</span> <span class="pre">BeautifulSoup</span></tt>을 실행했는데, 코드가 작동하지 않으면, 실수로 뷰티플수프 3을 설치한 것이다. <tt class="docutils literal"><span class="pre">easy_install</span> <span class="pre">beautifulsoup4</span></tt>을 실행할 필요가 있다.</p> -<p><a class="reference external" href="https://web.archive.org/web/20150319200824/http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html">뷰티플수프 3 문서는 온라인에 보관되어 있다</a>. 모국어가 중국어라면, <a class="reference external" href="https://web.archive.org/web/20150319200824/http://www.crummy.com/software/BeautifulSoup/bs3/documentation.zh.html">뷰티플수프 3 문서 중국어 번역본</a>을 보는 것이 더 쉬울 것이다. 그 다음에 이 문서를 읽고 뷰티플수프 4에서 변한 것들을 알아보자.</p> +<p><a class="reference external" href="https://www.crummy.com/software/BeautifulSoup/bs3/documentation.html">뷰티플수프 3 문서는 온라인에 보관되어 있다</a>. 모국어가 중국어라면, <a class="reference external" href="https://www.crummy.com/software/BeautifulSoup/bs3/documentation.zh.html">뷰티플수프 3 문서 중국어 번역본</a>을 보는 것이 더 쉬울 것이다. 그 다음에 이 문서를 읽고 뷰티플수프 4에서 변한 것들을 알아보자.</p> <div class="section" id="porting-code-to-bs4"> <h2>BS4로 코드 이식하기<a class="headerlink" href="#porting-code-to-bs4" title="Permalink to this headline">¶</a></h2> <p> @@ -2183,7 +2183,7 @@ soup.original_encoding <li>“No module named BeautifulSoup”와 같이 <tt class="docutils literal"><span class="pre">ImportError</span></tt>를 만난다면, 문제는 뷰티플수프 3 코드를 시도하는데 뷰티플수프 4만 설치되어 있기 때문이다.</li> <li>“No module named bs4”와 같은 <tt class="docutils literal"><span class="pre">ImportError</span></tt>를 만난다면, 문제는 뷰티플수프 4 코드를 시도하는데 뷰티플수프 3만 설치되어 있기 때문이다.</li> </ul> -<p>BS4는 BS3와 대부분 하위 호환성이 있으므로, 대부분의 메쏘드는 폐기되고 <a class="reference external" href="https://web.archive.org/web/20150319200824/http://www.python.org/dev/peps/pep-0008/">PEP 8을 준수하기 위해</a> 새로운 이름이 주어졌다. 이름바꾸기와 변화가 많이 있지만, 그 중에 몇 가지는 하위 호환성이 깨진다.</p> +<p>BS4는 BS3와 대부분 하위 호환성이 있으므로, 대부분의 메쏘드는 폐기되고 <a class="reference external" href="http://www.python.org/dev/peps/pep-0008/">PEP 8을 준수하기 위해</a> 새로운 이름이 주어졌다. 이름바꾸기와 변화가 많이 있지만, 그 중에 몇 가지는 하위 호환성이 깨진다.</p> <p>다음은 BS3 코드를 변환해 BS4에 이식하고자 할 때 알아야 할 것들이다:</p> <div class="section" id="you-need-a-parser"> <h3>해석기가 필요해<a class="headerlink" href="#you-need-a-parser" title="Permalink to this headline">¶</a></h3> @@ -2438,11 +2438,11 @@ HTML이나 XML 개체가 들어 오면 언제나 그에 상응하는 유니코 <h3>이 페이지</h3> <ul class="this-page-menu"> - <li><a href="https://web.archive.org/web/20150319200824/http://www.crummy.com/software/BeautifulSoup/bs4/doc/_sources/index.txt" rel="nofollow">소스 보여주기</a></li> + <li><a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/_sources/index.txt" rel="nofollow">소스 보여주기</a></li> </ul> <div id="searchbox" style=""> <h3>빠른 검색</h3> - <form class="search" action="https://web.archive.org/web/20150319200824/http://www.crummy.com/software/BeautifulSoup/bs4/doc/search.html" method="get"> + <form class="search" action="https://www.crummy.com/software/BeautifulSoup/bs4/doc/search.html" method="get"> <input name="q" type="text"> <input value="Go" type="submit"> <input name="check_keywords" value="yes" type="hidden"> @@ -2461,13 +2461,13 @@ HTML이나 XML 개체가 들어 오면 언제나 그에 상응하는 유니코 <h3>항해</h3> <ul> <li class="right" style="margin-right: 10px;"> - <a href="https://web.archive.org/web/20150319200824/http://www.crummy.com/software/BeautifulSoup/bs4/doc/genindex.html" title="General Index">인덱스</a></li> + <a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/genindex.html" title="General Index">인덱스</a></li> <li><a href="#">뷰티플수프 4.0.0 문서</a> »</li> </ul> </div> <div class="footer"> © Copyright 2012, Leonard Richardson. - Created using <a href="https://web.archive.org/web/20150319200824/http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> diff --git a/doc.ptbr/source/index.rst b/doc.ptbr/source/index.rst index 9997481..b2fc3f5 100644 --- a/doc.ptbr/source/index.rst +++ b/doc.ptbr/source/index.rst @@ -26,11 +26,11 @@ Se você quiser saber as diferenças entre as versões 3 e 4, veja `Portabilidad Esta documentação foi traduzida para outros idiomas pelos usuários do Beautiful Soup: -* `这篇文档当然还有中文版. <https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html>`_ +* `这篇文档当然还有中文版. <https://www.crummy.com/software/BeautifulSoup/bs4/doc.zh/>`_ * このページは日本語で利用できます(`外部リンク <http://kondou.com/BS4/>`_) -* 이 문서는 한국어 번역도 가능합니다. (`외부 링크 <https://web.archive.org/web/20150319200824/http://coreapython.hosting.paran.com/etc/beautifulsoup4.html>`_) -* Este documento também está disponível em Português do Brasil - +* `이 문서는 한국어 번역도 가능합니다. https://www.crummy.com/software/BeautifulSoup/bs4/doc.ko/>`_ +* `Este documento também está disponível em Português do Brasil.` <https://www.crummy.com/software/BeautifulSoup/bs4/doc.ptbr/>` + Como conseguir ajuda: --------------------- diff --git a/doc.zh/source/index.rst b/doc.zh/source/index.rst index 03d2e05..3b1fd27 100644 --- a/doc.zh/source/index.rst +++ b/doc.zh/source/index.rst @@ -16,9 +16,10 @@ Beautiful Soup 4.4.0 文档 这篇帮助文档已经被翻译成了其它语言: -* `这篇文档当然还有中文版. <http://www.crummy.com/software/BeautifulSoup/bs4/doc/index.cn.html>`_ +* `这篇文档当然还有中文版. <https://www.crummy.com/software/BeautifulSoup/bs4/doc.zh/>`_ * このページは日本語で利用できます(`外部リンク <http://kondou.com/BS4/>`_) -* 이 문서는 한국어 번역도 가능합니다. (`외부 링크 <http://coreapython.hosting.paran.com/etc/beautifulsoup4.html>`_) +* `이 문서는 한국어 번역도 가능합니다. https://www.crummy.com/software/BeautifulSoup/bs4/doc.ko/>`_ +* `Este documento também está disponível em Português do Brasil.` <https://www.crummy.com/software/BeautifulSoup/bs4/doc.ptbr/>` 寻求帮助 diff --git a/doc/source/README b/doc/source/README index 6fbab84..46478b2 100644 --- a/doc/source/README +++ b/doc/source/README @@ -5,11 +5,10 @@ I keep a copy of all translations in this repository so that it's easy to host translations on the Beautiful Soup website. These are generally not the canonical versions of the translations, though. -doc.html/index.jp.html is a copy of the 2013 Japanese translation hosted at -http://kondou.com/BS4/. I don't know who to credit for the -translation. +doc.jp/index.html is a copy of the 2013 Japanese translation hosted at +http://kondou.com/BS4/. Translation credit goes to "shige". -doc.html/index.kr.html is a copy of the 2012 Korean translation formerly hosted +doc.ko/index.html is a copy of the 2012 Korean translation formerly hosted at http://coreapython.hosting.paran.com/etc/beautifulsoup4.html. I retrieved this copy from the Wayback Machine. I'm not sure who wrote the translation but I believe the credit goes to "Johnsonj". diff --git a/doc/source/index.rst b/doc/source/index.rst index 08063a5..1d1472f 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -29,10 +29,10 @@ Soup 3 and Beautiful Soup 4, see `Porting code to BS4`_. This documentation has been translated into other languages by Beautiful Soup users: -* `这篇文档当然还有中文版. <https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html>`_ +* `这篇文档当然还有中文版. <https://www.crummy.com/software/BeautifulSoup/bs4/doc.zh/>`_ * このページは日本語で利用できます(`外部リンク <http://kondou.com/BS4/>`_) -* 이 문서는 한국어 번역도 가능합니다. (`외부 링크 <https://web.archive.org/web/20150319200824/http://coreapython.hosting.paran.com/etc/beautifulsoup4.html>`_) -* `Este documento também está disponível em Português do Brasil.` <https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.ptbr.html>` +* `이 문서는 한국어 번역도 가능합니다. https://www.crummy.com/software/BeautifulSoup/bs4/doc.ko/>`_ +* `Este documento também está disponível em Português do Brasil.` <https://www.crummy.com/software/BeautifulSoup/bs4/doc.ptbr/>` Getting help ------------ |