projects

package
v0.3.39 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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