Resources for Science Olympiad Astronomy
Go to file
2021-11-24 21:26:07 -06:00
astropy@b17655f0f5 Add all DSO links 2021-11-15 20:33:58 -06:00
Links Catch find_date exceptions 2021-11-24 21:26:07 -06:00
.gitignore Update rclone commands 2021-05-20 20:14:06 -05:00
.gitmodules Add submodule 2021-04-30 20:20:11 -05:00
LICENSE Use a strong reciprocal license instead 2021-10-03 19:12:39 -05:00
mkbinder.py Catch find_date exceptions 2021-11-24 21:26:07 -06:00
packages.txt Prevent pip from being installed as a dependency 2021-11-03 18:44:35 -05:00
README.md Add dependencies install command 2021-11-01 11:40:26 -05:00
requirements.txt Upgrade requirements.txt 2021-11-24 20:35:19 -06:00

Astronomy

Resources for Science Olympiad Astronomy. Note that due to the license, you must publicly release any code that you use from this repository.

Guide

Install dependencies

You can install all the required dependencies on Arch Linux with cat packages.txt | xargs sudo pacman -S --asdeps --noconfirm. For other Linux distros, install your distro's version of the packages in packages.txt.

Google Drive

Folder: https://drive.google.com/drive/folders/1tSWqSONcjwJWfYled2abuSCmDSUt4KiA?usp=sharing

You should download it before contests since you technically can't use the internet during contests.

rclone

You can copy the Google Drive folder to your computer with rclone copy "drive:Science/Science Olympiad 20.5/Astronomy 20.5/Astro 2021" . --exclude="General/Hyperphysics English.zip" -P.

You can copy your files to the Google Drive with rclone copy . "drive:Science/Science Olympiad 20.5/Astronomy 20.5/Astro 2021" --exclude="astropy/**" --exclude=".git/**" --exclude=".venv/**" --exclude="General/hbase/**" -P.

Kiwix

Download all of Wikipedia, or optionally, Wikipedia Astronomy.

Speedcrunch

Great for unit conversions: https://speedcrunch.org/userguide/advanced.html

Astropy

For advanced users, you will definitely want to build the documentation: https://github.com/astropy/astropy/blob/main/docs/install.rst#building-documentation

Wikipedia

You can download Wikipedia using Kiwix. It should be more than enough for regionals and state.

Generate a binder

mkbinder.py is a Python script to download web pages. It can detect if the latest version of a website is newer than the downloaded version and download only the web pages that need to be updated.

You need to have Python 3 installed as well as wkhtmltopdf. You also need to be able to use the command line.

First download this repository to your computer.

Navigate to the folder in your terminal and run pip install -r requirements.txt to install dependencies.

Add links to download to text files in the Links folder. The links in each text file will be downloaded to their own folder.

Now run python mkbinder.py. It may take a while, depending on how many links to download.

Spam Ctrl-C in your terminal to quit the script while it's running.

You can change the backend used to download the websites, but the default backend pdfkit tends to work the best and is recommended. There is an alternative backend weasyprint which may work better in some cases and does not require wkhtmltopdf. Only change the backend if you are having trouble with the default and you know what you are doing!

usage: mkbinder.py [-h] [--backend {pdfkit,weasyprint}] [--force {False,True}]

optional arguments:
  -h, --help            show this help message and exit
  --backend {pdfkit,weasyprint}, -b {pdfkit,weasyprint}
                        change the download backend; default: pdfkit
  --force {False,True}, -f {False,True}
                        force download all links instead of only the ones that need to be updated; default: False