scoop-docs
scoop-docs copied to clipboard
TODO
- [x] Algolia DocSearch
- [x] Distinguish known and other buckets
- [x] Style and optimizations
- [ ] ~~GraphQL: use variables https://github.com/octokit/graphql.js#usage~~
- [ ] Improve search (https://github.com/lukesampson/scoop/pull/3446)
- [ ] Crawl more buckets
- [ ] Bucket search
- [ ] Dark mode
- [ ] Support manifests with URL-Arrays (e.g. bison.json, kitty.json)
- [ ] Show license information with link to SPDX (for processing the
license-property see scoop-info.ps1#L66-L79)
(Buckets can be found via the GitHub Topic scoop-bucket)
Thanks for your attention 😊
Support manifests with URL-Arrays
Thanks for mentioning that! I was too lazy to handle various situations when the project started 😁 but of course we won't leave out that.
Show license information with link to SPDX
At first there was license and other stuff but I thought there was way too much info and anyway you can scoop info. I'll try to find a better way to organize them though I suck at designing.
Buckets can be found via the GitHub Topic
scoop-bucket
I was intended to, but not all buckets are tagged (we should encourage bucket maintainers to tag the repo right). And while searching GitHub is inevitable, we need some filter algorithm (for forks and so on) besides dumb traversal. No one wants to maintain a blacklist.
At least I need some time to play with GitHub API and figure out how scoop directory works.
I'll try to find a better way to organize them though I suck at designing.
Haha, don't ask me. I also suck at designing :grin:
I don't know how the Algolia DocSearch thingy works. But maybe the GraphQL API of GitHub itself could be used. https://developer.github.com/v4/
// Edit: Something like this: https://developer.github.com/v4/explorer/
{
search(first: 10, query: "topic:scoop-bucket", type: REPOSITORY) {
repositoryCount
pageInfo {
hasNextPage
hasPreviousPage
}
nodes {
... on Repository {
id
name
nameWithOwner
url
manifests: object(expression: "master:bucket") {
... on Tree {
entries {
name
object {
... on Blob {
text
}
}
}
}
}
shortDescriptionHTML
description
isFork
forkCount
stargazers {
totalCount
}
}
}
}
}
fragment manifests on Repository {
manifests: object(expression: "master:bucket") {
... on Tree {
entries {
name
object {
... on Blob {
text
}
}
}
}
}
}
query GetManifestsFromRepo {
repository(owner: "lukesampson", name: "scoop-extras") {
...manifests
}
}
query SearchScoopBucketRepos {
search(first: 10, query: "topic:scoop-bucket", type: REPOSITORY) {
repositoryCount
pageInfo {
hasNextPage
hasPreviousPage
}
nodes {
... on Repository {
id
name
nameWithOwner
url
...manifests
shortDescriptionHTML
description
isFork
forkCount
stargazers {
totalCount
}
}
}
}
}
I don't know how the Algolia DocSearch thingy works.
That's just for docs (and Algolia maintain that for us), for apps I need to index them by myself.
But maybe the GraphQL API of GitHub itself could be used. https://developer.github.com/v4/
I will take a look at that later, thanks.
... I should have looked into your code https://github.com/kidonng/scoop-docs/blob/fbdaaae3a43453c322f74bf549db76aeca2d1c28/scripts/indexApps.js#L83-L95 You already have all this information :grin: Well, I learned a bit more about GraphQL. :smile: