Skip to content

Latest commit

 

History

History
78 lines (62 loc) · 2.97 KB

README.md

File metadata and controls

78 lines (62 loc) · 2.97 KB

EbayFind

First and foremost, clone the repository and install the dependencies

git clone https://github.com/KevinN2025/EbayFind.git
cd EbayFind
sudo make install

EbayFind(ef)

ef --help

 Usage: ef --query <keywords> [options]

Options:
  -q, --query    <keywords>  Search keywords (required)
  -e, --exclude  <words>     Exclude titles containing these words
  -l, --limit    <n>         Number of results (default: 10)
  -o, --offset   <n>         Result offset for paging (default: 0)
  -f, --env-file <path>      Path to .env credentials file (default: .env)
  -d, --db-dsn   <dsn>       MariaDB DSN, overrides EBAY_DB_DSN
  -h, --help                 Show this help message

Examples:
  ef --query "ThinkPad X1 Carbon"
  ef --query "ThinkPad T480" -l 25 -e "parts only"
  ef --query "ThinkPad T480" --limit 10 --offset 10
  ef --query "ThinkPad X13" --db-dsn "user:pass@tcp(localhost:3306)/ef?parseTime=true"

Query Example to find instances of Thinkpad T480

ef --query "Thinkpad T480" --limit 10

Output image

Lazysql Usage

Within my repository i have a nix flake that installs lazysql and the necessary configuration needed to start it. Of course for the URL section of your lazysql config.toml you will have to change it to your databse username and password.

Install lazysql with flake.nix

nix develop

After the packages are installed and the config has been written.

lazysql

Give love to the lazysql author. His work is greatly appreciated: https://github.com/jorgerojas26/lazysql.git

Screenshot image

Man Page

You can view my manual with:

man ef
image image

Refresh DB with crontab

I have the script refresh.sh that automatically runs via a crontab every 15 minutes. Thus, it is continuously updated and a file named refresh.log will be subsequently produced.

*/15 * * * * $HOME/Documents/EbayFind/db/refresh.sh

Note!

You need to open a ebay developer account and wait a day before your account is approved. After that, you can set your browseAPI and keep it secret to yourself. For obvious reasons, my API key wasn't shared within this repository. The user has to set up their own API EBAY_CLIENT_ID & EBAY_ACCESS_TOKEN.

This data is in the .env file & this is where you also aggregate your database info.

My specific Database and program are catered towards finding Thinkpads I am looking for resell and flipping purposes. Feel free to change the program for your specific needs