projects

package
v0.3.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectsFile  = "projects.json"
	ScriptsFolder = "scripts"
	ResultsFolder = "results"
	QueryPrompt   = "QUERY_PROMPT.md"
)

Variables

This section is empty.

Functions

func CloneRepository

func CloneRepository(repoURL, projectPath string) error

CloneRepository either clones the repository if not present or pulls the latest changes if already cloned.

func ExtractTypeScriptCode

func ExtractTypeScriptCode(response string) string

extractTypeScriptCode finds the first ```ts or ```typescript code block in a string and returns its contents.

func SaveProjects

func SaveProjects(projects *ProjectsJSON) error

SaveProjects writes the ProjectsJSON struct to projects.json.

Types

type Project

type Project struct {
	Name     string      `json:"name"`
	Path     string      `json:"path"`
	RepoURL  string      `json:"repoUrl"`
	Topics   []string    `json:"topics"`
	Skip     bool        `json:"skip,omitempty"`
	Metadata interface{} `json:"metadata,omitempty"`
}

Project and ProjectsJSON store information about cloned repos

func FilterProjectsByTopics

func FilterProjectsByTopics(projects []Project, topics []string) []Project

type ProjectsJSON

type ProjectsJSON struct {
	Projects []Project `json:"projects"`
}

func LoadProjects

func LoadProjects() (*ProjectsJSON, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL