We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4f7b90 commit b846b76Copy full SHA for b846b76
generate_html.py
@@ -0,0 +1,27 @@
1
+import json
2
+
3
+def generate_html():
4
+ """
5
+ Just a simple function to generate a chunk of HTML that I can
6
+ paste into my blog entry detailing this same info. Makes it
7
+ easier to keep things up to date. Automating this completely
8
+ would be better but that will have to wait till I have time
9
+ to investigate blogger api's.
10
11
+ fp = open('aws.json')
12
+ data = json.load(fp)
13
+ fp.close()
14
15
+ html = ''
16
+ keys = data['services'].keys()
17
+ keys.sort()
18
+ for service in keys:
19
+ value = data['services'][service]
20
+ html += '<b>%s</b>\n' % service
21
+ html += ' <ul>\n'
22
+ for region in value['regions']:
23
+ html += ' <li>%s: %s</li>\n' % (region['name'],
24
+ region['endpoint'])
25
+ html += ' </ul>\n'
26
+ return html
27
0 commit comments