From 55b8ecf6fe91c2278153ebf207bd5ed110f5f239 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Wed, 6 Mar 2019 15:02:56 +0100 Subject: [PATCH] wip is done --- wip/2019-03-05.json | 34 ---------------------------------- wip/json-reader.py | 18 ------------------ 2 files changed, 52 deletions(-) delete mode 100644 wip/2019-03-05.json delete mode 100644 wip/json-reader.py diff --git a/wip/2019-03-05.json b/wip/2019-03-05.json deleted file mode 100644 index 901ab4a9..00000000 --- a/wip/2019-03-05.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "channel": "Test 1", - "date": "2019-03-05", - "begin": "06:00:00.000", - "length": "24:00:00.000", - "program": [{ - "in": 0, - "out": 647.68, - "duration": 647.68, - "source": "/Media/clip1.mp4" - }, - - { - "in": 0, - "out": 149, - "duration": 149, - "source": "/Media/clip2.mp4" - }, - - { - "in": 0, - "out": 114.72, - "duration": 114.72, - "source": "/Media/clip3.mp4" - }, - - { - "in": 0, - "out": 2531.36, - "duration": 2531.36, - "source": "/Media/clip4.mp4" - } - ] -} diff --git a/wip/json-reader.py b/wip/json-reader.py deleted file mode 100644 index 0de8b7be..00000000 --- a/wip/json-reader.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -import json - -with open('2019-03-05.json') as f: - data = json.load(f) - -h, m, s = data["begin"].split(':') -begin = float(h) * 3600 + float(m) * 60 + float(s) - -for item in data["program"]: - inp = item["in"] - out = item["out"] - duration = item["duration"] - - print(begin) - begin += out - inp