scripts to automate building databases, books, etc.
TODO: merge/cleanup two readmes
Build scripts to automate building databases (beer.db
),
books, etc.
Use ./build_all
to build all databases and books
or use the rake tasks for step by step builds:
task db:dl # e.g. use rake db:dl SETUP=bayern
Datasets get downloaded to ./tmp
as zip archives
(e.g. openmundi--I--world.db.zip
, openbeer--I--by-bayern.zip
, etc.).
task db:build # e.g. use rake db:build SETUP=bayern
Build database (e.g. beer.db
) from scratch.
Note: For every setup (e.g. bayern
, be
, etc.)
the script creates its own folder (e.g. ./build/bayern
, ./build/be
, etc.)
and beer.db
. The script creates all database tables
and reads in all datasets (using a Datafile).
task book:db # e.g. use rake book:dl SETUP=bayern
Book template packs get downloaded to ./tmp
as zip archives
(e.g. book-templates--I--beer.zip
etc.)
and unpacked (unzipped) in the setup folder (e.g. ./build/bayern/book
).
task book:build # e.g. use rake book:build SETUP=bayern
Build book pages from the book page templates (using a Bookfile).
Note: All book pages get saved in the _pages
folder.
The script builds two book versions: 1) an all-in-one page
version and 2) a multi-page version.
task book:jekyll # e.g. use rake book:build SETUP=bayern
Run Jekyll inside the book folder to generate the static site (_site/
),
that is, the books in two-versions - 1) an all-in-one-page version (_site/book.html
)
and 2) a multi-page pversion( _site/index.html
).
Note: The site uses a "flat" page structure (no subfolders)
so you can test (open) the pages in your browser
(even without a web server running).
task build # e.g. use rake build SETUP=bayern
Use the build task to run all tasks, that is:
- Step 1:
db:dl
- Step 2:
db:build
- Step 3:
book:dl
- Step 4:
book:build
- Step 5:
book:jekyll
For available (pre-configured) setups, see the Datafile repo. Setups include:
Make sure to install the latest versions:
$ gem install bookfile # book builder script
$ gem install bookman # book builder
$ gem install sportdb # football.db machinery
$ gem install jekyll # static site generator
The build scripts are dedicated to the public domain. Use it as you please with no restrictions whatsoever.
Send them along to the Open Beer, Breweryn n Brewpub Data Forum/Mailing List. Thanks!
Build scripts to automate building databases (football.db
),
books, etc.
Use ./build_all
to build all databases and books
or use the rake tasks for step by step builds:
task db:dl # e.g. use rake db:dl SETUP=worldcup
Datasets get downloaded to ./tmp
as zip archives
(e.g. openmundi--I--world.db.zip
, openfootball--I--world-cup.zip
, etc.).
task db:build # e.g. use rake db:build SETUP=worldcup
Build database (e.g. football.db
) from scratch.
Note: For every setup (e.g. worldcup
, en2014-15
, etc.)
the script creates its own folder (e.g. ./build/worldcup
, ./build/en2014-15
, etc.)
and football.db
. The script creates all database tables
and reads in all datasets (using a Datafile).
task book:db # e.g. use rake book:dl SETUP=worldcup
Book template packs get downloaded to ./tmp
as zip archives
(e.g. book-templates--I--football.zip
etc.)
and unpacked (unzipped) in the setup folder (e.g. ./build/worldcup/book
).
task book:build # e.g. use rake book:build SETUP=worldcup
Build book pages from the book page templates (using a Bookfile).
Note: All book pages get saved in the _pages
folder.
The script builds two book versions: 1) an all-in-one page
version and 2) a multi-page version.
task book:jekyll # e.g. use rake book:build SETUP=worldcup
Run Jekyll inside the book folder to generate the static site (_site/
),
that is, the books in two-versions - 1) an all-in-one-page version (_site/book.html
)
and 2) a multi-page pversion( _site/index.html
).
Note: The site uses a "flat" page structure (no subfolders)
so you can test (open) the pages in your browser
(even without a web server running).
task build # e.g. use rake build SETUP=worldcup
Use the build task to run all tasks, that is:
- Step 1:
db:dl
- Step 2:
db:build
- Step 3:
book:dl
- Step 4:
book:build
- Step 5:
book:jekyll
For available (pre-configured) setups, see the Datafile repo. Setups include:
worldcup
,worldcup2014
,top
,top2014-15
,cl2014-15
,en2014-15
,en
de2014-15
,de
es2014-15
,es
it2014-15
,it
fr2014-15
,fr
at2014-15
,at
Make sure to install the latest versions:
$ gem install bookfile # book builder script
$ gem install bookman # book builder
$ gem install sportdb # football.db machinery
$ gem install jekyll # static site generator
The build scripts are dedicated to the public domain. Use it as you please with no restrictions whatsoever.
Send them along to the Open Sports & Friends Forum/Mailing List. Thanks!
note: use countries for default dataset e.g. rake world:build SETUP=countries