Skip to content

Commit

Permalink
Merge pull request #100 from xplshn/pelf-ng
Browse files Browse the repository at this point in the history
sync
  • Loading branch information
xplshn authored Dec 17, 2024
2 parents 4a8fea0 + d90889e commit 25d6aa2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ Additionally, we embed the tools used for mounting and unmounting the `.AppBundl

#### Resources:
- The [AppBundleHUB](https://github.com/xplshn/AppBundleHUB) a repo which builds a ton of portable AppBundles in an automated fashion, using GH actions. (we have a [webStore](https://fatbuffalo.neocities.org/AppBundleHUBStore) too, tho that is WIP)
- The [`dbin`])(https://github.com/xplshn/dbin) self-contained, portable, statically linked, package manager, 3105 binaries (portable, self-contained/static) are available in its repos at the time of writting. Among these, are the AppBundles from the AppBundleHUB and from pkgforge
- [dbin])(https://github.com/xplshn/dbin) a self-contained, portable, statically linked, package manager, 3105 binaries (portable, self-contained/static) are available in its repos at the time of writting. Among these, are the AppBundles from the AppBundleHUB and from pkgforge
16 changes: 8 additions & 8 deletions cmd/misc/appstream_helper/appstream-helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type Item struct {
PkgId string `json:"pkg_id,omitempty"`
Icon string `json:"icon,omitempty"`
Description string `json:"description,omitempty"`
RichDescription string `json:"rich_description,omitempty"`
LongDescription string `json:"long_description,omitempty"`
Desktop string `json:"desktop,omitempty"`
Screenshots []string `json:"screenshots,omitempty"`
Version string `json:"version,omitempty"`
Expand Down Expand Up @@ -130,7 +130,7 @@ type Component struct {
Url string `xml:",chardata"`
} `xml:"url"`

Description []Tag `xml:"description"` // -> RichDescription
Description []Tag `xml:"description"` // -> LongDescription
Screenshots []Screenshot `xml:"screenshots>screenshot"`
Releases Releases `xml:"releases"`
ContentRating ContentRating `xml:"content_rating"`
Expand Down Expand Up @@ -362,7 +362,7 @@ func ConvertComponentToItem(c Component) Item {
}

// Extract content for name, summary, description, and keywords based on missing xml:lang attribute
var name, summary, richDescription string
var name, summary, LongDescription string
var keywords []string

for _, item := range c.Name {
Expand All @@ -384,7 +384,7 @@ func ConvertComponentToItem(c Component) Item {
// Only escape quotes and backslashes for JSON validity
content := strings.ReplaceAll(item.Content, "\\", "\\\\")
content = strings.ReplaceAll(content, "\"", "\\\"")
richDescription = content
LongDescription = content
break
}
}
Expand Down Expand Up @@ -415,17 +415,17 @@ func ConvertComponentToItem(c Component) Item {
}
summary = minifiedSummary

minifiedRichDescription, err := minifyHTML(richDescription)
minifiedLongDescription, err := minifyHTML(LongDescription)
if err != nil {
fmt.Printf("Error minifying rich description: %v\n", err)
fmt.Printf("Error minifying long_description: %v\n", err)
}
richDescription = minifiedRichDescription
LongDescription = minifiedLongDescription

return Item{
PkgName: name,
PkgId: c.Id,
Description: summary,
RichDescription: richDescription,
LongDescription: LongDescription,
Screenshots: screenshots,
Version: version,
DownloadURL: downloadURL,
Expand Down

0 comments on commit 25d6aa2

Please sign in to comment.