Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

ministryofjustice/MetaDataPoC

Repository files navigation

MetaDataPoC

Repo for quick GitHub Repo Meta Data - how we could use it

Demo

asciicast

Snippets

Bash

# All data
curl -s https://raw.githubusercontent.com/ministryofjustice/MetaDataPoC/main/METADATA.json | jq

# Support
curl -s https://raw.githubusercontent.com/ministryofjustice/MetaDataPoC/main/METADATA.json | jq '.support'

# Team + Email
curl -s https://raw.githubusercontent.com/ministryofjustice/MetaDataPoC/main/METADATA.json | jq '.team + ": " + .email'

CLI

# Usage
python3 metadata-cli-example.py ministryofjustice MetaDataPoC -h

# Team
python3 metadata-cli-example.py ministryofjustice MetaDataPoC team

# Email
python3 metadata-cli-example.py ministryofjustice MetaDataPoC email

# All data
python3 metadata-cli-example.py ministryofjustice MetaDataPoC display

Python

from lib.GitHubMetadata import GitHubMetadata

org_name = "ministryofjustice"
repo_name = "MetaDataPoC"

meta = GitHubMetadata(org_name, repo_name)

print("Display particular property")
print(f"Team: {meta.team}")
print(f"Documentation: {meta.documentation}")
print()

print("Using compound items")
for k, v in meta.contact.items():
    print(f"{k} : {v}")
print()

print("Display all")
meta.display()

About

Short PoC for Repository Metadata

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages