projects

package
v0.5.12 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var DEFAULT_FLAGS = map[string]string{}

Functions

func CloneRepository

func CloneRepository(repoURL string, projectPath string, githubToken string, githubUser string, updateToken bool, flags map[string]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 FlagsToArgs added in v0.5.2

func FlagsToArgs(flags map[string]string) []string

func ProjectPathFmt added in v0.5.2

func ProjectPathFmt(projectPath string) string

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"`
	Git      map[string]string `json:"git,omitempty"`
}

Project and ProjectsJSON store information about cloned repos

func FilterProjectsByTopics

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

This is the defineition

func InProject added in v0.3.41

func InProject(pj *ProjectsJSON) *Project

type ProjectsJSON

type ProjectsJSON struct {
	RootDirectory string    `json:"-"`
	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