-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for multiple NFT wallets. Updated user config.
Added support for multiple NFT wallets. Removed user configuration from inside the script. Only need to provide email address when executing the script. Fixed issue with urlencode urls. (Ex. %20 instead of a space in the URL)
- Loading branch information
Showing
2 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,14 +19,21 @@ sudo apt install curl | |
sudo apt install ssmtp | ||
sudo apt install mailx | ||
sudo apt install jq | ||
sudo apt install tr | ||
``` | ||
|
||
**UPDATE** | ||
> All user configuration has been removed and you do not need to edit the script. | ||
> You **will** need to add the email address to command line when executing the script. | ||
--- | ||
|
||
**Setting up ssmtp (using a Gmail account)** | ||
|
||
Since I have 2-factor authentication turned on for Gmail in order to get my Gmail account set up in ssmtp I had to set up an App Password. Below is a link to Google on how to do that, but I also listed the steps out. You will need to securely save that App Password. I will use _APP_PASSWORD_ as a placeholder in the code, you need to replace that with your actual App Password. | ||
|
||
Also, email isn't required so you can skip this step if you aren't comfortable with an App Password. | ||
|
@@ -79,30 +86,39 @@ You should have received an email in your Gmail inbox. | |
--- | ||
|
||
**How to run the script** | ||
|
||
**UPDATE** Be sure to include the email address when executing the script. This is now the only user configuration needed. There is no need to edit the script. | ||
|
||
``` | ||
bash nftmon.sh | ||
bash nftmon.sh [email protected] | ||
``` | ||
|
||
--- | ||
|
||
**Change the permissions to make the script executable** | ||
|
||
``` | ||
chmod +x nftmon.sh | ||
``` | ||
|
||
--- | ||
|
||
**Add the script into Crontab** | ||
|
||
Let's add a line into crontab so the script will run every minute. First open crontab. | ||
|
||
``` | ||
crontab -e | ||
``` | ||
|
||
Then add the following to run every minute. | ||
|
||
``` | ||
* * * * * YOUR_APP_FOLDER/nftmon.sh | ||
* * * * * YOUR_APP_FOLDER/nftmon.sh [email protected] | ||
``` | ||
|
||
Real example: | ||
|
||
``` | ||
* * * * * ~/xchdev_tools/nftmon/nftmon.sh | ||
* * * * * ~/xchdev_tools/nftmon/nftmon.sh [email protected] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,3 +91,14 @@ rm $appdir/.newurls.html | |
# v0.2.1 - Changes: | ||
# - Changed from 'echo' to 'printf' for writing out the uris so the file ends up with one URL per line. | ||
# echo was wasn't putting each URL on a newline which caused the email to send all NFTs not just new ones. | ||
# | ||
# v0.3.0 - Changes: | ||
# - Changed from using 'ssmtp' to 'mailx' command to send HTML email without using 'echo' or 'printf', which | ||
# were causing issues for urls with spaces urlencoded (ex. %20) | ||
# - Removed user configuration in script. No editing of the script is required after downloading. There is a | ||
# new method to running the script. You will need to add the send to email after the name of the script | ||
# when executing the script. Ex. '$ bash nftmon.sh [email protected]' | ||
# New features: | ||
# - The script now supports multiple NFT wallets with no setup required. The script will gather all NFTs in | ||
# all NFT wallets automatically. | ||
|