diff options
| author | crupest <crupest@outlook.com> | 2020-10-27 19:21:35 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2020-10-27 19:21:35 +0800 |
| commit | 05ccb4d8f1bbe3fb64e117136b4a89bcfb0b0b33 (patch) | |
| tree | 929e514de85eb82a5acb96ecffc6e6d2d95f878f /tools/convert-eol.py | |
| parent | 986c6f2e3b858d6332eba0b42acc6861cd4d0227 (diff) | |
| download | timeline-05ccb4d8f1bbe3fb64e117136b4a89bcfb0b0b33.tar.gz timeline-05ccb4d8f1bbe3fb64e117136b4a89bcfb0b0b33.tar.bz2 timeline-05ccb4d8f1bbe3fb64e117136b4a89bcfb0b0b33.zip | |
Split front and back end.
Diffstat (limited to 'tools/convert-eol.py')
| -rw-r--r-- | tools/convert-eol.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tools/convert-eol.py b/tools/convert-eol.py deleted file mode 100644 index 3ea8ed7c..00000000 --- a/tools/convert-eol.py +++ /dev/null @@ -1,35 +0,0 @@ -# This is a python script that converts all text source codes into
-# CRLF (Windows line ending) eol format and UTF-8 with NO BOM encoding.
-
-import glob
-import os.path
-
-project_root = os.path.relpath(os.path.join(os.path.dirname(__file__), '..'))
-
-
-def convert(file_path):
- with open(file_path, 'r', encoding='utf-8') as open_file:
- content = open_file.read()
-
- #if there is BOM, remove BOM
- if content[0] == '\ufeff':
- content = content[1:]
-
- with open(file_path, 'w', encoding='utf-8', newline='\r\n') as open_file:
- open_file.write(content)
-
-
-glob_list = [
- './nuget.config',
- '**/*.sln',
- '**/*.cs',
- '**/*.csproj',
- '**/appsettings*.json'
-]
-
-for glob_pattern in glob_list:
- for f in glob.glob(glob_pattern, recursive=True):
- print('Converting {}'.format(f))
- convert(f)
-
-print('Done!!!')
|
