blob: 20781e3ce2d319f02a7062856e60c8884fd3162f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# Astronomy
Resources for Science Olympiad Astronomy. Note that due to the [license](LICENSE), **you must publicly release any code that you use from this repository**.
## Usage
### 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`.
### Kiwix
Download all of Wikipedia, or if you are low on disk space, Wikipedia Astronomy.
### Speedcrunch
Great for unit conversions: https://speedcrunch.org/userguide/advanced.html
### Astropy
First, clone the submodule with `git submodule init && git submodule update --remote`. Then [build the documentation](https://github.com/astropy/astropy/blob/main/docs/install.rst#building-documentation).
### Download web pages
`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.
First, install dependencies with `pip install -r requirements.txt`. 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.
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!
|