CLI to track Smithsonian exhibits
You must have Python3 installed on your computer. For macOS, you can use the system built-in
python3 and pip3.
Install the necessary libraries: pip install playwright playwright-stealth beautifulsoup4
To use the notifications capability, ensure you have [Ntfy]'s app downloaded to your smartphone.
Looking to visit the Smithsonian soon? Use python3 castle.py soon, it'll tell you any exhibits opening or closing that week.
Use the -d/--days flag to specify a different number of days, in case you're only visiting that weekend or looking to plan for the month.
python3 castle.py upcoming looks for newly announced, upcoming exhibits. It keeps track of the ones you have already found out about on previous
runs so it won't tell you about them again.
Note On your first run, it will alert you to all upcoming exhibits for a given museum.
Coming soon: The ability to specify what Smithsonians you care about (including enabling NYC museums).
In the Ntfy app, add a new subscribed topic. For a free account, anyone can send any message to your topic so do something unique that others won't think to use.
Once you have your topic set up, run python3 castle.py configure to set your topic name (you don't need to include the
ntfy.sh URL).
Now, any time you run soon or upcoming, you will get push alerts for closing/starting exhibits as well as any newly announced upcoming exhibits.
There are plist files in this repo to schedule the soon and upcoming commands. Correct the proper placeholder values and save them to ~/Library/LaunchAgents/.
You'll then need to load them using launchctl in the Terminal app:
launchctl load ~/Library/LaunchAgents/com.castlewatcher.soon.plist
launchctl load ~/Library/LaunchAgents/com.castlewatcher.upcoming.plist
The files are specified to run every Monday at noon, unless you change those values. To
ensure your Mac is awake at that time, run sudo pmset repeat wake M 11:59:00 on your Terminal.
TODO