THIS CODE IS NOT SECURE AND NOT REALLY FUNCTIONAL. A REPLACEMENT MAY BECOME AVAILABLE AT A FUTURE DATE, BUT YOU SHOULD NOT USE THIS FOR ANY REASON.
This is a database that can ingest Project COUNTER Book Report #1 and Book Report #2 plain text CSV reports and allow you to search for and browse usage data for all your eBooks.
- Download source files.
- Unzip files to desired location on your server.
- Create a MySQL database called
book_usage
and give a user access to this new database. - Run the SQL commands found here to create tables and views needed for this application.
- If you are part of an organization with a formal relationship with OCLC, register for the XISBN service and get a WorldCat Affiliate ID.
- Change name of
config_example.php
toconfig.php
. - Enter your database credentials in
config.php
. - Enter your WorldCat Affiliate ID, if you have one, in
config.php
. EnterFALSE
otherwise. - Set up a cron job to regularly run the following command (every other minute is the suggested default):
curl http://url.to.process.php >/dev/null 2>&1
- Adjust the Twig templates in the templates directory to your liking.
Reports must be plain text CSV files. The only supported reports are COUNTER Book Report #1 (r1 and r4) and COUNTER Book Report #2 (r1 and r4).
The CSV files must be in the following format with columns in the following order:
Title
Publisher
Platform
ISBN
ISSN
Annual Usage
Usage Year
Vendor Name
Title
Publisher
Platform
DOI
Proprietary Identifier
ISBN
ISSN
Annual Usage
Usage Year
Vendor Name
Title
Publisher
Platform
ISBN
ISSN
Annual Usage
Usage Year
Vendor Name
Title
Publisher
Platform
DOI
Proprietary Identifier
ISBN
ISSN
Annual Usage
Usage Year
Vendor Name
There should be no header row(s)—just the data.
Twig is a PHP templating system with extensive documentation. The eBook Usage Database comes with two templates:
default
: A default template that is based on the Flatly Bootswatch theme.byu
: A theme made to look like BYU’s library pages. Most would be better off ignoring this theme and modding thedefault
theme.
Templates are found in the templates directory. Templates that begin with an underscore (_) are child templates that are called by parent templates. You must have a CSS file in the templates directory called styles.css
. Otherwise, you are free to change the templates any way you see fit for your needs.
- This program assumes that an individual book is only listed once per platform. If you have usage data where a book is listed multiple times per platform (as can happen with book series such as those found in BioOne), you will need to manually combine usage for that book into a single entry for that platform. Otherwise, the database will only show uses for one of the issues instead of total usage for the entire series.
- Some vendors will show usage for all eBooks that you have access to. However, most only show usage for titles that received use. This means that the database does not show your eBook holdings. It just shows usage for the subset of titles that have received usage.
- Because the database does not show your holdings, the database cannot show you what titles are still active or not. Because of this, when you browse by platform or vendor, it will only show you titles that have received usage in the past two years on the assumption that most of those will still be active titles.