fop-cli 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -44
- package/install.js +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -33,42 +33,24 @@ FOP preserves extended filter syntax from various adblockers:
|
|
|
33
33
|
- Action syntax: `{remove: true;}`, `{height:...}`, `{display:...}`
|
|
34
34
|
- Snippets: `#$#hide-if-contains`, `#$#simulate-mouse-event`
|
|
35
35
|
|
|
36
|
-
##
|
|
36
|
+
## Speed Comparison (FOP.py vs FOP Rust)
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## Building
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
# Clone or download the source
|
|
44
|
-
cd fop-rs
|
|
45
|
-
|
|
46
|
-
# Build release binary
|
|
47
|
-
make
|
|
48
|
-
|
|
49
|
-
# Or using cargo directly
|
|
50
|
-
cargo build --release
|
|
51
|
-
```
|
|
38
|
+
<img width="1850" height="855" alt="fop-graph" src="https://github.com/user-attachments/assets/ef9e1e24-5f40-4899-b21f-3e706261f5dd" />
|
|
52
39
|
|
|
53
40
|
## Installation
|
|
54
41
|
|
|
55
|
-
### From npm (recommended)
|
|
56
|
-
|
|
57
42
|
```bash
|
|
58
43
|
npm install -g fop-cli
|
|
59
44
|
```
|
|
60
45
|
|
|
61
|
-
###
|
|
46
|
+
### Building from source (optional)
|
|
62
47
|
|
|
63
|
-
|
|
64
|
-
# Install to /usr/local/bin (may need sudo)
|
|
65
|
-
make install
|
|
66
|
-
|
|
67
|
-
# Or install to custom location
|
|
68
|
-
make PREFIX=~/.local install
|
|
48
|
+
Requires Rust 1.80+ (https://rustup.rs)
|
|
69
49
|
|
|
70
|
-
|
|
71
|
-
|
|
50
|
+
```bash
|
|
51
|
+
cd fop-rs
|
|
52
|
+
cargo build --release
|
|
53
|
+
cp target/release/fop /usr/local/bin/ # or add to PATH
|
|
72
54
|
```
|
|
73
55
|
|
|
74
56
|
## Usage
|
|
@@ -100,36 +82,95 @@ fop -n ~/easylist ~/easyprivacy ~/fanboy-addon
|
|
|
100
82
|
| `--no-ubo-convert` | Skip uBO to ABP option conversion (keep `xhr`, `3p`, `1p`, etc.) |
|
|
101
83
|
| `--no-msg-check` | Skip commit message format validation (M:/A:/P:) |
|
|
102
84
|
| `--disable-ignored` | Disable hardcoded ignored files and folders for testing |
|
|
103
|
-
| `--no-sort` | Don't sort
|
|
85
|
+
| `--no-sort` | Don't sort rules, just combine |
|
|
104
86
|
| `--alt-sort` | More correct sorting method |
|
|
105
87
|
| `--localhost` | Sort hosts file entries (0.0.0.0/127.0.0.1 domain) |
|
|
88
|
+
| `--no-color` | Disable colored output |
|
|
89
|
+
| `--no-large-warning` | Disable large change warning prompt |
|
|
90
|
+
| `--backup` | Create .backup files before modifying |
|
|
91
|
+
| `--keep-empty-lines` | Keep empty lines in output |
|
|
92
|
+
| `--ignore-dot-domains` | Don't skip rules without dot in domain |
|
|
106
93
|
| `--ignorefiles=` | Additional files to ignore (comma-separated, partial names) |
|
|
107
94
|
| `--ignoredirs=` | Additional directories to ignore (comma-separated, partial names) |
|
|
95
|
+
| `--file-extensions=` | File extensions to process (default: .txt) |
|
|
96
|
+
| `--comments=` | Comment line prefixes (default: !) |
|
|
97
|
+
| `--disable-domain-limit=` | Files to skip short domain check (comma-separated) |
|
|
98
|
+
| `--warning-output=` | Output warnings to file instead of stderr |
|
|
99
|
+
| `--git-message=` | Git commit message (skip interactive prompt) |
|
|
108
100
|
| `--config-file=` | Custom config file path |
|
|
109
|
-
| `--
|
|
101
|
+
| `--show-config` | Show applied configuration and exit |
|
|
110
102
|
| `-h, --help` | Show help message |
|
|
111
103
|
| `-V, --version` | Show version number |
|
|
112
104
|
|
|
113
|
-
##
|
|
105
|
+
## Configuration File
|
|
106
|
+
|
|
107
|
+
Create `.fopconfig` in your working directory or home directory:
|
|
108
|
+
|
|
109
|
+
```ini
|
|
110
|
+
# Skip commit prompt
|
|
111
|
+
no-commit = false
|
|
112
|
+
|
|
113
|
+
# Skip uBO to ABP option conversion
|
|
114
|
+
no-ubo-convert = false
|
|
115
|
+
|
|
116
|
+
# Skip commit message format validation
|
|
117
|
+
no-msg-check = false
|
|
118
|
+
|
|
119
|
+
# Skip sorting (only tidy and combine rules)
|
|
120
|
+
no-sort = false
|
|
121
|
+
|
|
122
|
+
# Alternative sorting method
|
|
123
|
+
alt-sort = false
|
|
124
|
+
|
|
125
|
+
# Sort hosts file entries
|
|
126
|
+
localhost = false
|
|
127
|
+
|
|
128
|
+
# Disable colored output
|
|
129
|
+
no-color = false
|
|
130
|
+
|
|
131
|
+
# Disable large change warning prompt
|
|
132
|
+
no-large-warning = false
|
|
133
|
+
|
|
134
|
+
# Create .backup files before modifying
|
|
135
|
+
backup = false
|
|
136
|
+
|
|
137
|
+
# Keep empty lines in output
|
|
138
|
+
keep-empty-lines = false
|
|
139
|
+
|
|
140
|
+
# Don't skip rules without dot in domain
|
|
141
|
+
ignore-dot-domains = false
|
|
142
|
+
|
|
143
|
+
# Comment line prefixes
|
|
144
|
+
comments = !
|
|
145
|
+
|
|
146
|
+
# Files to skip short domain check
|
|
147
|
+
disable-domain-limit =
|
|
148
|
+
|
|
149
|
+
# Output warnings to file
|
|
150
|
+
warning-output =
|
|
151
|
+
|
|
152
|
+
# Additional files to ignore
|
|
153
|
+
ignorefiles = .json,.backup,.bak,.swp,.gz
|
|
154
|
+
|
|
155
|
+
# Additional directories to ignore
|
|
156
|
+
ignoredirs =
|
|
157
|
+
|
|
158
|
+
# File extensions to process
|
|
159
|
+
file-extensions = txt
|
|
160
|
+
```
|
|
114
161
|
|
|
115
|
-
|
|
116
|
-
|-------------|--------------------------------------|
|
|
117
|
-
| `make` | Build release binary (default) |
|
|
118
|
-
| `make debug`| Build debug binary |
|
|
119
|
-
| `make test` | Run tests |
|
|
120
|
-
| `make install` | Install to /usr/local/bin |
|
|
121
|
-
| `make uninstall` | Remove from /usr/local/bin |
|
|
122
|
-
| `make clean`| Remove build artifacts |
|
|
123
|
-
| `make dist` | Create distributable archive |
|
|
124
|
-
| `make info` | Show system and Rust info |
|
|
125
|
-
| `make help` | Show all available targets |
|
|
162
|
+
Command line arguments override config file settings.
|
|
126
163
|
|
|
127
164
|
## Platform Support
|
|
128
165
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
166
|
+
| Platform | Binary |
|
|
167
|
+
|----------|--------|
|
|
168
|
+
| Linux x86_64 | `fop-*-linux-x86_64` |
|
|
169
|
+
| Linux x86_64 (AVX2) | `fop-*-linux-x86_64-v3` |
|
|
170
|
+
| macOS Intel | `fop-*-macos-x86_64` |
|
|
171
|
+
| macOS Apple Silicon | `fop-*-macos-arm64` |
|
|
172
|
+
| Windows x86_64 | `fop-*-windows-x86_64.exe` |
|
|
173
|
+
| Windows x86_64 (AVX2) | `fop-*-windows-x86_64-v3.exe` |
|
|
133
174
|
|
|
134
175
|
## Migrating from Python FOP
|
|
135
176
|
|
package/install.js
CHANGED
|
@@ -7,7 +7,7 @@ const path = require('path');
|
|
|
7
7
|
const { execSync } = require('child_process');
|
|
8
8
|
|
|
9
9
|
// Configuration - UPDATE THESE FOR YOUR RELEASE
|
|
10
|
-
const VERSION = '4.0.
|
|
10
|
+
const VERSION = '4.0.2';
|
|
11
11
|
const GITHUB_REPO = 'ryanbr/fop-rs'; // Change to your repo
|
|
12
12
|
const BINARY_NAME = 'fop';
|
|
13
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fop-cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "Filter Orderer and Preener - A tool for sorting and cleaning ad-blocking filter lists",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adblock",
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
},
|
|
37
37
|
"os": [
|
|
38
38
|
"darwin",
|
|
39
|
-
"linux"
|
|
39
|
+
"linux",
|
|
40
|
+
"win32"
|
|
40
41
|
],
|
|
41
42
|
"cpu": [
|
|
42
43
|
"x64",
|