Go to file
zu1k 73f0ae5b6e
chore: remove frontend link to source code
Signed-off-by: zu1k <i@zu1k.com>
2022-12-06 10:26:23 +08:00
.github chore: add desktop build_test ci 2022-12-05 16:27:26 +08:00
crates chore: remove download releated code 2022-12-06 10:16:48 +08:00
experiments remove restful func 2022-12-02 11:35:01 +08:00
frontend chore: remove frontend link to source code 2022-12-06 10:26:23 +08:00
scripts remove restful func 2022-12-02 11:35:01 +08:00
.dockerignore fix: Dockerfile frontend build 2022-12-05 10:12:15 +08:00
.gitignore chore: add release script and test ci 2022-12-01 11:46:48 +08:00
Cargo.lock feat: rewrite frontend in Chakra UI 2022-12-05 01:20:38 +08:00
Cargo.toml chore: change repo link 2022-12-06 10:06:39 +08:00
Cross.yaml chore: add release script and test ci 2022-12-01 11:46:48 +08:00
Dockerfile fix: Dockerfile frontend build 2022-12-05 10:12:15 +08:00
LICENSE chore: change copyright to zlib-searcher's authors 2022-12-02 16:58:59 +08:00
Makefile feat: support index other files & increase desktop size 2022-12-02 20:43:16 +08:00
README.md chore: change repo link 2022-12-06 10:06:39 +08:00
docker-compose.yml chore: change repo link 2022-12-06 10:06:39 +08:00
rust-toolchain init 2022-11-24 14:10:15 +08:00
rustfmt.toml init 2022-11-24 14:10:15 +08:00

README.md

zlib(libgen) searcher

GitHub stars GitHub forks Release GitHub issues GitHub license

Search zlib/libgen index to get ipfs_cid.

We don't save and provide files, we provide search.

I hope everyone have a copy of the index locally, so that no need to rely on any centralized service.

Deploy with Docker

git clone https://github.com/zlib-searcher/zlib-searcher.git && cd zlib-searcher
wget https://github.com/zlib-searcher/zlib-searcher/releases/download/0.6.0/index_0.6.zip && unzip index_0.6.zip
docker-compose up -d

Now zlib-searcher it will listen to 0.0.0.0:7070.

Usage

1. Download the pre-compiled binary from Release.

Or you can compile by yourself. Refer to Build from source for instructions.

2. Download the index file that has been created.

We will give the corresponding index download links for each version in the release page.

Or you can make your own via zlib-searcher index.

Extract the index folder to the same level as the program, it should look like the following:

zlib_searcher_dir
├── index
│   ├── some index files...
│   └── meta.json
└── zlib-searcher

3. Run zlib-searcher run, it will listen to 127.0.0.1:7070.

Access http://127.0.0.1:7070/ to use webui, or you can use the original api.

original search api

You can search by the following fields:

  • title
  • author
  • publisher
  • extension
  • language
  • isbn
  • zlib_id

Examples:

  • http://127.0.0.1:7070/search?limit=30&query=余华
  • http://127.0.0.1:7070/search?limit=30&query=title:机器学习 extension:azw3 publisher:清华
  • http://127.0.0.1:7070/search?limit=30&query=zlib_id:18557063
  • http://127.0.0.1:7070/search?limit=30&query=isbn:9787302423287

Build from source

1. Build zlib-searcher

First build frontend

make frontend_preinstall frontend

Then build zlib-searcher

TARGET=release make

# move the compiled binary to the project root directory
mv target/release/zlib-searcher .

2. Build index

Download zlib_index_books.csv.zip and libgen_index_books.csv.zip and extract the csv files to the project root directory.

Then run zlib-searcher index. You may need to rm index/* first.

If you have other csv files, you can run zlib-searcher index -f *.csv to index them.

The finally folder structure should look like this:

zlib_searcher_dir // in the example above, it is project root directory.
├── index
│   ├── some index files...
│   └── meta.json
└── zlib-searcher

Raw data

We downloaded libgen sql and zlib sql and exported the necessary data from them.

id, title, author, publisher, extension, filesize, language, year, pages, isbn, ipfs_cid

This raw data is used to generate our index, you can download the raw data from here:

License

zlib-searcher © zlib-searcher's authors, Released under the MIT License.