Skip to content

make the wishlist of books of Amazon have U-tokyo OPAC links

License

Notifications You must be signed in to change notification settings

monado3/MagicAmazonWishList

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magic Amazon WishList

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

Requirements

  • pipenv (Python Package Manager)
  • Google Chrome or Chromium
    (I've confirmed the operation on Ubuntu 18.04 LTS and Manjaro)

Installation

  1. Require pipenv module due to easy package install. $ pip install pipenv

  2. You need install pip package. At the project root, $ pipenv install

  3. add your wishlist info to setting.py

    1. To generate setting.py, $ pipenv run setup
    2. You need to change your wishlist's privacy setting.
      1. Visit Amazon on the browser
      2. Move to the page of wishlist of books you'd like to cast a spell on
      3. Click ・・・ of the upper right
      4. Open Manage list
      5. Set Privacy to Shared or Public
      6. Save changes (Don't close the page)
    3. You need to find your wishlist's URL for share.
      1. Open Send list to others of the upper right (this is very next to ・・・)
      2. Copy Permalink to your clipboard
    4. 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',
         }

Usage

Main

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

Sub

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)

Notes

  • 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) of AmazonInfo class in setting.py.

License

MIT

Author

monado3

About

make the wishlist of books of Amazon have U-tokyo OPAC links

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published