Make the template expression more concise.
authorSteven Black <redacted>
Sun, 11 Dec 2016 04:51:37 +0000 (23:51 -0500)
committerSteven Black <redacted>
Sun, 11 Dec 2016 04:51:37 +0000 (23:51 -0500)
updateReadme.py

index 4024be96d652b6f5a57053d401d94fe6ffb4079d..8111af062c3c5a3481dc81b87724c89a959021b3 100644 (file)
@@ -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)
git clone https://git.99rst.org/PROJECT