# Slash Command Reference

Here’s a handy reference for all the slash commands you can use with the Automated Pipeline Tool. Each command is designed to help you move smoothly through the process of building, reviewing, and publishing your textbook. Check the table below for a quick description and when to use it.

| Command              | Description                                                      |
|----------------------|------------------------------------------------------------------|
| `/parse_pdf`         | Parse PDF files in the `pdf_files/` directory and extract content for textbook generation. |
| `/initialize_jupyter`| Set up the Jupyter Book environment for lecture generation.       |
| `/generate_lectures` | Create structured lecture notes from parsed content.              |
| `/build_textbook`    | Build the textbook from parsed content and generate HTML output.  |
| `/review_lecture`    | Review, edit, or improve individual lecture notes.               |
| `/publish_textbook`  | Publish the built textbook to GitHub Pages.                      |
| `/help`              | Show help and troubleshooting information.                       |

:::{tip}
You can use these commands as many times as needed. See each tutorial for workflow details.
:::

---

Below you’ll find a quick guide to each command’s purpose and usage:

## `/parse_pdf`
- **Purpose:** Parse PDF files in the `pdf_files/` directory and extract their content for textbook generation by running the PDF reader script.
- **Usage:** Place your PDFs in the directory and run the command. The agent will process each file and store results in `output/`.

:::{dropdown} Demo: How to upload and parse a PDF

![Parsing PDF Animation](../images/parsing_pdf.gif)
:::

## `/initialize_jupyter`
- **Purpose:** Set up the Jupyter Book environment for lecture generation, preparing your project for lecture and textbook creation.
- **Usage:** Run before generating lectures to ensure your environment is ready.

:::{dropdown} Demo: Initializing Jupyter Book

![Initialize Jupyter Example](../images/initialize_jupyter.gif)

:::

## `/generate_lectures`
- **Purpose:** Generate structured lecture notes from parsed content, converting extracted data into formatted lecture markdown files.
- **Usage:** Run after initializing Jupyter. The agent will create and format lecture files.

:::{dropdown} Demo: Generating lecture notes

![Review Lecture Demo](../images/generate-func.png)

:::

## `/build_textbook`
- **Purpose:** Build the textbook from parsed content, generate HTML output, and create the build files required to view and host your textbook (e.g., in the `_build/html/` directory).
- **Usage:** Run after generating the lecture notes. The agent will format and organize your content into a Jupyter Book and produce the files needed for viewing and hosting.



## `/review_lecture`
- **Purpose:** Review, edit, or improve individual lecture notes by evaluating the `## Notes` section of your `lecture_[i].md` file against a model lecture for structure, clarity, tone, use of examples, pedagogical features, and completeness.
- **Usage:** Run to check or refine specific lectures before publishing. The agent provides a structured review with strengths, weaknesses, suggestions, and an overall quality rating (1–10), and offers to apply improvements if desired.

:::{dropdown} Demo: Reviewing a lecture note

![Review Lecture Demo](../images/review_func.gif)

:::

## `/publish_textbook`
- **Purpose:** Publish the built textbook to GitHub Pages by deploying the generated HTML to the `gh-pages` branch, making your book available online.
- **Usage:** Run after building the book to deploy it online. The agent will handle installation of required tools and provide the published link.

