Always use LF in README files
authorXhmikosR <redacted>
Wed, 27 May 2020 13:40:55 +0000 (16:40 +0300)
committerGitHub <redacted>
Wed, 27 May 2020 13:40:55 +0000 (16:40 +0300)
updateReadme.py

index 633fb0446e0ca328fde78648fbab18a61744ab5d..b4b0be192f43100f81496e5a2ca90b620aec80e2 100644 (file)
@@ -26,7 +26,7 @@ def main():
         "${fmtentries} | "
         "[link](http://sbc.io/hosts/${location}hosts)"
     )
-    with open(README_DATA_FILENAME, "r", encoding="utf-8") as f:
+    with open(README_DATA_FILENAME, "r", encoding="utf-8", newline="\n") as f:
         data = json.load(f)
 
     keys = list(data.keys())
@@ -80,9 +80,9 @@ def main():
             source_rows += t.substitute(this_row) + "\n"
 
         with open(
-            os.path.join(data[key]["location"], README_FILENAME), "wt", encoding="utf-8"
+            os.path.join(data[key]["location"], README_FILENAME), "wt", encoding="utf-8", newline="\n"
         ) as out:
-            for line in open(README_TEMPLATE, encoding="utf-8"):
+            for line in open(README_TEMPLATE, encoding="utf-8", newline="\n"):
                 line = line.replace(
                     "@GEN_DATE@", time.strftime("%B %d %Y", time.gmtime())
                 )
git clone https://git.99rst.org/PROJECT