#!/usr/bin/env bash # To view the default JSON feed (newest posts first, includes POST IDs): # curl -s https://gettogether.dev/feed | python3 -m json.tool curl -s https://gettogether.dev/feed | python3 -c " import sys, json # List of ANSI color codes. To change the display colors, replace the # BRIGHT_BLUE or BRIGHT_CYAN variables used in the print statement below. BRIGHT_RED = '\033[91m' RED = '\033[31m' BRIGHT_GREEN = '\033[92m' GREEN = '\033[32m' BRIGHT_YELLOW = '\033[93m' YELLOW = '\033[33m' BRIGHT_BLUE = '\033[94m' BLUE = '\033[34m' BRIGHT_MAGENTA = '\033[95m' MAGENTA = '\033[35m' BRIGHT_CYAN = '\033[96m' CYAN = '\033[36m' BRIGHT_WHITE = '\033[97m' WHITE = '\033[37m' RESET = '\033[0m' data = json.load(sys.stdin) print() for post in data['posts']: print(f\"{BRIGHT_BLUE}{post['nickname']}{RESET}: {BRIGHT_CYAN}{post['body']}{RESET}\\n\") "