Git Product home page Git Product logo

kindle-booklog-sync's Introduction

Kindle Booklog Sync

Caution

The email sent by Amazon when we purchasing a book has been changed and does not work properly.

clasp Node version GitHub release (latest by date) GitHub Lint Deployment

English Japanese

A program that automatically uploads books purchased on Kindle to Booklog.

image

Features

  • Login to Booklog
  • Search your Gmail inbox
  • Get asin code from email body
  • Upload new book to booklog using asin
  • Leave a log on the spreadsheet
  • Archive uploaded book notification emails

Environments

$ node --version
v14.16.1

$ yarn --version
1.22.10

$ clasp --version
2.3.1

Setup

Installation

# If you haven't installed it yet, do the following
$ npm install -g @google/clasp

$ git clone [email protected]:ega4432/kindle-booklog-sync.git

$ yarn

Dependencies

  • Google Account
    • Apps Script
    • Gmail
    • Spreadsheet
  • Booklog Account

Usage

# Auth
$ clasp login

# Create project
$ clasp create --title "kindle-booklog-sync" \
    --type sheets \
    --rootDir ./src

# Deploy
$ yarn push

Tips

# Lint
$ yarn lint

# In development
$ yarn watch

Deployment

Preparation is required before deployment. Please register the following in the secret.

If you have been authenticated using the command line ( e.g. clasp login ), there should have generated ~/.clasprc.json. Please refer to it and complete the registration.

$ cat ~/.clasprc.json | jq .
{
  "token": {
    "access_token": "XXXXXXXXXXXXXXXXXXX",
    "scope": "https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/script.webapp.deploy openid https://www.googleapis.com/auth/script.projects https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/service.management https://www.googleapis.com/auth/logging.read https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/script.deployments https://www.googleapis.com/auth/drive.metadata.readonly",
    "token_type": "Bearer",
    "id_token": "XXXXXXXXXXXXXXXX",
    "expiry_date": 1234567890,
    "refresh_token": "AAAAAAAAAAAAABBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDEEEEEEEEEEEEEFFFFFFFFFFFFFGGGGGGGGGGGGGGGHHHHHHHHHH"
  },
  "oauth2ClientSettings": {
    "clientId": "1111111111-abcdefghijklmn22222222222.apps.googleusercontent.com",
    "clientSecret": "abcdefghijklmn",
    "redirectUri": "http://localhost"
  },
  "isLocalCreds": false
}

You can go to that page with Your Repository TOP > Settings > Secrets.

The final result will be the attached image below.

Deployment is triggered by tags in GitHub Actions. See deploy.yml for more details. Please type the tag starting with the prefix "v".

kindle-booklog-sync's People

Contributors

dependabot[bot] avatar ega4432 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kindle-booklog-sync's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.