From 8fbd424850e8b70d6d113e31d7ac8593b53f8b5e Mon Sep 17 00:00:00 2001 From: Steven Black Date: Sat, 10 Dec 2016 23:51:37 -0500 Subject: [PATCH] Make the template expression more concise. --- updateReadme.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/updateReadme.py b/updateReadme.py index 4024be96d..8111af062 100644 --- a/updateReadme.py +++ b/updateReadme.py @@ -27,7 +27,9 @@ Python3 = sys.version_info >= (3,0) def main(): - s = Template('${description} | [Readme](https://github.com/StevenBlack/hosts/blob/master/${location}readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/${location}hosts) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/${location}hosts.zip) | ${fmtentries}') + master = "https://github.com/StevenBlack/hosts/blob/master/" + raw = "https://raw.githubusercontent.com/StevenBlack/hosts/master/" + s = Template('${description} | [Readme](${master}${location}readme.md) | [link](${raw}${location}hosts) | [link](${raw}${location}hosts.zip) | ${fmtentries}') with open(README_DATA_FILENAME, 'r') as f: data = json.load(f)