scoop-docs icon indicating copy to clipboard operation
scoop-docs copied to clipboard

TODO

Open kidonng opened this issue 6 years ago • 5 comments

  • [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

kidonng avatar Jul 09 '19 19:07 kidonng

(Buckets can be found via the GitHub Topic scoop-bucket)

r15ch13 avatar Jul 28 '19 11:07 r15ch13

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.

kidonng avatar Jul 28 '19 17:07 kidonng

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
        }
      }
    }
  }
}

r15ch13 avatar Jul 29 '19 14:07 r15ch13

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.

kidonng avatar Jul 29 '19 18:07 kidonng

... 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:

r15ch13 avatar Jul 29 '19 19:07 r15ch13