Appendix A5: Terminal-Only Workflow

This appendix assumes you’ve completed Part 0. If you’d rather not install any editor at all, everything in this book runs from the terminal alone — you’ll just open and edit files with whatever plain text editor came with your system (Notepad on Windows, TextEdit on Mac, nano or vim on Linux) instead of a dedicated code editor.

Activate the environment

Mac/Linux:

source .venv/bin/activate

Windows:

.venv\Scripts\activate

Expected output: your prompt now starts with (.venv). Do this every time you open a new terminal window to work on this book — activation doesn’t persist between sessions.

Install packages

Only needed once, or again if requirements.txt changes:

pip install -r requirements.txt

Run scripts

Every chapter’s script runs the same way:

python code/chapter_01/read_ddr.py datasets/sample_ddrs/FORGE-16A-78-32_Drilling_038_2020-11-26.pdf

Swap in whichever chapter and arguments that chapter’s text shows you.

Render the book

If you want to build the book itself (this document, as HTML or PDF) rather than just running the chapter scripts, Quarto needs to be installed separately — see Appendix A, Section 2 for the render command and output location. This step is entirely optional: nothing about following the chapters and running their code requires rendering the book yourself.