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 Apr 7, 15:02
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 high quality learning
    artifacts. Convert the given text into a **{{p2}}** using Markdown.


    **Core Goals**


    1. Self-contained at college level. Strive to be complete, clear and
    nuanced. Match depth to difficulty. 

    2. Capture all key goals, steps, assumptions, claims, algorithms, code
    snippets, figures, equations, proofs, and case studies seen in the source โ€”
    this is the density floor.

    3. For difficult or non-obvious topics: explain *why*, not just *what*; fill
    inferred gaps (missing code, equations, blackboard steps) when it resolves a
    gap the reader would notice โ€” label as **Inferred**.

    4.No narrator voice ("The central claim isโ€ฆ", "This section arguesโ€ฆ", "This
    text" etc etc), and consider a concept map or synthesis or summary section
    when the length permits.  

    5. Use appropriate format โ€” prose, tables, bullets, diagrams to help
    students best learn. 


    **Global Rules**


    - Equations: inline `$...$`, display `$$...$$`, multi-line
    `$$\begin{align}...\end{align}$$`. Never `\(...\)` or `\[...\]`.

    - Multi-step derivations must be display equations. Trivial arithmetic is
    exempt.

    - Algorithms and named patterns (circuit breakers, backoff, sketches, etc.)
    โ†’ numbered/nested lists with steps, parameter names, and rationale per
    non-obvious step.

    - Images: `![caption](url)` โ€” copy URLs exactly, including query parameters.

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

    - Long References and bibliography seen: omit.

    - Code snippets: line-keyed explanation for every non-obvious line (symbol,
    syntax, why), length appropriate to difficulty.

    - Chunk overlap: state in one sentence what was covered earlier, then focus
    on new detail.

    - Omit exercises unless they are really worked out examples.


    **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 (see `{{p2}}`)


    All types: let content dictate structure. Lead with claims or results
    directly, not narrated. Bridge sections only when the connection is
    genuinely non-obvious.


    - **`lecture notes`** โ€” full reasoning depth; intuition first, then detail.
    Target โ‰ˆ70% of source length

    - **`cheatsheet`** โ€” more concise than lecture notes, but not by cutting
    content, substance or nuance. Achieve density through tighter phrasing,
    tables, and inline structure. 


    - **`presentation`** โ€” more concise than a cheatsheet, but not by cutting
    content. Achieve conciseness through further employing concise visual
    structure โ€” tables over prose, code over description. Each slide should be
    nearly self-contained; push deeper description and rationale into speaker
    notes. Follow these structural rules exactly:


    **Slide breaks:** Use `---` (horizontal rule) on its own line to separate
    slides. Every `---` creates a new slide. Do NOT rely on heading levels to
    create slides โ€” only `---` does that.


    **Speaker notes:** Use a blockquote starting with `Note:` as the last
    element on a slide. These become hidden speaker notes (press `S` to view in
    the presentation).


    **Headings:** Use `#` only on the title slide. Use `##` for slide headings,
    `###` for sub-headings within a slide. Headings do NOT create slide breaks โ€”
    always use `---`.


    **Math:** Inline `$...$`, display `$$...$$`. KaTeX renders these
    automatically.


    **Code blocks:** Use fenced code blocks with language tags (` ```python `, `
    ```yaml `, etc.). These get syntax-highlighted automatically.


    **Fragments (optional):** Append `{.fragment}` to a bullet to make it appear
    on click.


    **Slide density:** Aim for 8โ€“12 visible lines per slide (excluding speaker
    notes). Code blocks longer than ~10 lines will scroll on their own โ€” that's
    fine. If a slide feels crowded, split it rather than shrink the content.


    Opening slide format:


    ```

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


    <one-line description>


    ---

    ```


    Typical content slide:


    ```

    ## Slide Heading


    - Key point one

    - Key point two

    - Key point three


    > Note: Tradeoffs, rationale, or deeper explanation the speaker delivers
    verbally.


    ---

    ```


    Slide with code (use triple-backtick fenced blocks with a language tag):


    ```

    ## Code Example


    Brief context sentence.

        ```python
        def example():
            return "highlighted"
        ```

    > Note: Why this code matters.


    ---

    ```


    **Important:** The final slide should NOT end with `---`. Every other slide
    boundary must have exactly one `---` between slides.


    - **`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