https://github.com/lexbor/warc_test
The program for testing HTML encoding/parsing for the Lexbor library by WARC files.
https://github.com/lexbor/warc_test
Last synced: 2 months ago
JSON representation
The program for testing HTML encoding/parsing for the Lexbor library by WARC files.
- Host: GitHub
- URL: https://github.com/lexbor/warc_test
- Owner: lexbor
- License: apache-2.0
- Created: 2019-10-23T06:16:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-03T09:56:10.000Z (over 6 years ago)
- Last Synced: 2025-01-22T00:42:33.301Z (over 1 year ago)
- Language: C
- Size: 24.4 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# warc_test
This program is designed to test the Lexbor HTML parser on a large number of HTML pages received from [commoncrawl.org](https://commoncrawl.org/).
## Dependencies
* [zlib](https://zlib.net/)
* [lexbor](https://github.com/lexbor/lexbor) >= 0.3.0
## Build and Installation
```bash
cmake .
```
For build with ASAN:
```bash
cmake . -DCMAKE_C_FLAGS="-O0 -g -fsanitize=address"
```
For link lexbor library from not system path:
```bash
cmake . -DCMAKE_C_FLAGS="-I/path/to/include/lexbor" -DCMAKE_EXE_LINKER_FLAGS="-L/path/to/lexbor/lib"
```
## Usage
### warc_test
```text
warc_test
```
```text
:
single — one parser on all HTML.
multi — own parser for each HTML.
: path to log file.
: path to directory with *.warc.gz files.
```
For example:
```bash
warc_test single ./warc.log /home/user/warcs
```
### warc_entry_by_index
```text
warc_entry_by_index
```
```text
: starts from 0.
: path to *.warc.gz file.
```
For example:
```bash
warc_entry_by_index 102 /home/user/warcs/CC-MAIN-20190715175205-20190715201205-00354.warc.gz
```
## COPYRIGHT AND LICENSE
Copyright 2019 Alexander Borisov
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Please, see [LICENSE](https://github.com/lexbor/warc_test/blob/master/LICENSE) file.