MCPcopy Create free account
hub / github.com/ActiveState/code / main

Function main

recipes/Python/440647_Smart_Links/recipe-440647.py:1–17  ·  view source on GitHub ↗
(index, links, key)

Source from the content-addressed store, hash-verified

1def main(index, links, key):
2 try:
3 index = file(index, 'rU', 0).read()
4 try:
5 links = file(links, 'rU', 0).read()
6 try:
7 source = build(index, links, key)
8 try:
9 html(source)
10 except:
11 plain('ERROR: the source could not be displayed.')
12 except:
13 plain('ERROR: the source could not be built.')
14 except:
15 plain('ERROR: %s (LINKS) cannot be found.' % links)
16 except:
17 plain('ERROR: %s (INDEX) cannot be found.' % index)
18
19def build(index, links, key):
20 links = parse(links)

Callers 1

recipe-440647.pyFile · 0.70

Calls 4

buildFunction · 0.70
htmlFunction · 0.70
plainFunction · 0.70
readMethod · 0.45

Tested by

no test coverage detected