-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test script to quickly test image url #8
base: main
Are you sure you want to change the base?
Conversation
Prior to this, every time I wanted to refresh the image, I had to run the commands by hand ( This just makes it easier to test 😄 If there was a simpler way, or if this script isn't to your standard, feel free to reject, I don't mind 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @julianlam thanks for this! I think it's indeed useful to have something like this to make testing dashboard images easier.
src/test.sh
Outdated
echo "Refreshing dashboard" | ||
"$DIR/wait-for-wifi.sh" | ||
|
||
$(dirname $0)/ht -d -q -o "$DASH_PNG" get $1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should change this to use local/fetch-dashboard.sh
. The idea is that people should only have to modify files in local/
(to make upgrades easier). Fetching of the dashboard is extracted into a local script because it can be pretty case specific. For example in my case I need to provide authentication to the HTTP endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I'll allow fetch-dashboard.sh
to handle an argument (which test.sh
can opt to pass in).
Execution: `/mnt/us/dashboard/test.sh https://example.org/test.png` Executes `wait-for-wifi.sh`, downloads the image using `ht` (like `dash.sh`), and pushes it to the kindle via `eips` Useful to quickly update images for testing purposes without starting the daemon.
update fetch-dashboard.sh to allow passing in a separate argument for url
Done, let me know if I overstepped with the change to |
@@ -1,4 +1,4 @@ | |||
#!/usr/bin/env sh | |||
# Fetch a new dashboard image, make sure to output it to "$1". | |||
# For example: | |||
$(dirname $0)/../ht -d -q -o "$1" get https://raw.githubusercontent.com/pascalw/kindle-dash/master/example/example.png | |||
$(dirname $0)/../ht -d -q -o "$1" get ${2:-"https://raw.githubusercontent.com/pascalw/kindle-dash/master/example/example.png"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The additional argument is fine, np!
Maybe we can take this opportunity to make the arguments a bit more clear. Something like:
output_path="$1"
url="${2:-'https://raw.githubusercontent.com/pascalw/kindle-dash/master/example/example.png'}"
WDYT?
@julianlam are you willing/able to make that change? If not let me know, I could do it too. |
I haven't had the time actually 😅 please go ahead and make the change if you can, it is more difficult for me to do because I am just making the change blindly and pushing it to the kindle. |
Execution:
/mnt/us/dashboard/test.sh https://example.org/test.png
Executes
wait-for-wifi.sh
, downloads the image usinght
(likedash.sh
), and pushes it to the kindle viaeips
Useful to quickly update images for testing purposes without starting the daemon.