Skip to content

Instantly share code, notes, and snippets.

View sokada1221's full-sized avatar
🦉

Shinnosuke Okada sokada1221

🦉
View GitHub Profile
@sokada1221
sokada1221 / add_for_duration.py
Created November 4, 2019 21:00
Helper script to add the for duration to the annotations
import os
import sys
import ruamel.yaml
yaml = ruamel.yaml.YAML()
# yaml.preserve_quotes = True
directory = "."
for filename in os.listdir(directory):
if filename.endswith(".yml"):
with open(filename, "r") as fp:
#!/bin/bash
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
#set -x
function script_usage() {
cat << EOF
Usage: