In Amazon WishList, every book will automatically have a link to its detail page at U-tokyo OPAC, by just execution of one command.
Before | After |
---|---|
![]() |
![]() |
- pipenv (Python Package Manager)
Google Chrome
orChromium
(I've confirmed the operation onUbuntu 18.04 LTS
andManjaro
)
-
Require
pipenv
module due to easy package install.$ pip install pipenv
-
You need install pip package. At the project root,
$ pipenv install
-
add your wishlist info to
setting.py
- To generate
setting.py
,$ pipenv run setup
- You need to change your wishlist's privacy setting.
- Visit Amazon on the browser
- Move to the page of wishlist of books you'd like to cast a spell on
- Click
・・・
of the upper right - Open
Manage list
- Set
Privacy
toShared
orPublic
- Save changes (Don't close the page)
- You need to find your wishlist's URL for share.
- Open
Send list to others
of the upper right (this is very next to・・・
) - Copy
Permalink
to your clipboard
- Open
- You need to edit
setting.py
as below.class AmazonInfo: book_wishlist_dic = { 'wishlist name 1': 'wishlist link 1', 'wishlist name 2': 'wishlist link 2', }
- To generate
feature | $ pipenv run fullupdate |
$ pipenv run start |
$ pipenv run opacupdate |
$ pipenv run show |
|
---|---|---|---|---|---|
fetch the latest wishlist from Amazon | ○ | ○ | |||
fetch the latest info from OPAC | all update※1 | ○ | ○ | ||
newly added to wishlist※2 | ○ | ||||
make the magic wishlist | ○ | ○ | ○ | ||
open the magic wishlist | ○ | ○ | ○ | ○ |
※1 All books in the wishlist are updated how many they are registered to OPAC
※2 Only Newly added books to the wishlist are updated how many they are registered to OPAC
Command | Behavior |
---|---|
$ pipenv run clear |
Delete the cached file (data/books.json ) |
$ pipenv run setup |
Generate setting.py (if it exists, overwrite) |
$ pipenv run help |
Open this page (Needs environment variable $BROWSER ) |
- This program uses Amazon.co.jp as default,
because this program is written on the assumption that it is used in Japan.
You need to change some parts of codes, if you'd like to use other countries' Amazon. - From the second time use of main.py, the execution time will be shorter thanks to cache.
- If you'd like to use more than one wishlist, add wishlists' links to
book_wishlist_dic
(list) ofAmazonInfo
class insetting.py
.