Reference:
- Http://calibre-ebook.com/download_linux
- Http://blog.codinglabs.org/articles/convert-html-to-kindle-book.html
The Linux Command Line
#Tlcl.recipe fromCalibre.web.feeds.recipesImportBasicnewsrecipeclassThe_linux_command_line (basicnewsrecipe): Title='The Linux Command Line'Description='The Linux Command Line'Cover_url='http://img5.douban.com/lpic/s7056078.jpg'Url_pre='http://billie66.github.io/TLCL/book/'no_stylesheets=True keep_only_tags= [{'class':'Typo'}] #内容的寻找范围defParse_index (self): Soup= Self.index_to_soup (Self.url_pre)#catalog PageDiv= Soup.find ('Div', {'class':'Contents'})#search scope of the catalogue pageArticles= [] forLinkinchDiv.findall ('a'): til=link.contents[0].strip () URL= Self.url_pre + link['href'] a= {'title': Til,'URL': URL} articles.append (a) Results= [('The Linux Command Line', articles)] returnResults
Crawl Web content to generate Kindle ebook