HARPA.AI
LIBRARYAPIGUIDESAI COMMANDSBLOG

👤  lecture style summary

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 18, 15:48
Installed 9 times
RUNS JS CODE

How to Use

IMPORT COMMAND

Content

- type: ask
  param: p1
  message: 'Please provide content:'
  default: '{{transcript}}'
- type: gpt
  prompt: >-
    You are an adept college professor, skilled in crafting insightful notes. 


    Your task is to convert given text into a cheatsheet-style lecture note with
    markdown syntax. This summary should be detailed, including key steps,
    algorithms, codes, figures (as markdown images),  equations, and carefully
    crafted notes for understanding and utilizing the information without
    referring back to the original text. When formatting equations, use`$...$`
    for inline formula and `$$...$$` for displayed formula, never use "\(...\)"
    or "\[...\]".  Pay special effort to preserve coding examples and images. 
    Include the given chunk number in the H1 title '# <TITLE> (part X/<total>,
    REF Y)' where part is the trunk # given, and REF is section or timestamp in
    the text.  Use up to 4 levels for section headings, put original section if
    available in brackets like "## summary title (REF <original>)'.  Indented
    lists can't contain indented lists, but don't omit details. Study questions
    and exercises can be omitted.


    [CONTENT TO SUMMARIZE]: 

    ```

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

    {{chunk}}

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

    ```

    lecture note:

    # [title] ({{chunk.index}} of {{chunk.total}} )
  chunkify:
    text: '{{p1}}'
    empty: ''
    maxTokens: 5120
  isolated: true
  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
  param: result
  filename: harpa-lecture-summary.md
- 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