Steps to reproduce:
Download azw3.txt
, epub.txt
, mobi.txt
and pdf.txt
at https://al.chirmyram.com/doc/平台/zlibrary-cn/.
Then run
python3 .\parse.py azw3
python3 .\parse.py epub
python3 .\parse.py mobi
python3 .\parse.py pdf
to get azw3.csv
, epub.csv
, mobi.csv
and pdf.csv
.
Use
head -n 1 azw3.csv > combined.csv
tail -n+2 -q azw3.csv >> combined.csv
tail -n+2 -q epub.csv >> combined.csv
tail -n+2 -q mobi.csv >> combined.csv
tail -n+2 -q pdf.csv >> combined.csv
to combine these four csv.
Upload the documents to melisearch:
curl \
-X POST 'http://127.0.0.1:7700/indexes/zlibcn/documents?primaryKey=id' \
-H 'Content-Type: text/csv' \
-H 'Authorization: Bearer \.@^_^@./' \
--data-binary @combined.csv