Summary and Schedule
This Library Carpentry lesson introduces humanities scholars, educators, and public practitioners to essential open-source research tools. At the conclusion of the lesson you will be able to:
- describe the basics of the Unix shell
- explain why and how to use the command line
- use shell commands to work with directories and files
- use shell commands to find and manipulate data
- Understand and use Git/GitHub
- Use Git from the Unix Shell
Prerequisites
- To complete this lesson, you will need a Unix-like shell environment (see Setup). You will also need to download the file shell-lesson.zip from the lesson website to your desktop and extract it there (once you have unzipped/extracted the file, you should end up with a folder called “shell-lesson”).
- Setup a GitHub account
- Install git on your own computer
Be Excellent to Each Other
- If you spot someone in the class who is struggling with something and you think you know how to help, please give them a hand. Try not to do the task for them: instead explain the steps they need to take and what these steps will achieve.
Setup Instructions | Download files required for the lesson | |
Duration: 00h 00m | 1. Introduction |
what will the workshop cover? how will the workshop work? why are open practices important for the humanities? |
Duration: 00h 30m | 2. Jargon Busting | What terms, phrases, or ideas around code or software development have you come across and feel you should know better? |
Duration: 01h 15m | 3. Hello Open Source | what is open source |
Duration: 02h 15m | 4. Getting Ready for the Next step | what tools will we use in this workshop? |
Duration: 02h 45m | 5. What is the shell? |
What is the shell? What is the command line? Why should I use it? |
Duration: 02h 50m | 6. Navigating the filesystem | How do you move around the filesystem in the shell? |
Duration: 03h 20m | 7. Working with files and directories |
How can I copy, move, and delete files and directories? How can I read files? |
Duration: 03h 50m | 8. Automating the tedious with loops |
What is a loop? How can a loop be used to repeat a task? |
Duration: 04h 20m | 9. Counting and mining with the shell |
How can I count data? How can I find data within files? How can I combine existing commands to do new things? |
Duration: 05h 50m | 10. Working with free text | How do we work with complex files? |
Duration: 06h 50m | 11. What is Git/GitHub? |
What is Git? What is GitHub? |
Duration: 07h 00m | 12. Getting started with Git |
What are repositories and how are they created? What do add and commit mean?How do I check the status of my repository? |
Duration: 07h 25m | 13. Sharing your work |
How can I use Git and GitHub to share my work? How do I link a local Git repository to GitHub? How do I move changes between a local Git repository and a GitHub repository? How can I see the differences between my current file and my most recent commit? |
Duration: 08h 40m | 14. Review | How can I cement my understanding of Git’s functions? |
Duration: 09h 05m | 15. GitHub Pages |
What is GitHub Pages? How can I use GitHub Pages to collaborate and share my work? |
Duration: 09h 40m | 16. 16-what-is-myst |
How can we build an interactive webpage using Markdown files? How do we initialize myst? What does myst need to run? How do I view mny work? |
Duration: 09h 52m | 17. formatting-with-frontmatter |
How do you format your webpage using frontmatter? How do you have preview glossary in oyur webpage nicely? How do you change your webpage’s theme? |
Duration: 10h 04m | 18. 18-dynamic-content |
How do you cite papers with myst? What is the professional way to add figures to my webpage? How do you do cross referencing on your webpage? |
Duration: 10h 16m | 19. 19-publishing-myst |
How do you utilize GitHub Pages to publish your myst webpage? How do you utiliza GitHub branches for publishing a webpage? How can we do more dynamic hosting? (Curvenote) |
Duration: 10h 28m | 20. closing-next-steps | What comes next? |
Duration: 11h 08m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
Software Setup
Details
We will have time to do the setup, at least most of it, during the workshop.
The only thing that must be completed before the first day is to have a GitHub Account.
Shell
To participate in this Library Carpentry lesson, you will need a working Unix-like shell environment. We will be using Bash (Bourne Again Shell) which is standard on Linux and macOS. Some macOS users (Catalina or later) will have zsh (Z shell) as their default version. Even if you are a Windows user, learning Bash will open up a powerful set of tools on your personal machine, and familiarize you with the standard remote interface used on most servers and supercomputers.
The shell is a program that allows you to interact with your computer using typed text commands. It is the primary interface used on Linux and Unix-based systems, such as macOS, and can be installed optionally on other operating systems such as Windows.
Terminal Setup
A terminal is the text-based interface that gives the user access to the shell of the operating system. Bash is the default shell on most Linux distributions and older versions of macOS. Windows users will need to install Git Bash to provide a Unix-like environment.
- Windows: There are also some more advanced solutions available for running Bash commands on Windows. A Bash shell command-line tool is available for Windows 10, which you can use if you enable the Windows Subsystem for Linux. You can also run Bash commands on a remote computer or server that already has a Unix Shell from your Windows machine. This can be done through a Secure Shell (SSH) client. One client available for free for Windows is PuTTY.
If you encounter issues, the Carpentries has a Configuration Problems and Solutions wiki page that may help.
Python
Python is a very popular scripting programming language. We want to
make sure we have it installed to use some packages that are built with
python such as mystmd
Here are steps to installing
python:
Data Files
You need to download some files to follow this lesson:
Download shell-lesson.zip and move the file to your Desktop.
Unzip/extract the file (ask your instructor if you need help with this step). You should end up with a new folder called
shell-lesson
on your Desktop.-
Open the terminal and type
ls
followed by the enter key.You should see a list of files and folders in your current directory.
-
Then type:
This command will show you where you are in your file system, which should now be your home directory. In the lesson, you will find out more about the commands
ls
,pwd
and how to work with the data inshell-lesson
folder.
Git
Installing Git
Since several Carpentries lessons rely on Git, please see this section of the workshop template for instructions on installing Git for various operating systems.
Creating a GitHub Account
You will need an account for GitHub to follow this lesson.
- Go to https://github.com and follow the “Sign up” link at the top-right of the window
- Follow the instructions to create an account
- Verify your email address with GitHub
- Configure multifactor authentication (see below)
Multi-factor Authentication
In 2023, GitHub introduced a requirement for all accounts to have multi-factor authentication (2FA) configured for extra security. Several options exist for setting up 2FA, which are summarised here:
- If you already use an authenticator app, like Google Authenticator or Duo Mobile on your smartphone for example, add GitHub to that app.
- If you have access to a smartphone but do not already use an authenticator app, install one and add GitHub to the app.
- If you do not have access to a smartphone or do not want to install an authenticator app, you have two options:
The GitHub documentation provides more details about configuring 2FA.
VS Code
VS Code is a text editor with super powers that help programmers with their work by applying color schemes to text to help programmers follow syntactical and semantical rules. It also gives its users access to a terminal built in within it. And it can holf extentions that can be useful for different purposes. Example extentions: - GitLense - pdf viewer - GitHub Copilot
Here are installation instructions for VS Code: ::: tab ### Windows Download the windows installer for windows and run it
Linux
- Download the debian-based distribution
- Run the install through the graphical software center if it’s available
- Or use the commandline to run it:
sudo apt install ./<file>.deb
Mac OS
- Download Visual Studio Code for macOS.
- Open the browser’s download list and locate the downloaded app or archive.
- If archive, extract the archive contents. Use double-click for some browsers or select the ‘magnifying glass’ icon with Safari.
- Drag Visual Studio Code.app to the Applications folder, making it available in the macOS Launchpad.
- Open VS Code from the Applications folder, by double clicking the icon.
- Add VS Code to your Dock by right-clicking on the icon, located in the Dock, to bring up the context menu and choosing Options, Keep in Dock.
- Launch VS Code from the c
::::::::::::::
Myst
Myst is a tool used to build and render interactive webpages easily
using text files with a splash of markdown syntax (the arrangement of
words and phrases to create well-formed sentences in a language)
:::::::: callout Depending on how your python install went, you may need
to use pip3
instead of pip ::::::
Installing myst: ::: tab ### Windows
This requires having python package installer - Confirm you have
Python installed in your system and Python Package Installer
pip
python -v
pip -v
If you get an output from these two commands then you have these two packages installed - On your shell terminal run:
pip install mystmd
::::::::::