Skip to content

Commit

Permalink
docs: rename generate_rules -> process_rules
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 29, 2021
1 parent 6aca2f4 commit 9954645
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions examples/story/0036-auto-generate-pdf-papers-to-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ created_date: 2021-12-29 08:20:11
updated_date: 2021-12-29 20:06:11
---

Set auto generated properties for node-info ? or in entries define?
Set auto processing pdf files;

1. watch path for pdf files join
2. generate pdf content
2. processing pdf content
3. rename pdf content papers
4. search support in quake

##

```yaml
generate_rules:
process_rules:
- engine: pdf
flow: from("file").to("content")
- engine: epub
Expand All @@ -27,7 +27,7 @@ generate_rules:
or
```yaml
generate_rules:
process_rules:
- from("file").to("content").processor("epub")
- from("file").to("content").processor("pdf")
- from("file").to("content").processor("mobi")
Expand Down
2 changes: 1 addition & 1 deletion quake_core/src/entry/entry_define.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct EntryDefine {
#[serde(skip_serializing_if = "Option::is_none")]
pub actions: Option<Vec<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub generate_rules: Option<Vec<String>>,
pub process_rules: Option<Vec<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub flows: Option<Vec<FlowProperty>>,
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down
6 changes: 4 additions & 2 deletions quake_core/src/parser/quake.pest
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ transflow_expr = {
}

midway = {
from ~ (file_request | rest_request | entry_list) ~ "." ~ to ~ l_bracket ~ parameter ~ r_bracket ~ (filter_expr | map_decl)*
from ~ (file_request | rest_request | entry_list) ~ "." ~ to ~ l_bracket ~ parameter ~ r_bracket ~ (filter_expr | map_decl | processor)*
}

endway = {
from ~ (file_request | rest_request | entry_list) ~ "." ~ to ~ l_bracket ~ component_decl ~ r_bracket ~ (filter_expr | map_decl)*
from ~ (file_request | rest_request | entry_list) ~ "." ~ to ~ l_bracket ~ component_decl ~ r_bracket ~ (filter_expr | map_decl | processor)*
}

processor = { ident }

filter_expr = {
"." ~ filter_str ~ l_bracket ~ string? ~ r_bracket
}
Expand Down

0 comments on commit 9954645

Please sign in to comment.