Reset Nook Study Trial

Barnes and Nobles has a great book trial program for textbooks. Using the Nook Study app for Mac, you can read your books on your laptop.

Having to do a little trial reading of my own, I realized that the 7 day trial was just not enough. This little script will reset the tables on the Nook Study app for mac to reflect no trial mode. Should be a similar approach for Windows.

 

Script in Python

import sqlite3,os

conn = sqlite3.connect(os.getenv('HOME')+"/Library/Application Support/" \
	Barnes & Noble/DesktopReader/ClientAPI.db")

c = conn.cursor()
code = ('E7',)
c.execute('select * from bn_client_products where format_code=?', code)
for book in c:
	print "updating book: "+book[2]
	conn.execute('update bn_client_product_states set rental_start=0, rental_expires=0, ' \
		'rental_type=0,rental_status=0 where product_ean=?', (book[2],))
	conn.execute("update bn_client_product_states set rmsdk_reading_position=''," \
		page_position='' where product_ean=?", (book[2],))
print "saving changes"
conn.commit()
c.close()