View Single Post
Old 02-02-2010, 05:33 AM   #14
Jacques_N
Zealot
Jacques_N can extract oil from cheeseJacques_N can extract oil from cheeseJacques_N can extract oil from cheeseJacques_N can extract oil from cheeseJacques_N can extract oil from cheeseJacques_N can extract oil from cheeseJacques_N can extract oil from cheeseJacques_N can extract oil from cheeseJacques_N can extract oil from cheese
 
Jacques_N's Avatar
 
Posts: 148
Karma: 1126
Join Date: Jan 2010
Location: Hamburg, http://osm.org/go/0HoMJR_kW--?layers=B000FFF
Device: Handera 330, bookeen gen 3(broken), PocketBook 360°, 360° Plus
Hier das Script

Voraussetzungen:
Die Module
- HTML::HeadParser;
- HTML::Filter;
müssen installiert sein, was aber z.B. bei ActiveState perl Standard ist.

Benutzung:

perl html_to_fb2.pl datei.html

oder auch:

perl html_to_fb2.pl *.html

es wird dann für jede x.html eine x.fb2 erzeugt

Für die Metadaten werden folgende Headereinträge erwartet:

<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Die Geburt einer Stahlratte</TITLE>
<META NAME="CLASSIFICATION" CONTENT="Roman">
<META NAME="BOOKTITLE" CONTENT="Die Geburt einer Stahlratte">
<META NAME="BOOKAUTHOR" CONTENT="Harrison">
<META NAME="BOOKREIHE" CONTENT="Stahlratte">
<META NAME="BOOKORDER" CONTENT="1">
<META NAME="BOOKDIR" CONTENT="Harrison">
<META NAME="LANG" CONTENT="de">
<META NAME="BOOKNAME" CONTENT="STAHL1">
</HEAD>

Im Moment werden nur <H2> Tags für das Inhaltsverzeichnis herangezogen.

Schöne Grüße
Jacques
Attached Files
File Type: zip html_to_fb2.zip (1.4 KB, 368 views)
Jacques_N is offline   Reply With Quote