48 lines
1.3 KiB
Markdown
48 lines
1.3 KiB
Markdown
This is a tool for scraping files from imageboards' threads.
|
|
|
|
It extracts the files from a JSON representation of a thread. And then downloads
|
|
'em in a specified output directory or if it isn't specified then creates
|
|
following directory hierarchy in a working directory:
|
|
|
|
<imageboard name>
|
|
|-<board name>
|
|
|-<thread>
|
|
|-[!op.txt]
|
|
|-...
|
|
|-...
|
|
|
|
# Usage
|
|
|
|
```bash
|
|
scrapthechan [OPTIONS] (<url> | <imageboard> <board> <thread>)
|
|
```
|
|
|
|
`<url>` -- URL of a thread.
|
|
|
|
`<imageboard> <board> <thread>` -- imageboard name, board name and thread ID
|
|
separately. E.g. `4chan b 1100500`.
|
|
|
|
`-o`, `--output-dir` -- output directory where all files will be dumped to.
|
|
|
|
`-N`, `--no-op` -- by default OP's post will be saved in a `!op.txt` file. This
|
|
flag disables this behaviour. An exclamation mark `!` in a name is for so this
|
|
file will be on the top of a directory listing.
|
|
|
|
`-S <num>`, `--skip-posts <num>` -- skip given number of posts.
|
|
|
|
`-v`, `--version` prints the version of the program.
|
|
|
|
`-h`, `--help` prints help for a program.
|
|
|
|
# Supported imageboards
|
|
|
|
- [4chan.org](https://4chan.org) since 0.1.0
|
|
- [lainchan.org](https://lainchan.org) since 0.1.0
|
|
- [2ch.hk](https://2ch.hk) since 0.1.0
|
|
- [8kun.top](https://8kun.top) since 0.2.2
|
|
|
|
# TODO
|
|
|
|
- Sane rewrite of a program;
|
|
- Thread watcher.
|