This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get ESP8266 going with Arduino IDE | |
// - https://github.com/esp8266/Arduino#installing-with-boards-manager | |
// Required libraries (sketch -> include library -> manage libraries) | |
// - PubSubClient by Nick ‘O Leary | |
// - DHT sensor library by Adafruit | |
#include <ESP8266WiFi.h> | |
#include <PubSubClient.h> | |
#include <DHT.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alignment top_left | |
background yes | |
border_width 1 | |
cpu_avg_samples 2 | |
default_color 9a875f | |
default_outline_color white | |
default_shade_color white | |
draw_borders no | |
draw_graph_borders no | |
draw_outline no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: python tt2srt.py source.xml output.srt | |
from xml.dom.minidom import parse | |
import sys | |
i=1 | |
dom = parse(sys.argv[1]) | |
out = open(sys.argv[2], 'w') | |
body = dom.getElementsByTagName("body")[0] | |
paras = body.getElementsByTagName("p") | |
for para in paras: |