This repository contains the meta data driving the
SwiftPM Catalog
macOS application.
It enhances the search data provided by the
excellent
SwiftPM Library
with categorization information, in addition to some extra meta data.
Pull Requests Welcome!
If you’d like to add icons or snapshots, rearrange or promote
certain packages in a section, feel free to submit a pull request.
Before submitting, please make sure the JSON is valid, e.g. using:
make validate
Note: When icons are from a resizable source, we prefer the 256x256 images.
Testing
You can test changes by setting the CatalogInfoURL user default.
The default’s default is this URL of this repo:
https://raw.githubusercontent.com/ZeeZide/SwiftPMCatalog/master/catalog-info.json.
But you can point it to any location you like.
E.g. defaults write NSGlobalDomain CatalogInfoURL "http://myserver/catalog-info.plist", or start the app on the commandline
with the -CatalogInfoURL "http://myserver/catalog-info.plist" argument.
The app tries to refresh from that URL on every restart.
Catalog JSON Format
We now generate the catalog-info.json from separate JSON files:
the index.json files contained in the sidebar subfolder,
this hierarchy represents what is shown in the app’s sidebar
icons.json contains repository to icon mappings
snapshot-images.json contains images for the bigger widget views
(if missing those are autogenerated using WebKit)
The main catalog content is a set of “sections” shown in the sidebar.
Those can have “subsections” and “content”.
The “content” is again an array of different content types (currently two
kinds of lists).
Sections
Sections are stored under the “sidebar” key, they have:
a “title”
(currently) a static “image” (e.g. “ImDiscover”) stored in the asset catalog
of the application
By default snapshots are generated by snapshotting the repository web page.
But you can also provide a nicer, more descriptive image. Which can even
point to an animated GIF.
Note: Images a preferable at 1.6x scale (e.g. 640x400).
SwiftPM Catalog
This repository contains the meta data driving the SwiftPM Catalog macOS application. It enhances the search data provided by the excellent SwiftPM Library with categorization information, in addition to some extra meta data.
Pull Requests Welcome!
If you’d like to add icons or snapshots, rearrange or promote certain packages in a section, feel free to submit a pull request.
Before submitting, please make sure the JSON is valid, e.g. using:
Testing
You can test changes by setting the
CatalogInfoURL
user default. The default’s default is this URL of this repo:https://raw.githubusercontent.com/ZeeZide/SwiftPMCatalog/master/catalog-info.json
. But you can point it to any location you like.E.g.
defaults write NSGlobalDomain CatalogInfoURL "http://myserver/catalog-info.plist"
, or start the app on the commandline with the-CatalogInfoURL "http://myserver/catalog-info.plist"
argument.The app tries to refresh from that URL on every restart.
Catalog JSON Format
We now generate the
catalog-info.json
from separate JSON files:index.json
files contained in thesidebar
subfolder, this hierarchy represents what is shown in the app’s sidebaricons.json
contains repository to icon mappingssnapshot-images.json
contains images for the bigger widget views (if missing those are autogenerated using WebKit)The main catalog content is a set of “sections” shown in the sidebar. Those can have “subsections” and “content”. The “content” is again an array of different content types (currently two kinds of lists).
Sections
Sections are stored under the “sidebar” key, they have:
Example:
Content
Currently there are two types of content:
Small lists can be driven by either a SwiftPM Library query, or by a static set of repository URLs.
“snapshot-lists” are always backed by repository URLs.
Sample small query list:
Sample snapshot list:
Overriding Images
Using the catalog you can override default images generated by the application.
Icons
Note: When icons are from a resizable source, we prefer the 256x256 images.
Note: GitHub org image do not need to be added. If one is missing, please file an issue instead of a PR. Thanks!
Would be nice to have better auto icon lookup, but right now you can override icons.
Snapshot Images
By default snapshots are generated by snapshotting the repository web page. But you can also provide a nicer, more descriptive image. Which can even point to an animated GIF.
Note: Images a preferable at 1.6x scale (e.g. 640x400).
Example:
Links
Who
Brought to you by ZeeZide. We like feedback, GitHub stars, cool contract work, presumably any form of praise you can think of.