Skip to content
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

Added script to post your location automatically on the allsky map #1073

Merged
merged 15 commits into from
Mar 19, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ scripts/stretch.sh
scripts/endOfNight_additionalSteps.sh
scripts/saveImageDay.sh
scripts/saveImageNight.sh
scripts/postToMap.sh
settings_RPiHQ.json
settings_ZWO.json

Expand Down
2 changes: 1 addition & 1 deletion config_repo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ifeq ($(PKGBUILD),)
endif


CONFIGFILES := settings_ZWO.json settings_RPiHQ.json config.sh ftp-settings.sh
CONFIGFILES := settings_ZWO.json settings_RPiHQ.json config.sh ftp-settings.sh postToMap.sh
UNINSTALLFILES := $(DESTDIR)$(sysconfdir)/logrotate.d/allsky $(DESTDIR)$(sysconfdir)/rsyslog.d/allsky.conf $(DESTDIR)$(sysconfdir)/systemd/system/allsky.service

%:
Expand Down
4 changes: 4 additions & 0 deletions config_repo/config.sh.repo
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ NIGHTS_TO_KEEP=14
# This is needed if you are running the Allsky Website.
POST_END_OF_NIGHT_DATA="false"

# Set to "true" if you want to have your camera displayed on the allsky map (http://www.thomasjacquin.com/allsky-map/)
# You will need to edit your camera details in config/postToMap.sh
POST_TO_MAP="false"

# Set to "true" if you want to enable dark frame subtraction on your night-time images.
# You must first create dark frames - see the README.md file for instructions.
DARK_FRAME_SUBTRACTION="false"
Expand Down
21 changes: 21 additions & 0 deletions config_repo/postToMap.sh.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
generate_post_data()
{
cat <<EOF
{
"location": "Whitehorse YT",
"owner": "Thomas Jacquin",
"latitude": "60.7",
"longitude": "-135.05",
"website_url": "http://www.thomasjacquin.com/allsky",
"image_url": "http://www.thomasjacquin.com/allsky/image.jpg",
"camera": "ASI 224 MC",
"lens": "Arecont 1.55",
"computer": "Raspberry Pi 3"
}
EOF
}

curl -i \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
--data "$(generate_post_data)" "http://www.thomasjacquin.com/allsky-map/postToMap.php"
4 changes: 4 additions & 0 deletions scripts/endOfNight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,8 @@ if [[ ${AUTO_DELETE} == "true" ]]; then
done
fi

if [[ ${POST_TO_MAP} == "true" ]]; then
../config/postToMap.sh
fi

exit 0