1.0.8 • Published 6 years ago

viva-parser-fb2 v1.0.8

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
6 years ago

Classes

Typedefs

Parser_fb2

(license MIT) parse text from fb2 format, example - see example.js

Kind: global class

parser_fb2.book : type_book

result parse fb2-formatted text

Kind: instance property of Parser_fb2

parser_fb2.parse_error_list : Array.<Object>

rlist of parsing error

Kind: instance property of Parser_fb2

parser_fb2.parse(text) ⇒ boolean

parse fb2-formatted text

Kind: instance method of Parser_fb2
Returns: boolean - fb2 or not fb2

ParamTypeDescription
textstringfb2-formatted text

parser_fb2.get_cover_image() ⇒ string

get book cover

Kind: instance method of Parser_fb2
Returns: string - image

parser_fb2.get_formatted_annotation(option) ⇒ string

get book annotation as text

Kind: instance method of Parser_fb2
Returns: string - formatted text

ParamType
optiontype_format

parser_fb2.get_formatted_text(option) ⇒ string

get book text

Kind: instance method of Parser_fb2
Returns: string - formatted text

ParamType
optiontype_format

type_author

Kind: global typedef
Properties

NameType
last_namestring
middle_namestring
first_namestring

type_sequence

Kind: global typedef
Properties

NameTypeDescription
titlestringseries name
positionnumberposition in series

type_text

Kind: global typedef
Properties

NameTypeDescription
pathstringxml path
style_listArray.<Object>styles
datastringpiece of text
linkObjectlink to note
new_line_beforebooleanadd or not new line before this piece of text

type_link

Kind: global typedef
Properties

NameTypeDescription
idstringid link
pathstringxml path
style_listArray.<Object>styles
datastringpiece of link
new_line_beforebooleanadd or not new line before this piece of link

type_binary

Kind: global typedef
Properties

NameTypeDescription
idstringid binary resource
content_typestringcontent type
datastringbinary value

type_book

Kind: global typedef
Properties

NameType
titlestring
subtitlestring
notestring
origin_authortype_author
origin_languagestring
translator_authortype_author
translator_languagestring
sequence_listArray.<type_sequence>
genre_listArray.<string>
keyword_listArray.<string>
isbnstring
cover_binary_idstring
annotationArray.<type_text>
textArray.<type_text>
linkArray.<type_link>
binaryArray.<type_binary>

type_format

Kind: global typedef
Properties

NameTypeDescription
formatstring'plain' or 'markdown', default 'plain'
indentstringindent for new paragraph, default ' ' (2 spaces)
eolbooleanallow end-of-line inside paragraph, default false
1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago