"리눅스 html2text"의 두 판 사이의 차이

잔글 (로봇: 자동으로 텍스트 교체 (-http://jmnote.com/html5/ +http://zetawiki.com/ex/html5/))
잔글 (봇: 자동으로 텍스트 교체 (-<source lang='cli'> +<source lang='console'>))
 
3번째 줄: 3번째 줄:


==실습 1: 로컬 HTML 파일==
==실습 1: 로컬 HTML 파일==
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# cat /var/www/error/noindex.html | head -5
[root@zetawiki ~]# cat /var/www/error/noindex.html | head -5
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
11번째 줄: 11번째 줄:
         <title>Test Page for the Nginx HTTP Server on Fedora</title>
         <title>Test Page for the Nginx HTTP Server on Fedora</title>
</source>
</source>
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# cat /var/www/error/noindex.html | html2text | head -5
[root@zetawiki ~]# cat /var/www/error/noindex.html | html2text | head -5
****** Welcome to nginx on Fedora! ******
****** Welcome to nginx on Fedora! ******
21번째 줄: 21번째 줄:


==실습 2: 원격 HTML 파일==
==실습 2: 원격 HTML 파일==
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# curl -s http://zetawiki.com/ex/html5/select-listbox.php
[root@zetawiki ~]# curl -s http://zetawiki.com/ex/html5/select-listbox.php
<select name='fruits' size='10'>
<select name='fruits' size='10'>
29번째 줄: 29번째 줄:
<option value='lemon'>레몬</option>
<option value='lemon'>레몬</option>
</source>
</source>
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# curl -s http://zetawiki.com/ex/html5/select-listbox.php | html2text -utf8
[root@zetawiki ~]# curl -s http://zetawiki.com/ex/html5/select-listbox.php | html2text -utf8
[One of: -- 선택 --/사과/바나나/레몬]
[One of: -- 선택 --/사과/바나나/레몬]

2016년 3월 29일 (화) 12:36 기준 최신판

리눅스 html2text
/usr/bin/html2text

1 실습 1: 로컬 HTML 파일[ | ]

[root@zetawiki ~]# cat /var/www/error/noindex.html | head -5
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <title>Test Page for the Nginx HTTP Server on Fedora</title>
[root@zetawiki ~]# cat /var/www/error/noindex.html | html2text | head -5
****** Welcome to nginx on Fedora! ******
This page is used to test the proper operation of the nginx HTTP server after
it has been installed. If you can read this page, it means that the web server
installed at this site is working properly.
***** Website Administrator *****

2 실습 2: 원격 HTML 파일[ | ]

[root@zetawiki ~]# curl -s http://zetawiki.com/ex/html5/select-listbox.php
<select name='fruits' size='10'>
<option value='' selected='selected'>-- 선택 --</option>
<option value='apple'>사과</option>
<option value='banana'>바나나</option>
<option value='lemon'>레몬</option>
[root@zetawiki ~]# curl -s http://zetawiki.com/ex/html5/select-listbox.php | html2text -utf8
[One of: -- 선택 --/사과/바나나/레몬]

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}