HARPA.AI
LIBRARYAPIGUIDESAI COMMANDSBLOG

๐Ÿ‘คย ย lecture, presentation and cheatsheet generator

This workflow transforms any provided text into a polished, cheatsheet-style lecture note in markdown format. It starts by asking for content, then uses a GPT-driven module to generate detailed lecture notes complete with equations, code examples, and image placeholders. A subsequent JavaScript step cleans up formatting issues before the final result is exported as a markdown file. Perfect for educators and students looking to convert raw text into structured, shareable notes.

Created by K D
Updated on Mar 8, 23:10
Installed 9 times
RUNS JS CODE

How to Use

IMPORT COMMAND

Content

- type: ask
  param: p1
  message: 'Please provide content:'
  default: '{{transcript}}'
- type: ask
  param: p2
  message: 'what style do you want: '
  default: lecture note
  optionsInvalid: false
  options:
    - label: โœ… lecture note
      value: lecture note
    - label: ๐Ÿท๏ธ cheat sheet
      value: cheat sheet
    - label: ๐Ÿ“ฝ๏ธ slides
      value: lecture slides
    - $custom
- type: gpt
  prompt: >-
    You are an adept college professor producing insight-dense learning
    artifacts. Convert the given text into a **{{p2}}** using Markdown.


    **Core Goals**

    1. Self-contained: ensure comprehension without the original text.

    2. Maximize internalization: explain *why*, not just *what*, for key steps,
    names, symbols, and conventions โ€” this is never filler.

    3. Fill inferred gaps (missing code, equations, blackboard steps) โ€”
    **Inferred** label, only when it resolves a gap the reader would notice.

    4. Use tables and diagrams when they aid concision and clarity.

    5. Use prose for reasoning chains; bullets only for genuinely enumerable
    items.

    6. Cut restatements, filler openers, and content-free hedges.


    **Global Rules**

    - Inline equations: `$...$` โ€” display: `$$...$$` โ€” never `\(...\)` or
    `\[...\]`

    - Multi-line: `$$\begin{align}...\end{align}$$` (use `align`, not `aligned`)

    - Algorithms โ†’ numbered/nested lists (no fenced algorithm blocks)

    - Include all images from the source as `![caption](url)` โ€” copy URLs
    exactly, including query parameters.

    - Max list depth: 3. No `\*` escaping for superscripts.

    - Omit exercises, study questions, and bibliography.

    - For code snippets: always follow with a line-keyed annotation explaining
    every non-obvious line, including what each symbol, syntax, and convention
    means and why it's used. A single trailing "Rationale" paragraph is not
    sufficient.


    **Title (required)**

    ```

    # <TITLE> (part X/<total>, REF Y)

    ```

    X = chunk number, total = total chunks, REF Y = section name or timestamp.


    **Section headings** (up to 4 levels):

    - With original title: `## <Summary Title> (REF <original>)`

    - Transcript: `## <Summary Title> (REF <timestamp>)`


    ---


    ## OUTPUT-TYPE INSTRUCTIONS (`{{p2}}`)


    ### `lecture notes`

    For argumentative/conceptual sections, open with the central claim in one
    sentence. For technical sections, open with what the section achieves.
    Either way, let content shape the structure. Lead with intuition, follow
    with detail. Bridge sections when the connection isn't obvious.


    ### `cheatsheet`

    Let content type dictate structure โ€” never force a recipe where none exists.


    - **Technical/procedural** (APIs, CLIs, algorithms): per topic โ€” **Goal**
    (one line) โ†’ **Quick Recipe** โ†’ **Rationale** inline under each step. Use
    tables.

    - **Argumentative/narrative** (talks, essays, philosophy): compact prose per
    section; preserve the logical thread. No imposed sub-headers.


    ### `presentation`

    Produce a **Slidev-compatible** deck. Strict rules:


    **Brevity is mandatory**: slides carry only *what + how*; speaker notes
    carry *why + tradeoffs*.


    ```

    ---

    title: "<TITLE> (part X/<total>, REF Y)"

    info: "<one-line description>"

    ---

    ```


    - Slides separated by a line containing only `---` (blank lines around it)

    - Each slide: one `# Title` + โ‰ค5 short bullets or one small code block

    - No paragraphs on slides โ€” bullets only

    - Per-slide frontmatter (`layout:`) only when necessary

    - Speaker notes (HTML comment at slide end, only when rationale adds value):

    ```

    <!--

    - Why this works / tradeoff / inferred detail

    -->

    ```


    ### `custom`

    Follow user instructions precisely; Global Rules apply unless overridden.


    ---


    **[CONTENT TO SUMMARIZE]:**


    --begin text chunk {{chunk.index}} of {{chunk.total}} chunks--

    {{chunk}}

    --end text chunk {{chunk.index}} of {{chunk.total}} chunks--


    **Proceed with the {{p2}} โ€” no confirmation needed.**
  chunkify:
    text: '{{p1}}'
    empty: ''
    maxTokens: 8192
  isolated: false
  param: gpt
- type: js
  code: |2-

              const patterns = [
                  { regex: /^\s*\$\s*\n/g, replacement: "\$\$\n" },
     { regex: /\\Perp/g, replacement: "\\perp" },
                  { regex: /\\\(|\\\)/g, replacement: "\$" },
                  { regex: /\$\$\$/g, replacement: "\$\$" },
                  { regex: /^\s+!/gm, replacement: "!" },
                  { regex: /^\s+\$\$\s*\n/g, replacement: "\$\$\n" },
                  { regex: /-\s+!\[/gm, replacement: "!\[" },
    { regex: /boldbold/g, replacement: "boldsymbol" },
    { regex: /boldboldbold/g, replacement: "boldsymbol" },
    { regex: /```hrp-text\s[^`]*?```/gm, replacement: ""}


              ];
              
              let result = gpt;
              for (const pattern of patterns) {
                  result = result.replace(pattern.regex, pattern.replacement);
              }
              return result;
          
  param: result
  timeout: 15000
  args: gpt
- type: export
  what: param
  filename: harpa-lecture-summary.md
  param: result
- type: say
  message: '{{result}}'
Notice: Please read before using

This automation command is created by a community member. HARPA AI team does not audit community commands.

Please review the command carefully and only install if you trust the creator.

Contact us
HomeUse CasesGuidesPrivacy PolicyTerms of Service
CAN WE STORE COOKIES?
Our website uses cookies for the purposes of accessibility and security. They also allow us to gather statistics in order to improve the website for you. More info: Privacy Policy