Documentation
¶
Overview ¶
Package purification applies Legado-compatible reading replacement rules.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
Load reads the current files on every call. It never initializes or rewrites files, so replacing a backup directory also replaces the active definitions. Imported groups run in filename order; each group's order is stable, and the local group is appended last regardless of its individual order values.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func Compile ¶
Compile validates every rule, including disabled rules, without changing the input. It preserves input order; the loader orders rules within their files.
type FileInfo ¶
FileInfo identifies a rule file that can be edited directly. Local is true only for main.json, which runs after every imported group.
type Rule ¶
type Rule struct {
ID int64 `json:"id"`
Name string `json:"name"`
Group string `json:"group,omitempty"`
Pattern string `json:"pattern"`
Replacement string `json:"replacement"`
Scope string `json:"scope,omitempty"`
ExcludeScope string `json:"excludeScope,omitempty"`
ScopeTitle bool `json:"scopeTitle"`
ScopeContent bool `json:"scopeContent"`
IsEnabled bool `json:"isEnabled"`
IsRegex bool `json:"isRegex"`
TimeoutMillisecond int64 `json:"timeoutMillisecond,omitempty"`
Order int `json:"order"`
}
Rule retains the original pattern and replacement for editing and export.