Readme update

This commit is contained in:
Alexander Yakovlev 2016-06-03 16:47:13 +07:00
parent d12a56b664
commit 8e934616e0
2 changed files with 16 additions and 3 deletions

View file

@ -2,3 +2,11 @@
IFDB stands for Interactive Fiction DataBase.
You can visit the site here: http://ifdb.tads.org/
The script has three options you can edit.
They are placed in the beginning of the file:
* `ifdb_url` - sets the search URL. By default it's set to "All Games", sorted
by release date.
* `ifdb_start_page` - starting page, default 1
* `ifdb_get_pages` - how many pages you want to get, default 1

View file

@ -4,6 +4,14 @@ require 'sqlite3'
require 'data_mapper'
require 'dm-migrations'
### CUSTOMIZE THESE ###
ifdb_url = "http://ifdb.tads.org/search?searchfor=&sortby=&browse&pg="
ifdb_start_page = 1
ifdb_get_pages = 1
### THE CODE FOLLOWS
DataMapper.setup(:default, 'sqlite://'+`pwd`.chomp()+'/ifdb.sqlite3')
class Work
@ -85,9 +93,6 @@ def page_parsing(url)
end
end
ifdb_url = "http://ifdb.tads.org/search?searchfor=&sortby=&browse&pg="
ifdb_start_page = 1
ifdb_get_pages = 1
current_page = ifdb_start_page
while current_page <= ifdb_get_pages do
url = ifdb_url + current_page.to_s