appimage

package
v0.0.0-...-ef44059 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceGitHub    = "git.github"
	SourceDirectURL = "raw.url"
	SourceZapIndex  = "idx.zap"
)

Variables

This section is empty.

Functions

func Install

func Install(options types.InstallOptions, config config.Store) error

func List

func List(zapConfig config.Store, index bool) ([]string, error)

func Remove

func Remove(options types.RemoveOptions, config config.Store) error

Remove function helps to remove an appimage, given its executable name with which it was registered

func Update

func Update(options types.Options, config config.Store) error

Update method is a safe wrapper script which exposes update to the Command Line interface also handles those appimages which are up-to-date

func Upgrade

func Upgrade(config config.Store, silent bool) ([]string, error)

Upgrade method helps to update multiple apps without asking users for manual input

Types

type AppImage

type AppImage struct {
	Filepath        string `json:"filepath"`
	Executable      string `json:"executable"`
	IconPath        string `json:"icon_path,omitempty"`
	IconPathHicolor string `json:"icon_path_hicolor,omitempty"`
	DesktopFile     string `json:"desktop_file,omitempty"`
	Source          Source `json:"source"`
}

func RemoveAndInstall

func RemoveAndInstall(options types.InstallOptions, config config.Store, app *AppImage) (*AppImage, error)

RemoveAndInstall helps to remove the AppImage first and then reinstall the appimage. this is particularly used in updating the AppImages from GitHub and Zap Index when the update information is missing

func UpdateInPlace

func UpdateInPlace(options types.InstallOptions, config config.Store, app *AppImage) (*AppImage, error)

UpdateInPlace is used to first download a appImage and then after is safe remove the old one

func (AppImage) Extract

func (appimage AppImage) Extract(dir string, relPath string) string

func (AppImage) ExtractDesktopFile

func (appimage AppImage) ExtractDesktopFile() ([]byte, error)

ExtractDesktopFile helps to extract the thumbnails to config.icons directory with the apps' basename and png as the Name */

func (*AppImage) ExtractThumbnail

func (appimage *AppImage) ExtractThumbnail(target string)

ExtractThumbnail helps to extract the thumbnails to config.icons directory * with the apps' basename and png as the Name

func (*AppImage) ProcessDesktopFile

func (appimage *AppImage) ProcessDesktopFile(cfg config.Store)

ProcessDesktopFile extracts the desktop file, adds appimage specific keys, and updates them.

type Source

type Source struct {
	Identifier string         `json:"identifier,omitempty"`
	Meta       SourceMetadata `json:"meta,omitempty"`
}

type SourceMetadata

type SourceMetadata struct {
	Slug      string `json:"slug,omitempty"`
	URL       string `json:"url,omitempty"`
	CrawledOn string `json:"crawled_on,omitempty"`
}

Jump to

Keyboard shortcuts

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