How to download python scripts from GitHub

· ☕ 2 min read · ✍️ Bence

The iolite GitHub repository contains many examples of additional modules for iolite written in python. It’s not always obvious how to download and use these files, so here’s a quick rundown of the process.

Note that you could download the entire repository and add to it, or edit it and push your changes back so that others in the community can use your improvements. However, that is beyond the scope of this note.

Downloading code from GitHub

The first step is to visit the repository and find the file you’re looking for. The files are divided into six different folders, depening on their main usage: importers, DRS, exporters, QAQC modules, iolite Workspace scripts, and User Interface (UI) modules. Once you’ve found the file you would like to download, you can click on the Raw button (highlighted in green in the image below). This will show the file by itself (without the webpage elements around it). You can then right click on it and Save As… to save the file to your computer.

Where to put the files on my computer?

iolite looks in specific folder locations when it starts up to load any custom files. These locations are adjustable so that you can ensure you have read/write access to these files. The locations are stored as “Paths” in iolite’s Preferences. If, for example, you’ve downloaded a DRS from GitHub and you are wondering where to put it, you can go to iolite’s preferences, and in the Paths section the path iolite will look for python DRS files will be listed in the Data Reduction Schemes item (see below).

If you click on the folder icon at the end of each item, it will allow you to change the Path. If you click on the arrow icon at the end of each item it will take you to the folder. You can use the latter to find where to put your file downloaded from GitHub.

If you have any troubles with any of the above, please feel free to add to the discussion on the forum.


iolite team
WRITTEN BY
Bence
iolite developer


What's on this Page