This script saves GitHub issues in TSV format
The script has two software dependancies:
- GitHub CLI for querying GitHub API
jq
for transforming the output of the above to TSV format
def asciify(data): | |
""" | |
SYNOPSIS | |
Asciifies strings, lists and dicts, and nested versions of same | |
DESCRIPTION | |
The JSON spec (http://www.ietf.org/rfc/rfc4627.txt) -- "JSON text SHALL | |
be encoded in Unicode". For apps that don't use unicode, this function | |
walks through all levels of a JSON data structure and converts each item | |
to ASCII. See http://stackoverflow.com/questions/956867/ for original. |
#!/usr/bin/env python | |
import os | |
import sys | |
import yaml | |
def dict_to_dir(data, path=str()): | |
"""dict_to_dir expects data to be a dictionary with one top-level key.""" |
# search replace AWS_ACCOUNT_ID with your AWS account ID and adjust the variables below (line 3-7), especially your API key | |
# if your flow needs access to other AWS resources other than S3, add those in the task role policy: line 96-108 | |
export AWS_REGION=us-east-1 | |
export ECS_CLUSTER_NAME=prefectEcsCluster | |
export ECS_LOG_GROUP_NAME=/ecs/prefectEcsAgent | |
export ECS_SERVICE_NAME=prefectECSAgent | |
export PREFECT_API_KEY=your_Prefect_Cloud_API_key | |
export AWS_PAGER="" | |
aws ssm put-parameter --type SecureString --name PREFECT__CLOUD__API_KEY --value $PREFECT_API_KEY --region $AWS_REGION --overwrite |
This script saves GitHub issues in TSV format
The script has two software dependancies:
jq
for transforming the output of the above to TSV format