odpi / egeria-docs

Documentation repository for the Egeria project.
https://egeria-project.org
Other
23 stars 31 forks source link

Enhanced Github repository catalog #646

Open planetf1 opened 1 year ago

planetf1 commented 1 year ago

There are a number of issues open to add additional repositories into the catalog at https://github.com/odpi/egeria-docs/blob/aac6a437b83c8c50d2464b6e1d1f4c01026cd3e0/site/docs/education/tutorials/git-and-git-hub-tutorial/egeria-git-repositories.md?plain=1#L16

Rather than manually add each one, I experimented with a script which can


 This seems a more sustainable model, and opens up some additional questions
  - Where should we checkin this script?
  - could we automate it's execution at page build time
  - what other data do we want to include
  - what sort order/grouping is needed (currently the script is unsorted, I sorted in intellij...)
planetf1 commented 1 year ago

For now I will

planetf1 commented 1 year ago

Current script:

#!/usr/bin/python3
import json
import subprocess

repoinfo = subprocess.check_output('gh repo list odpi --limit 200 --json name,description,repositoryTopics,isArchived',shell=True)
repojson = json.loads(repoinfo)

print('| Repository | Purpose |')
print('| --- | --- |')
for entry in repojson:
    name=entry['name']
    description=entry['description']
    topics=entry['repositoryTopics']
    archived=entry['isArchived']
    if topics is not None:
        if 'egeria' not in topics:
            if not archived:
                print ("| [`%s` :material-github:](https://github.com/odpi/%s){ target=gh } | %s |" % (name,name,description))
davidradl commented 1 year ago

@planetf1 Could we add this script to the gradle build for the docs repo - i.e. run this Python in a step prior to the site build; so the documentation picks up this information on every build.

planetf1 commented 1 year ago

Yes, that sort of thing... I think we can do it for other similar content too. I'd probably put all generated content in one place, then refactor the docs a little to embed the dynamic content. I wanted to record the idea as I didn't have time to do it straight away, and in any case - worth a discussion on a team call/f2f,.

planetf1 commented 1 year ago

though probably wouldn't introduce gradle for this

planetf1 commented 1 year ago

run 1-off for v4