forked from LiveCarta/BookConverter
Change presets structure(several conditions on 1 tag)
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"preset_name": "wrapper",
|
"preset_name": "wrapper",
|
||||||
"rules": [
|
"rules": [
|
||||||
{
|
{
|
||||||
@@ -34,7 +34,17 @@
|
|||||||
{
|
{
|
||||||
"name": "title",
|
"name": "title",
|
||||||
"value": "footer"
|
"value": "footer"
|
||||||
},
|
}
|
||||||
|
],
|
||||||
|
"text": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tags": ["^div$"],
|
||||||
|
"condition": {
|
||||||
|
"parent_tags": null,
|
||||||
|
"child_tags": null,
|
||||||
|
"attrs": [
|
||||||
{
|
{
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"value": "^Table of Contents\\d+"
|
"value": "^Table of Contents\\d+"
|
||||||
@@ -104,15 +114,44 @@
|
|||||||
"condition": {
|
"condition": {
|
||||||
"parent_tags": ":is(h1, h2, h3, h4, h5, h6, h7, h8, h9)",
|
"parent_tags": ":is(h1, h2, h3, h4, h5, h6, h7, h8, h9)",
|
||||||
"child_tags": null,
|
"child_tags": null,
|
||||||
|
"attrs": null,
|
||||||
|
"text": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tags": ["^span$"],
|
||||||
|
"condition": {
|
||||||
|
"parent_tags": null,
|
||||||
|
"child_tags": null,
|
||||||
"attrs": [
|
"attrs": [
|
||||||
{
|
{
|
||||||
"name": "style",
|
"name": "style",
|
||||||
"value": "(^background: #[\\da-fA-F]{6}$)|(^letter-spacing: -?[\\d.]+pt$)"
|
"value": "(^background: #[\\da-fA-F]{6}$)|(^letter-spacing: -?[\\d.]+pt$)"
|
||||||
},
|
}
|
||||||
|
],
|
||||||
|
"text": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tags": ["^span$"],
|
||||||
|
"condition": {
|
||||||
|
"parent_tags": null,
|
||||||
|
"child_tags": null,
|
||||||
|
"attrs": [
|
||||||
{
|
{
|
||||||
"name": "lang",
|
"name": "lang",
|
||||||
"value": "^ru-RU$"
|
"value": "^ru-RU$"
|
||||||
},
|
}
|
||||||
|
],
|
||||||
|
"text": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tags": ["^span$"],
|
||||||
|
"condition": {
|
||||||
|
"parent_tags": null,
|
||||||
|
"child_tags": null,
|
||||||
|
"attrs": [
|
||||||
{
|
{
|
||||||
"name": "face",
|
"name": "face",
|
||||||
"value": "^Times New Roman[\\w, ]+$"
|
"value": "^Times New Roman[\\w, ]+$"
|
||||||
@@ -148,6 +187,15 @@
|
|||||||
"tags": ["^u$"],
|
"tags": ["^u$"],
|
||||||
"condition": {
|
"condition": {
|
||||||
"parent_tags": ":is(a)",
|
"parent_tags": ":is(a)",
|
||||||
|
"child_tags": null,
|
||||||
|
"attrs": null,
|
||||||
|
"text": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tags": ["^u$"],
|
||||||
|
"condition": {
|
||||||
|
"parent_tags": null,
|
||||||
"child_tags": ":is(a)",
|
"child_tags": ":is(a)",
|
||||||
"attrs": null,
|
"attrs": null,
|
||||||
"text": null
|
"text": null
|
||||||
|
|||||||
@@ -11,15 +11,42 @@
|
|||||||
{
|
{
|
||||||
"name": "width",
|
"name": "width",
|
||||||
"value": ".*"
|
"value": ".*"
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tags": ["^div$"],
|
||||||
|
"condition": {
|
||||||
|
"parent_tags": null,
|
||||||
|
"child_tags": null,
|
||||||
|
"attrs": [
|
||||||
{
|
{
|
||||||
"name": "border",
|
"name": "border",
|
||||||
"value": ".*"
|
"value": ".*"
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tags": ["^div$"],
|
||||||
|
"condition": {
|
||||||
|
"parent_tags": null,
|
||||||
|
"child_tags": null,
|
||||||
|
"attrs": [
|
||||||
{
|
{
|
||||||
"name": "style",
|
"name": "style",
|
||||||
"value": "border.*"
|
"value": "border.*"
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tags": ["^div$"],
|
||||||
|
"condition": {
|
||||||
|
"parent_tags": null,
|
||||||
|
"child_tags": null,
|
||||||
|
"attrs": [
|
||||||
{
|
{
|
||||||
"name": "bgcolor",
|
"name": "bgcolor",
|
||||||
"value": ".*"
|
"value": ".*"
|
||||||
@@ -69,7 +96,7 @@
|
|||||||
{
|
{
|
||||||
"tags": ["^code$", "^kbd$", "^var$"],
|
"tags": ["^code$", "^kbd$", "^var$"],
|
||||||
"condition": {
|
"condition": {
|
||||||
"parent_tags": ":not(pre)",
|
"parent_tags": ":not(pre, span)",
|
||||||
"child_tags": null,
|
"child_tags": null,
|
||||||
"attrs": null
|
"attrs": null
|
||||||
},
|
},
|
||||||
@@ -99,6 +126,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"preset_name": "attrs_remover",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"tags": ["^sup$"],
|
||||||
|
"condition": null
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"preset_name": "attr_replacer",
|
"preset_name": "attr_replacer",
|
||||||
@@ -171,4 +207,4 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user