Documentation
¶
Index ¶
- Constants
- Variables
- func AppendToConfigurationFile(config string, ic *InputConfig) error
- func CmdOneshotGithubReleaseAppImage(gitRepo, tagOverride, tagPrefix, outputDir, version string) error
- func CmdOneshotGithubReleaseBinary(gitRepo, tagOverride, tagPrefix, outputDir, version string) error
- func CmdOneshotWebAppImage(pageURL, matchExpr, linkExt, outputDir, version string) error
- func ConfigAddAppImageGithubReleases(toConfig, gitRepo, tagOverride, tagPrefix string) error
- func ConfigAddBinaryGithubReleases(toConfig, gitRepo, tagOverride, tagPrefix string) error
- func ConfigAddWebAppImage(toConfig, pageURL, matchExpr, linkExt string) error
- func ConfigViewAppImageGithubReleases(gitRepo, tagOverride, tagPrefix string) error
- func ConfigViewBinaryGithubReleases(gitRepo, tagOverride, tagPrefix string) error
- func ConfigViewWebAppImage(pageURL, matchExpr, linkExt string) error
- func DoubleMapStringer(sb *strings.Builder, key string, valueMap map[string]map[string][]string)
- func GenerateGithubWorkflows(file, outputDir, version string) error
- func GenerateGithubWorkflowsFromInputConfigs(file string, inputConfigs []*InputConfig, outputDir, version string) error
- func GenerateWordMeanings(gitRepo string, versions []string, tags []string) map[string]*FilenamePartMeaning
- func GroupAndSort(wordMap map[string]*FilenamePartMeaning) map[string][]*GroupedFilenamePartMeaning
- func MapDoubleStringer(sb *strings.Builder, key string, valueMap map[string][][]string)
- func MapStringer(sb *strings.Builder, key string, valueMap map[string][]string)
- func NewInputConfigurationFromRepo(gitRepo, tagOverride, tagPrefix, ebuildSuffix, sourceType string) (string, *InputConfig, []string, []string, *github.RepositoryRelease, ...)
- func ParseWorkflowTemplates() (*template.Template, error)
- func ReadDependencies(file string, program *Program) ([]string, error)
- func ReadDependenciesFromReader(program *Program, f io.ReaderAt, unknownSymbols []string) ([]string, error)
- type AppImageFileInfo
- type AppImageFiles
- type BinaryReleaseFileInfo
- func (brfi *BinaryReleaseFileInfo) CheckMaybe() (bool, error)
- func (brfi *BinaryReleaseFileInfo) CompileMeanings(input []*FilenamePartMeaning, container *FileTypes) (*BinaryReleaseFileInfo, bool)
- func (brfi *BinaryReleaseFileInfo) FetchContent() (string, error)
- func (brfi *BinaryReleaseFileInfo) Free()
- func (brfi *BinaryReleaseFileInfo) SearchArchiveForFiles() ([]*BinaryReleaseFileInfo, error)
- func (brfi *BinaryReleaseFileInfo) UnmatchedOkay() bool
- type BinaryReleaseFiles
- type ExternalResource
- type ExternalResourceKeywordExtended
- type FileTypes
- func (t *FileTypes) AllBinaries() (result []*BinaryReleaseFileInfo)
- func (t *FileTypes) AllDocuments() (result []*BinaryReleaseFileInfo)
- func (t *FileTypes) AllManualPages() (result []*BinaryReleaseFileInfo)
- func (t *FileTypes) AllShellCompletionScripts() (result []*BinaryReleaseFileInfo)
- func (t *FileTypes) CheckMaybes() error
- func (t *FileTypes) CountBinaries() int
- func (t *FileTypes) CountCompressedArchives() int
- func (t *FileTypes) CountMaybeBinaries() int
- func (t *FileTypes) Free()
- type FilenamePartMeaning
- type GenerateGithubAppImageTemplateData
- func (ggaitd *GenerateGithubAppImageTemplateData) Dependencies() []string
- func (ggaitd *GenerateGithubAppImageTemplateData) ExternalResources() map[string]*ExternalResource
- func (ggaitd *GenerateGithubAppImageTemplateData) HasDesktopFile() bool
- func (ggaitd *GenerateGithubAppImageTemplateData) IsArchived(keyword string) bool
- func (ggaitd *GenerateGithubAppImageTemplateData) KeywordList() []string
- func (ggaitd *GenerateGithubAppImageTemplateData) Keywords() string
- func (ggaitd *GenerateGithubAppImageTemplateData) MaskedKeywords() string
- func (ggaitd *GenerateGithubAppImageTemplateData) NeedsSrcUnpack() bool
- func (ggaitd *GenerateGithubAppImageTemplateData) PackageName() string
- func (ggaitd *GenerateGithubAppImageTemplateData) TemplateFileName() string
- func (ggaitd *GenerateGithubAppImageTemplateData) WorkflowFileName() string
- func (ggaitd *GenerateGithubAppImageTemplateData) WorkflowName() string
- type GenerateGithubBinaryTemplateData
- func (ggbtd *GenerateGithubBinaryTemplateData) AlternativeDependencies() map[string][]string
- func (ggbtd *GenerateGithubBinaryTemplateData) CompressGroupedKeywordedFilenameReference(result []KeywordGrouped[*KeywordedFilenameReference]) []KeywordGrouped[*KeywordedFilenameReference]
- func (ggbtd *GenerateGithubBinaryTemplateData) CompressGroupedKeywordedanualPageReference(result []KeywordGrouped[*KeywordedManualPageReference]) []KeywordGrouped[*KeywordedManualPageReference]
- func (ggbtd *GenerateGithubBinaryTemplateData) CompressedManualPages() (result []KeywordGrouped[*KeywordedManualPageReference])
- func (ggbtd *GenerateGithubBinaryTemplateData) Documents() (result []KeywordGrouped[*KeywordedFilenameReference])
- func (ggbtd *GenerateGithubBinaryTemplateData) ExternalResources() []*ExternalResourceKeywordExtended
- func (ggbtd *GenerateGithubBinaryTemplateData) ExtractedUseFlags() []string
- func (ggbtd *GenerateGithubBinaryTemplateData) G2MetadataArgs() string
- func (ggbtd *GenerateGithubBinaryTemplateData) GetMustHaveUseFlags(programName string, kw string) []string
- func (ggbtd *GenerateGithubBinaryTemplateData) GetMustntHaveUseFlags(programName string, kw string) []string
- func (ggbtd *GenerateGithubBinaryTemplateData) HasCompressedManualPages() bool
- func (ggbtd *GenerateGithubBinaryTemplateData) HasDesktopFile() bool
- func (ggbtd *GenerateGithubBinaryTemplateData) HasDocuments() bool
- func (ggbtd *GenerateGithubBinaryTemplateData) HasManualPages() bool
- func (ggbtd *GenerateGithubBinaryTemplateData) HasShellCompletion(shell string) bool
- func (ggbtd *GenerateGithubBinaryTemplateData) IsArchived(keyword string) bool
- func (ggbtd *GenerateGithubBinaryTemplateData) KeywordList() []string
- func (ggbtd *GenerateGithubBinaryTemplateData) Keywords() string
- func (ggbtd *GenerateGithubBinaryTemplateData) MainDependencies() []string
- func (ggbtd *GenerateGithubBinaryTemplateData) ManualPages() (result []KeywordGrouped[*KeywordedManualPageReference])
- func (ggbtd *GenerateGithubBinaryTemplateData) MaskedKeywords() string
- func (ggbtd *GenerateGithubBinaryTemplateData) Metadata() (string, error)
- func (ggbtd *GenerateGithubBinaryTemplateData) NeedsSrcUnpack() bool
- func (ggbtd *GenerateGithubBinaryTemplateData) PackageName() string
- func (ggbtd *GenerateGithubBinaryTemplateData) ParseKeywordAndUseFlags(kw string) (string, []string, []string)
- func (ggbtd *GenerateGithubBinaryTemplateData) ProgramsAsAlternatives() map[string][]string
- func (ggbtd *GenerateGithubBinaryTemplateData) ProgramsAsAlternativesForArch(forArchitecture string) []string
- func (ggbtd *GenerateGithubBinaryTemplateData) ReverseProgramsAsAlternatives() map[string][]string
- func (ggbtd *GenerateGithubBinaryTemplateData) ShellCompletion(shell string) []KeywordGrouped[*KeywordedFilenameReference]
- func (ggbtd *GenerateGithubBinaryTemplateData) ShellCompletionInstallPath(shell string) (string, error)
- func (ggbtd *GenerateGithubBinaryTemplateData) ShellCompletionShells() []string
- func (ggbtd *GenerateGithubBinaryTemplateData) TemplateFileName() string
- func (ggbtd *GenerateGithubBinaryTemplateData) WorkflowFileName() string
- func (ggbtd *GenerateGithubBinaryTemplateData) WorkflowName() string
- type GenerateGithubWorkflowBase
- type GenerateWebAppImageTemplateData
- type GroupedFilenamePartMeaning
- type InputConfig
- func CreateSanitizeAndAppendInputConfig(parsedFields map[string][]string, ...) ([]*InputConfig, error)
- func GenerateAppImageGithubReleaseConfigEntry(gitRepo, tagOverride, tagPrefix string) (*InputConfig, error)
- func GenerateBinaryGithubReleaseConfigEntry(gitRepo, tagOverride, prefix string) (*InputConfig, error)
- func GenerateWebAppImageConfigEntry(pageURL, matchExpr, linkExt string) (*InputConfig, []util.AppImageLink, error)
- func ParseInputConfigReader(file io.Reader) ([]*InputConfig, error)
- func ReadConfigurationFile(configFn string) ([]*InputConfig, error)
- func (ic *InputConfig) CreateAndSanitizeInputConfigProgram(programName string, programFields map[string][]string) (*Program, error)
- func (ic *InputConfig) Cron() string
- func (ic *InputConfig) GenerateGithubWorkflow(file string, now time.Time, templates *template.Template, ...) error
- func (ic *InputConfig) GetPrograms() map[string]*Program
- func (ic *InputConfig) ProgramsString() []string
- func (ic *InputConfig) String() string
- func (ic *InputConfig) Validate() error
- func (ic *InputConfig) WorkaroundSemanticVersionPrereleaseHack1() bool
- func (ic *InputConfig) WorkaroundSemanticVersionWithoutV() bool
- func (ic *InputConfig) WorkaroundString() []string
- func (ic *InputConfig) WorkaroundTagPrefix() string
- type KeywordGrouped
- type KeywordedFilenameReference
- type KeywordedManualPageReference
- func (kmpr KeywordedManualPageReference) Compressed() bool
- func (kmpr KeywordedManualPageReference) Decompressor() string
- func (kmpr KeywordedManualPageReference) DestinationFilename() string
- func (kmpr KeywordedManualPageReference) Page() int
- func (kmpr KeywordedManualPageReference) SourceFilepath() string
- func (kmpr KeywordedManualPageReference) UncompressedSourceFilepath() string
- type Program
- func (p *Program) FirstIcons() string
- func (p *Program) HasCompressedManualPages() bool
- func (p *Program) HasDesktopFile() bool
- func (p *Program) HasDocuments() bool
- func (p *Program) HasManualPage() bool
- func (p *Program) HasShellCompletion(shell string) bool
- func (p *Program) InstalledFilename() string
- func (p *Program) IsArchived(arch string) bool
- func (p *Program) IsEmpty() bool
- func (p *Program) ShellCompletion(shell string) (result []*KeywordedFilenameReference)
- func (p *Program) String() string
Constants ¶
const ( DefaultCategory = "app-misc" DefaultLicense = "unknown" )
Variables ¶
var (
DefaultDesktopFileEnabled = false
)
Functions ¶
func AppendToConfigurationFile ¶
func AppendToConfigurationFile(config string, ic *InputConfig) error
func CmdOneshotWebAppImage ¶
CmdOneshotWebAppImage writes the derived configuration to stdout and renders a workflow.
func ConfigAddWebAppImage ¶
ConfigAddWebAppImage appends a generated configuration entry to the provided file.
func ConfigViewWebAppImage ¶
ConfigViewWebAppImage prints the derived configuration for inspection.
func DoubleMapStringer ¶
func GenerateGithubWorkflows ¶
func GenerateGithubWorkflowsFromInputConfigs ¶
func GenerateGithubWorkflowsFromInputConfigs(file string, inputConfigs []*InputConfig, outputDir, version string) error
func GenerateWordMeanings ¶
func GenerateWordMeanings(gitRepo string, versions []string, tags []string) map[string]*FilenamePartMeaning
func GroupAndSort ¶
func GroupAndSort(wordMap map[string]*FilenamePartMeaning) map[string][]*GroupedFilenamePartMeaning
func MapDoubleStringer ¶
func NewInputConfigurationFromRepo ¶
func NewInputConfigurationFromRepo(gitRepo, tagOverride, tagPrefix, ebuildSuffix, sourceType string) (string, *InputConfig, []string, []string, *github.RepositoryRelease, *InputConfig, error)
func ParseWorkflowTemplates ¶
Types ¶
type AppImageFileInfo ¶
type AppImageFileInfo struct {
// Core properties
// Gentoo keyword
Keyword string
OS string
// Generally msvc, gnu, musl, etc
Toolchain string
// Like tar, or zip, also a bit of bz2, and gz but not proper "containers", later replaced by the container of the
// contained file
Container string
ProgramName string
// Compiled only
Containers []string
// App image filename, not container
Filename string
// Relevant restraint + identification
AppImage bool
// Identification
Version bool
Tag bool
ProjectName bool
// Match rules
SuffixOnly bool
CaseInsensitive bool
KeywordDefaulted bool
// Required for the URL only atm:
ReleaseAsset *github.ReleaseAsset
// Unmatched
Unmatched []string
OriginalFilename string
Installer bool
// contains filtered or unexported fields
}
func (*AppImageFileInfo) CompileMeanings ¶
func (base *AppImageFileInfo) CompileMeanings(input []*FilenamePartMeaning) (*AppImageFileInfo, bool)
func (*AppImageFileInfo) GetInformationFromAppImage ¶
func (appImage *AppImageFileInfo) GetInformationFromAppImage(repoName string, ic *InputConfig) error
func (*AppImageFileInfo) SearchArchiveForAppImageFiles ¶
func (container *AppImageFileInfo) SearchArchiveForAppImageFiles() ([]*AppImageFileInfo, error)
type AppImageFiles ¶
type AppImageFiles []*AppImageFileInfo
func (AppImageFiles) ExtractAppImagesAndContainers ¶
func (base AppImageFiles) ExtractAppImagesAndContainers(wordMap map[string][]*GroupedFilenamePartMeaning) ([]*AppImageFileInfo, []*AppImageFileInfo)
type BinaryReleaseFileInfo ¶
type BinaryReleaseFileInfo struct {
// Core properties
// Gentoo keyword
Keyword string
OS string
// Generally msvc, gnu, musl, etc
Toolchain string
// Like tar, or zip, also a bit of bz2, and gz but not proper "containers", later replaced by the container of the
// contained file
ProgramName string
OriginalFilename string
ArchivePathname string
InstalledName string
ExecutableBit bool
Installer bool
Document bool
AppImage bool
Container *BinaryReleaseFileInfo
DirectoryName string
// Compiled only
Containers []string
// Binary filename, not container
Filename string
// Relevant restraint + identification
Binary bool
ShellCompletionFile bool
ShellScript string
// Identification
Version bool
Tag bool
ProjectName bool
ManualPage int
// Match rules
SuffixOnly bool
CaseInsensitive bool
KeywordDefaulted bool
// Required for the URL only atm:
ReleaseAsset *github.ReleaseAsset
// Unmatched
Unmatched []string
// contains filtered or unexported fields
}
func (*BinaryReleaseFileInfo) CheckMaybe ¶
func (brfi *BinaryReleaseFileInfo) CheckMaybe() (bool, error)
func (*BinaryReleaseFileInfo) CompileMeanings ¶
func (brfi *BinaryReleaseFileInfo) CompileMeanings(input []*FilenamePartMeaning, container *FileTypes) (*BinaryReleaseFileInfo, bool)
func (*BinaryReleaseFileInfo) FetchContent ¶
func (brfi *BinaryReleaseFileInfo) FetchContent() (string, error)
func (*BinaryReleaseFileInfo) Free ¶
func (brfi *BinaryReleaseFileInfo) Free()
func (*BinaryReleaseFileInfo) SearchArchiveForFiles ¶
func (brfi *BinaryReleaseFileInfo) SearchArchiveForFiles() ([]*BinaryReleaseFileInfo, error)
func (*BinaryReleaseFileInfo) UnmatchedOkay ¶
func (brfi *BinaryReleaseFileInfo) UnmatchedOkay() bool
type BinaryReleaseFiles ¶
type BinaryReleaseFiles []*BinaryReleaseFileInfo
func (BinaryReleaseFiles) FindFiles ¶
func (bases BinaryReleaseFiles) FindFiles(wordMap map[string][]*GroupedFilenamePartMeaning, root *FileTypes) *FileTypes
type ExternalResource ¶
type ExternalResourceKeywordExtended ¶
type ExternalResourceKeywordExtended struct {
ExternalResource *ExternalResource
MustHaveUseFlags []string
MustntHaveUseFlags []string
}
func (*ExternalResourceKeywordExtended) Archived ¶
func (erke *ExternalResourceKeywordExtended) Archived() bool
func (*ExternalResourceKeywordExtended) Keyword ¶
func (erke *ExternalResourceKeywordExtended) Keyword() string
func (*ExternalResourceKeywordExtended) ReleaseFilename ¶
func (erke *ExternalResourceKeywordExtended) ReleaseFilename() string
type FileTypes ¶
type FileTypes struct {
CompressedArchives []*BinaryReleaseFileInfo
CompressedArchiveContent map[string]*FileTypes
Binaries []*BinaryReleaseFileInfo
ManualPages []*BinaryReleaseFileInfo
ShellCompletionScripts []*BinaryReleaseFileInfo
Root *FileTypes
MightBeBinaries []*BinaryReleaseFileInfo
Documents []*BinaryReleaseFileInfo
}
func (*FileTypes) AllBinaries ¶
func (t *FileTypes) AllBinaries() (result []*BinaryReleaseFileInfo)
func (*FileTypes) AllDocuments ¶
func (t *FileTypes) AllDocuments() (result []*BinaryReleaseFileInfo)
func (*FileTypes) AllManualPages ¶
func (t *FileTypes) AllManualPages() (result []*BinaryReleaseFileInfo)
func (*FileTypes) AllShellCompletionScripts ¶
func (t *FileTypes) AllShellCompletionScripts() (result []*BinaryReleaseFileInfo)
func (*FileTypes) CheckMaybes ¶
func (*FileTypes) CountBinaries ¶
func (*FileTypes) CountCompressedArchives ¶
func (*FileTypes) CountMaybeBinaries ¶
type FilenamePartMeaning ¶
type FilenamePartMeaning struct {
// Core properties
// Gentoo keyword
Keyword string
OS string
// Generally msvc, gnu, musl, etc
Toolchain string
// Like tar, or zip, also a bit of bz2, and gz but not proper "containers", later replaced by the container of the
// contained file
Container string
// The separator -_-
Separator bool
Captured string
// Relevant restraint + identification
AppImage bool
Installer bool
Document bool
ShellCompletionFile bool
ShellScript string
ManualPage int
// Identification
Version bool
Tag bool
ProjectName bool
Folder bool
// Match rules
SuffixOnly bool
CaseInsensitive bool
// Required for the URL only atm:
Unmatched bool
}
func DecodeFilename ¶
func DecodeFilename(groupedWordMap map[string][]*GroupedFilenamePartMeaning, filename string) []*FilenamePartMeaning
type GenerateGithubAppImageTemplateData ¶
type GenerateGithubAppImageTemplateData struct {
*GenerateGithubWorkflowBase
}
func (*GenerateGithubAppImageTemplateData) Dependencies ¶
func (ggaitd *GenerateGithubAppImageTemplateData) Dependencies() []string
func (*GenerateGithubAppImageTemplateData) ExternalResources ¶
func (ggaitd *GenerateGithubAppImageTemplateData) ExternalResources() map[string]*ExternalResource
func (*GenerateGithubAppImageTemplateData) HasDesktopFile ¶
func (ggaitd *GenerateGithubAppImageTemplateData) HasDesktopFile() bool
func (*GenerateGithubAppImageTemplateData) IsArchived ¶
func (ggaitd *GenerateGithubAppImageTemplateData) IsArchived(keyword string) bool
func (*GenerateGithubAppImageTemplateData) KeywordList ¶
func (ggaitd *GenerateGithubAppImageTemplateData) KeywordList() []string
func (*GenerateGithubAppImageTemplateData) Keywords ¶
func (ggaitd *GenerateGithubAppImageTemplateData) Keywords() string
func (*GenerateGithubAppImageTemplateData) MaskedKeywords ¶
func (ggaitd *GenerateGithubAppImageTemplateData) MaskedKeywords() string
func (*GenerateGithubAppImageTemplateData) NeedsSrcUnpack ¶
func (ggaitd *GenerateGithubAppImageTemplateData) NeedsSrcUnpack() bool
func (*GenerateGithubAppImageTemplateData) PackageName ¶
func (ggaitd *GenerateGithubAppImageTemplateData) PackageName() string
func (*GenerateGithubAppImageTemplateData) TemplateFileName ¶
func (ggaitd *GenerateGithubAppImageTemplateData) TemplateFileName() string
func (*GenerateGithubAppImageTemplateData) WorkflowFileName ¶
func (ggaitd *GenerateGithubAppImageTemplateData) WorkflowFileName() string
func (*GenerateGithubAppImageTemplateData) WorkflowName ¶
func (ggaitd *GenerateGithubAppImageTemplateData) WorkflowName() string
type GenerateGithubBinaryTemplateData ¶
type GenerateGithubBinaryTemplateData struct {
*GenerateGithubWorkflowBase
MustntHaveUseFlags map[string]map[string][]string
MustHaveUseFlags map[string]map[string][]string
// contains filtered or unexported fields
}
func (*GenerateGithubBinaryTemplateData) AlternativeDependencies ¶
func (ggbtd *GenerateGithubBinaryTemplateData) AlternativeDependencies() map[string][]string
func (*GenerateGithubBinaryTemplateData) CompressGroupedKeywordedFilenameReference ¶
func (ggbtd *GenerateGithubBinaryTemplateData) CompressGroupedKeywordedFilenameReference(result []KeywordGrouped[*KeywordedFilenameReference]) []KeywordGrouped[*KeywordedFilenameReference]
func (*GenerateGithubBinaryTemplateData) CompressGroupedKeywordedanualPageReference ¶
func (ggbtd *GenerateGithubBinaryTemplateData) CompressGroupedKeywordedanualPageReference(result []KeywordGrouped[*KeywordedManualPageReference]) []KeywordGrouped[*KeywordedManualPageReference]
func (*GenerateGithubBinaryTemplateData) CompressedManualPages ¶
func (ggbtd *GenerateGithubBinaryTemplateData) CompressedManualPages() (result []KeywordGrouped[*KeywordedManualPageReference])
func (*GenerateGithubBinaryTemplateData) Documents ¶
func (ggbtd *GenerateGithubBinaryTemplateData) Documents() (result []KeywordGrouped[*KeywordedFilenameReference])
func (*GenerateGithubBinaryTemplateData) ExternalResources ¶
func (ggbtd *GenerateGithubBinaryTemplateData) ExternalResources() []*ExternalResourceKeywordExtended
func (*GenerateGithubBinaryTemplateData) ExtractedUseFlags ¶
func (ggbtd *GenerateGithubBinaryTemplateData) ExtractedUseFlags() []string
func (*GenerateGithubBinaryTemplateData) G2MetadataArgs ¶ added in v0.1.26
func (ggbtd *GenerateGithubBinaryTemplateData) G2MetadataArgs() string
func (*GenerateGithubBinaryTemplateData) GetMustHaveUseFlags ¶
func (ggbtd *GenerateGithubBinaryTemplateData) GetMustHaveUseFlags(programName string, kw string) []string
func (*GenerateGithubBinaryTemplateData) GetMustntHaveUseFlags ¶
func (ggbtd *GenerateGithubBinaryTemplateData) GetMustntHaveUseFlags(programName string, kw string) []string
func (*GenerateGithubBinaryTemplateData) HasCompressedManualPages ¶
func (ggbtd *GenerateGithubBinaryTemplateData) HasCompressedManualPages() bool
func (*GenerateGithubBinaryTemplateData) HasDesktopFile ¶
func (ggbtd *GenerateGithubBinaryTemplateData) HasDesktopFile() bool
func (*GenerateGithubBinaryTemplateData) HasDocuments ¶
func (ggbtd *GenerateGithubBinaryTemplateData) HasDocuments() bool
func (*GenerateGithubBinaryTemplateData) HasManualPages ¶
func (ggbtd *GenerateGithubBinaryTemplateData) HasManualPages() bool
func (*GenerateGithubBinaryTemplateData) HasShellCompletion ¶
func (ggbtd *GenerateGithubBinaryTemplateData) HasShellCompletion(shell string) bool
func (*GenerateGithubBinaryTemplateData) IsArchived ¶
func (ggbtd *GenerateGithubBinaryTemplateData) IsArchived(keyword string) bool
func (*GenerateGithubBinaryTemplateData) KeywordList ¶
func (ggbtd *GenerateGithubBinaryTemplateData) KeywordList() []string
func (*GenerateGithubBinaryTemplateData) Keywords ¶
func (ggbtd *GenerateGithubBinaryTemplateData) Keywords() string
func (*GenerateGithubBinaryTemplateData) MainDependencies ¶
func (ggbtd *GenerateGithubBinaryTemplateData) MainDependencies() []string
func (*GenerateGithubBinaryTemplateData) ManualPages ¶
func (ggbtd *GenerateGithubBinaryTemplateData) ManualPages() (result []KeywordGrouped[*KeywordedManualPageReference])
func (*GenerateGithubBinaryTemplateData) MaskedKeywords ¶
func (ggbtd *GenerateGithubBinaryTemplateData) MaskedKeywords() string
func (*GenerateGithubBinaryTemplateData) Metadata ¶
func (ggbtd *GenerateGithubBinaryTemplateData) Metadata() (string, error)
func (*GenerateGithubBinaryTemplateData) NeedsSrcUnpack ¶
func (ggbtd *GenerateGithubBinaryTemplateData) NeedsSrcUnpack() bool
func (*GenerateGithubBinaryTemplateData) PackageName ¶
func (ggbtd *GenerateGithubBinaryTemplateData) PackageName() string
func (*GenerateGithubBinaryTemplateData) ParseKeywordAndUseFlags ¶
func (ggbtd *GenerateGithubBinaryTemplateData) ParseKeywordAndUseFlags(kw string) (string, []string, []string)
func (*GenerateGithubBinaryTemplateData) ProgramsAsAlternatives ¶
func (ggbtd *GenerateGithubBinaryTemplateData) ProgramsAsAlternatives() map[string][]string
func (*GenerateGithubBinaryTemplateData) ProgramsAsAlternativesForArch ¶
func (ggbtd *GenerateGithubBinaryTemplateData) ProgramsAsAlternativesForArch(forArchitecture string) []string
func (*GenerateGithubBinaryTemplateData) ReverseProgramsAsAlternatives ¶
func (ggbtd *GenerateGithubBinaryTemplateData) ReverseProgramsAsAlternatives() map[string][]string
func (*GenerateGithubBinaryTemplateData) ShellCompletion ¶
func (ggbtd *GenerateGithubBinaryTemplateData) ShellCompletion(shell string) []KeywordGrouped[*KeywordedFilenameReference]
func (*GenerateGithubBinaryTemplateData) ShellCompletionInstallPath ¶
func (ggbtd *GenerateGithubBinaryTemplateData) ShellCompletionInstallPath(shell string) (string, error)
func (*GenerateGithubBinaryTemplateData) ShellCompletionShells ¶
func (ggbtd *GenerateGithubBinaryTemplateData) ShellCompletionShells() []string
func (*GenerateGithubBinaryTemplateData) TemplateFileName ¶
func (ggbtd *GenerateGithubBinaryTemplateData) TemplateFileName() string
func (*GenerateGithubBinaryTemplateData) WorkflowFileName ¶
func (ggbtd *GenerateGithubBinaryTemplateData) WorkflowFileName() string
func (*GenerateGithubBinaryTemplateData) WorkflowName ¶
func (ggbtd *GenerateGithubBinaryTemplateData) WorkflowName() string
type GenerateGithubWorkflowBase ¶
type GenerateGithubWorkflowBase struct {
*InputConfig
Version string
Now time.Time
ConfigFile string
}
func (*GenerateGithubWorkflowBase) DefaultMetadata ¶
func (b *GenerateGithubWorkflowBase) DefaultMetadata() (string, error)
func (*GenerateGithubWorkflowBase) G2MetadataArgs ¶ added in v0.1.26
func (b *GenerateGithubWorkflowBase) G2MetadataArgs() string
type GenerateWebAppImageTemplateData ¶
type GenerateWebAppImageTemplateData struct {
*GenerateGithubAppImageTemplateData
}
GenerateWebAppImageTemplateData reuses the Github AppImage workflow data but renders using a different template for non-GitHub downloads.
func (*GenerateWebAppImageTemplateData) TemplateFileName ¶
func (gwatd *GenerateWebAppImageTemplateData) TemplateFileName() string
TemplateFileName returns the template used for arbitrary website downloads.
type GroupedFilenamePartMeaning ¶
type GroupedFilenamePartMeaning struct {
*FilenamePartMeaning
Key string
}
func (*GroupedFilenamePartMeaning) Match ¶
func (m *GroupedFilenamePartMeaning) Match(s string) bool
type InputConfig ¶
type InputConfig struct {
EntryNumber int
Type string
GithubProjectUrl string
DownloadPageUrl string
DownloadMatch string
Category string
EbuildName string
Description string
Homepage string
GithubRepo string
GithubOwner string
License string
MaintainerEmail string
MaintainerName string
Workarounds map[string]string
Programs map[string]*Program
IUse []string
RequiredUse []string
}
InputConfig represents a single configuration entry.
func CreateSanitizeAndAppendInputConfig ¶
func CreateSanitizeAndAppendInputConfig(parsedFields map[string][]string, parsedProgramFields map[string]map[string][]string, configs []*InputConfig) ([]*InputConfig, error)
func GenerateAppImageGithubReleaseConfigEntry ¶
func GenerateAppImageGithubReleaseConfigEntry(gitRepo, tagOverride, tagPrefix string) (*InputConfig, error)
func GenerateBinaryGithubReleaseConfigEntry ¶
func GenerateBinaryGithubReleaseConfigEntry(gitRepo, tagOverride, prefix string) (*InputConfig, error)
func GenerateWebAppImageConfigEntry ¶
func GenerateWebAppImageConfigEntry(pageURL, matchExpr, linkExt string) (*InputConfig, []util.AppImageLink, error)
GenerateWebAppImageConfigEntry builds a configuration entry for a web-hosted AppImage by inspecting the download page and deriving sensible defaults.
func ParseInputConfigReader ¶
func ParseInputConfigReader(file io.Reader) ([]*InputConfig, error)
ParseInputConfigReader parses the given configuration file and returns a slice of InputConfig structures.
func ReadConfigurationFile ¶
func ReadConfigurationFile(configFn string) ([]*InputConfig, error)
func (*InputConfig) CreateAndSanitizeInputConfigProgram ¶
func (*InputConfig) Cron ¶
func (ic *InputConfig) Cron() string
func (*InputConfig) GenerateGithubWorkflow ¶
func (*InputConfig) GetPrograms ¶
func (ic *InputConfig) GetPrograms() map[string]*Program
func (*InputConfig) ProgramsString ¶
func (ic *InputConfig) ProgramsString() []string
func (*InputConfig) String ¶
func (ic *InputConfig) String() string
String serializes the InputConfig struct back into the configuration file format.
func (*InputConfig) Validate ¶
func (ic *InputConfig) Validate() error
func (*InputConfig) WorkaroundSemanticVersionPrereleaseHack1 ¶
func (ic *InputConfig) WorkaroundSemanticVersionPrereleaseHack1() bool
func (*InputConfig) WorkaroundSemanticVersionWithoutV ¶
func (ic *InputConfig) WorkaroundSemanticVersionWithoutV() bool
func (*InputConfig) WorkaroundString ¶
func (ic *InputConfig) WorkaroundString() []string
func (*InputConfig) WorkaroundTagPrefix ¶
func (ic *InputConfig) WorkaroundTagPrefix() string
type KeywordGrouped ¶
func KeywordGroupCompressor ¶
func KeywordGroupCompressor[T any](ggbtd *GenerateGithubBinaryTemplateData, result []KeywordGrouped[T], comparerFunc func(reference T, reference2 T) bool) []KeywordGrouped[T]
type KeywordedFilenameReference ¶
func (*KeywordedFilenameReference) DestinationFilename ¶
func (kr *KeywordedFilenameReference) DestinationFilename() string
func (*KeywordedFilenameReference) SourceFilepath ¶
func (kr *KeywordedFilenameReference) SourceFilepath() string
type KeywordedManualPageReference ¶
type KeywordedManualPageReference KeywordedFilenameReference
func (KeywordedManualPageReference) Compressed ¶
func (kmpr KeywordedManualPageReference) Compressed() bool
func (KeywordedManualPageReference) Decompressor ¶
func (kmpr KeywordedManualPageReference) Decompressor() string
func (KeywordedManualPageReference) DestinationFilename ¶
func (kmpr KeywordedManualPageReference) DestinationFilename() string
func (KeywordedManualPageReference) Page ¶
func (kmpr KeywordedManualPageReference) Page() int
func (KeywordedManualPageReference) SourceFilepath ¶
func (kmpr KeywordedManualPageReference) SourceFilepath() string
func (KeywordedManualPageReference) UncompressedSourceFilepath ¶
func (kmpr KeywordedManualPageReference) UncompressedSourceFilepath() string
type Program ¶
type Program struct {
ProgramName string
Binary map[string][]string
DesktopFile string
Icons []string
Documents map[string][][]string
ManualPage map[string][][]string
ShellCompletionScripts map[string]map[string][]string
Dependencies []string
}
func (*Program) FirstIcons ¶
func (*Program) HasCompressedManualPages ¶
func (*Program) HasDesktopFile ¶
func (*Program) HasDocuments ¶
func (*Program) HasManualPage ¶
func (*Program) HasShellCompletion ¶
func (*Program) InstalledFilename ¶
func (*Program) IsArchived ¶
func (*Program) ShellCompletion ¶
func (p *Program) ShellCompletion(shell string) (result []*KeywordedFilenameReference)