![]() |
GPAL - Generally Positive Automation Library v1.0
GPAL The Fluent Automation LIbrary
|
Loads and saves the named DigestRuleSets used by HtmlToOptimizedMarkdown, stored as ./LLMDigestRules.yaml so site-specific tuning can be edited without recompiling. More...
Public Member Functions | |
| DigestRuleSet | SelectFor (string url, string ruleSetName=null) |
| Picks the rule set to use for url : an explicit ruleSetName wins if it exists, otherwise the first non-generic rule set whose DomainPatterns match the URL, otherwise "generic". User rule sets take precedence over GPAL ones with the same name. Any field left empty on the selected rule set falls back to "generic"'s value. | |
Static Public Member Functions | |
| static DigestRulesConfig | Load (GPALFile file=null) |
| Loads the digest rules config, refreshing the GPAL-managed section from Default while preserving the user section verbatim, and upgrading an older on-disk format in place. Falls back to Default if the file cannot be read. If file is provided it becomes the new default path for this session. | |
| static void | Save (GPALFile file=null) |
| Writes a fresh config (GPAL defaults, empty user section) to the file as a starter for editing. If file is provided it becomes the new default path for this session. | |
| static DigestRulesConfig | Default () |
Built-in rule sets, used when ./LLMDigestRules.yaml does not exist. Call DigestRulesConfig.Save() to write them out as a starting point for tuning. | |
Properties | |
| static string | CurrentSchemaVersion [get] |
| Version stamped into the file, taken from the GPAL assembly version so the rules file records which build last wrote it. Falls back to the executing assembly version if GPAL.Version is not yet initialized. | |
| string | Version = null [get, set] |
| Version of the loaded/saved file. Null or empty means a pre-versioning (legacy) file. | |
| List< DigestRuleSet > | RuleSets = new List<DigestRuleSet>() [get, set] |
| GPAL-managed rule sets. Refreshed from Default on every load; edits here are not preserved. | |
| List< DigestRuleSet > | UserRuleSets = new List<DigestRuleSet>() [get, set] |
| User-owned rule sets. GPAL never modifies, removes, or re-adds these. Moving a GPAL rule set here "adopts" it. | |
Loads and saves the named DigestRuleSets used by HtmlToOptimizedMarkdown, stored as ./LLMDigestRules.yaml so site-specific tuning can be edited without recompiling.
Definition at line 60 of file DigestRules.cs.
|
static |
Built-in rule sets, used when ./LLMDigestRules.yaml does not exist. Call DigestRulesConfig.Save() to write them out as a starting point for tuning.
Definition at line 279 of file DigestRules.cs.
|
static |
Loads the digest rules config, refreshing the GPAL-managed section from Default while preserving the user section verbatim, and upgrading an older on-disk format in place. Falls back to Default if the file cannot be read. If file is provided it becomes the new default path for this session.
Definition at line 108 of file DigestRules.cs.
|
static |
Writes a fresh config (GPAL defaults, empty user section) to the file as a starter for editing. If file is provided it becomes the new default path for this session.
Definition at line 170 of file DigestRules.cs.
| DigestRuleSet GenerallyPositive.DigestRulesConfig.SelectFor | ( | string | url, |
| string | ruleSetName = null ) |
Picks the rule set to use for url : an explicit ruleSetName wins if it exists, otherwise the first non-generic rule set whose DomainPatterns match the URL, otherwise "generic". User rule sets take precedence over GPAL ones with the same name. Any field left empty on the selected rule set falls back to "generic"'s value.
Definition at line 240 of file DigestRules.cs.
|
staticget |
Version stamped into the file, taken from the GPAL assembly version so the rules file records which build last wrote it. Falls back to the executing assembly version if GPAL.Version is not yet initialized.
Definition at line 69 of file DigestRules.cs.
|
getset |
GPAL-managed rule sets. Refreshed from Default on every load; edits here are not preserved.
Definition at line 78 of file DigestRules.cs.
|
getset |
User-owned rule sets. GPAL never modifies, removes, or re-adds these. Moving a GPAL rule set here "adopts" it.
Definition at line 81 of file DigestRules.cs.
|
getset |
Version of the loaded/saved file. Null or empty means a pre-versioning (legacy) file.
Definition at line 75 of file DigestRules.cs.