2
0
mirror of https://github.com/urbanguacamole/torrent-paradise synced 2024-10-31 21:20:13 +00:00
torrent-paradise/index-generator
2019-01-13 15:10:54 +01:00
..
main.js Initial commit 2019-01-13 15:10:54 +01:00
main.ts Initial commit 2019-01-13 15:10:54 +01:00
package-lock.json Initial commit 2019-01-13 15:10:54 +01:00
package.json Initial commit 2019-01-13 15:10:54 +01:00
README Initial commit 2019-01-13 15:10:54 +01:00
tsconfig.json Initial commit 2019-01-13 15:10:54 +01:00

Takes a sqlite DB (export of postgres that is used by spider, tracker-scraper and import-tpb-dump) and generates the index, using the ipfsearch-index library.

Getting sqlite dump from the postgres: 
nextgen@ipfsearch: ~$ pg_dump --data-only --inserts nextgen > dump.sql

# remove header from dump (manually)

$ sed -i -e 's/public.peercount/peercount/g' dump.sql
$ sed -i -e 's/public.torrent/torrent/g' dump.sql
gzip dump.sql

# copy dump.sql.gz to index-generator directory, unzip

onda@localhost $ sqlite3 db.sqlite3
sqlite> CREATE TABLE peercount ( infohash char(40), tracker varchar, seeders int, leechers int, completed int, scraped timestamp);
sqlite> CREATE TABLE torrent( infohash char(40), name varchar, length bigint, added timestamp);
sqlite> .read dump.sql