项目作者: yusuke-sforzando

项目描述 :
q-lako is a service to quickly register equipments and books.
高级语言: Python
项目地址: git://github.com/yusuke-sforzando/q-lako.git
创建时间: 2020-11-27T11:27:15Z
项目社区:https://github.com/yusuke-sforzando/q-lako

开源协议:MIT License

下载


q-lako

On push
CodeQL
codecov

logo

q-lako is a service to quickly register equipments and books.
q-lako is a web app that helps you to manage books and supplies purchased on Amazon.

Retrievable information

Get the following information on purchased books and supplies to help you register supplies.

  • Product Title
  • ASIN Code
  • Image (url)
  • URL
  • Manufacturer
  • Contributors
  • Publication Date
  • Product Group
  • Registrants Name
  • Default Positions
  • Current Positions
  • Note
  • Features

Requirements

How to

Enter Python Virtual Environment

  1. python3 -m venv venv
  2. source venv/bin/activate
  3. export ARCHFLAGS="-arch x86_64"
  4. pip install --upgrade pip
  5. pip install --upgrade --use-feature=2020-resolver -r requirements.txt

The reason why ARCHFLAGS needs to be specified is due to Apple’s bugs in Xcode12.
It is recommended to explicitly specify the resolver options until pip version 20.3.

Prepare .env and .env.gpg

Write the API Key to .env and encrypt it.
Keep your passphrase in a secure location like YubiKey.

  1. Prepare .env

    1. airtable_base_id="airtable_base_id"
    2. airtable_api_key="airtable_api_key"
    3. amazon_partner_tag="amazon_partner_tag"
    4. amazon_access_key="amazon_access_key"
    5. amazon_secret_key="amazon_secret_key"
  2. Encrypt .env to create .env.gpg

    gpg --symmetric --cipher-algo AES256 .env

  3. Use your passphrase to decrypt .env.gpg .

    gpg --quiet --batch --decrypt --output=.env .env.gpg

Prepare settings.ini

  1. [THEME-COLOR]
  2. theme_color_blue=#4caaba
  3. theme_color_gray=#393e46
  4. [AIRTABLE]
  5. airtable_table_name=q-lako

Run

  1. python main.py

If you start it locally, it will start in Debug mode.

  1. Access to http://0.0.0.0:8888/
  2. Enter keywords or ISBN/ASIN code in the search window and press the search button
  3. Displays a list of items related to the keywords you have entered
  4. Select any item from the list of items and press the Select button
  5. The item’s details are displayed
  6. Edit the contents of the item’s details form
  7. Press the Register button and you will be registered with Airtable

Lint

  1. flake8 *.py

Test

  1. pytest . -vv --ignore-glob="venv/**/*" --durations=0

Misc

Contributor