viva-parser-fb2 v1.0.8
Classes
Typedefs
Parser_fb2
(license MIT) parse text from fb2 format, example - see example.js
Kind: global class
- Parser_fb2
- .book : type_book
- .parse_error_list : Array.<Object>
- .parse(text) ⇒ boolean
- .get_cover_image() ⇒ string
- .get_formatted_annotation([option]) ⇒ string
- .get_formatted_text([option]) ⇒ string
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
Param | Type | Description |
---|---|---|
text | string | fb2-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
Param | Type |
---|---|
option | type_format |
parser_fb2.get_formatted_text(option) ⇒ string
get book text
Kind: instance method of Parser_fb2
Returns: string - formatted text
Param | Type |
---|---|
option | type_format |
type_author
Kind: global typedef
Properties
Name | Type |
---|---|
last_name | string |
middle_name | string |
first_name | string |
type_sequence
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
title | string | series name |
position | number | position in series |
type_text
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
path | string | xml path |
style_list | Array.<Object> | styles |
data | string | piece of text |
link | Object | link to note |
new_line_before | boolean | add or not new line before this piece of text |
type_link
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
id | string | id link |
path | string | xml path |
style_list | Array.<Object> | styles |
data | string | piece of link |
new_line_before | boolean | add or not new line before this piece of link |
type_binary
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
id | string | id binary resource |
content_type | string | content type |
data | string | binary value |
type_book
Kind: global typedef
Properties
Name | Type |
---|---|
title | string |
subtitle | string |
note | string |
origin_author | type_author |
origin_language | string |
translator_author | type_author |
translator_language | string |
sequence_list | Array.<type_sequence> |
genre_list | Array.<string> |
keyword_list | Array.<string> |
isbn | string |
cover_binary_id | string |
annotation | Array.<type_text> |
text | Array.<type_text> |
link | Array.<type_link> |
binary | Array.<type_binary> |
type_format
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
format | string | 'plain' or 'markdown', default 'plain' |
indent | string | indent for new paragraph, default ' ' (2 spaces) |
eol | boolean | allow end-of-line inside paragraph, default false |