Readme update
This commit is contained in:
parent
d12a56b664
commit
8e934616e0
|
@ -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
|
||||
|
|
11
parser.rb
11
parser.rb
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue