Skip to main content

Gold price tracker CLI tool

Project description

What is GPrice

GPrice is a CLI-tool for tracking gold price, allowing you to easily and simply setting up notifications for Email using simple commands

Setup for email notificaton

GPrice Installation

pip install gprice

note: you may need to install pip before if don't have

check gprice avalability

gprice --version

It should show somthing like this


Set up sender email

gprice set -se "your_sender@gmail.com" 

The program will prompt you to input "app password"

Enter password for your_sender@gmail.com: *****************

Commands

gprice set [Option]

option full-text option application
-se --sender-email to determine sender email
-smtph --smtp-host to determine host server for sending email
-ug --user-agent to determine user agent

gprice show [options]

option full-text option application
-c --currency show gold price in the specified currency
-i --info show infomation about the configuration
such as sender email, host server, and so on

gprice noti [options]

option full-text option application
-c --currency get gold price in the specified currency
-eve --every run-time scheduler for running a command (not recommend)
-to --to set receiver email
-if --if set condition to trigger notification
eg. send notification when price goes down by 500usd

Built-in scheduler (-eve)

-eve (prefix)[hh:mm:ss]
prefix example translation
t t[02:00:00] every 2 hours
d, 2d, .. nd d[02:00:00] everyday at 2:00 AM.
mon-sun mon[02:00:00] every monday at 2:00 AM.
gprice noti -c USD -to "receiver@hotmail.com" -eve 2d[02:00:00] 

the above command can be translated to this

report the current gold price to "receiver@hotmail.com" every 2 day at 2:00 AM.

Make condition with (-if)

up[x] = when price goes up to x
down[x] = when price goes down to x

example usage:

gprice noti -c USD -to "receiver@hotmail.com" -eve t[00:05:00] -if up[500] down[500]

the above command can be translated to this

the gold price (USD) is checked every 5 mins and if the price goes up or goes down by 500USD, the notification is sent to the receiver mail.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gprice-0.1.1.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gprice-0.1.1-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file gprice-0.1.1.tar.gz.

File metadata

  • Download URL: gprice-0.1.1.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for gprice-0.1.1.tar.gz
Algorithm Hash digest
SHA256 424473f9e85b5380ed3c020ba600f12840a7b5cd81a10d7a76415408fabcafaf
MD5 6f6ab4d54f2e9b07d7f87d3e88982971
BLAKE2b-256 8c5d312f4eba8d0efc8fc3fffa6d33b536671f04892df6456460868cc66eb49d

See more details on using hashes here.

File details

Details for the file gprice-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gprice-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for gprice-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e829d169df8bf7760a7a35217a9f11ddaef0fdc4c1031f2642083beb05f38d69
MD5 ca9b3d716cb199a8add82a391a43b850
BLAKE2b-256 6f4df7374d3a6dc811dbf6c9c031b7f52dcd838bf8cea439a51a88fa5d34a349

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page