shusain / code-parser-and-summary-tools

This repo contains a few scripts to parse and summarize TS code (primarily to then use as prompt input for LLMs)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C👀PAST - Code Parser and Summary Tools

This repo contains a few scripts to parse and summarize TS code (primarily to then use as prompt input for LLMs):

command desscription
npm start -- /path/to/an/angular/app
DIRECTORY=~/Development/asteroids-p5-ts/ \
npm run ts-to-txt
generates a UML class diagram in DOT format from a directory of TypeScript files.
DIRECTORY=~/Development/asteroids-p5-ts/ \
npm run generate-uml
generates a UML class diagram in DOT format from a directory of TypeScript files.

Prerequisites

Installation

  1. Clone this repository or download the source code.
  2. Install the dependencies by running npm install in the project directory.

Usage details

To generate a UML diagram, run the following command in the project directory:

DIRECTORY=~/Development/video-text-prompt npm run generate-uml

Replace DIRECTORY=path with the path to the directory containing your TypeScript files.

The command will generate an output.png file in the project directory.

Examples

See the examples for some sample output of each script

Limitations

  • The app assumes that each TypeScript file contains exactly one class.
  • The app does not handle circular references between classes.

License

This project is licensed under the MIT License. See LICENSE file for details.

About

This repo contains a few scripts to parse and summarize TS code (primarily to then use as prompt input for LLMs)


Languages

Language:TypeScript 68.6%Language:Java 31.4%