From 33bff42d881b02a9f4dbdad4d1887be2990035ec Mon Sep 17 00:00:00 2001 From: numbbbbb Date: Tue, 3 Jun 2014 17:26:42 +0800 Subject: [PATCH] add change_cdn script --- change_cdn.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 change_cdn.py diff --git a/change_cdn.py b/change_cdn.py new file mode 100644 index 00000000..8c3cb381 --- /dev/null +++ b/change_cdn.py @@ -0,0 +1,17 @@ +#!/usr/bin/python + + +import os + + +def iter(path): + for root, dirs, files in os.walk(path): + for fn in files: + if fn.endswith(".html"): + with open(root + '/' + fn, 'r') as f: + content = f.read() + content = content.replace('', '').replace('', '') + with open(root + '/' + fn, 'w') as f: + f.write(content) + +iter(os.getcwd())