You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
torrent-paradise/index-generator
Urban Guacamole f8fd8557ae Initial commit 5 years ago
..
README Initial commit 5 years ago
main.js Initial commit 5 years ago
main.ts Initial commit 5 years ago
package-lock.json Initial commit 5 years ago
package.json Initial commit 5 years ago
tsconfig.json Initial commit 5 years ago

README

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