OldStory/Home Linux
feed2html.py feed-to-HTML converter in Python
Alnilam
2013. 10. 2. 14:55
반응형
feed2html.py를 사용하면 RSS/RDF/Atom feed를 HTML문서로 변화 할 수 있다.
Using feed2html.py
from the command line:
For example, downloading the latest news for nerds from Slashdot:
Template 파일를 만들어 추가 하면 template에 맞게 페이지를 구성 할 수 있다.
다음은 본문(content)를 template에 추가하는 경우 tag 사용 법이다.
<tpl:contents>
<div class="content"><tpl:content value="value" filter="nl2br"/> </div>
</tpl:contents>
이 때 본문(content)이 HTML로 쓰여지지 않은 경우 개행문자(\n)를 <p> 와 <br>로 변경 해주 는 필터(filter="nl2br") 를 추가 해야 한다. 그렇지 않으면 개행문자가 무시 되어 문자들이 붙어서 표시 되어 보기 안좋은 문제가 있다!!!
http://scott.yang.id.au/2005/05/feed2html/
반응형