Python scripts: Unify encoding magic comments

This commit is contained in:
aquileia 2016-05-03 22:12:19 +02:00
parent e1021b0ff6
commit 809e61db88
17 changed files with 19 additions and 21 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# encoding: utf-8
# By Elvish_Hunter, April 2014

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python
# encoding: utf8
# encoding: utf-8
#
#

View File

@ -1,4 +1,4 @@
# encoding: utf8
# encoding: utf-8
import time, os, glob, sys, re
from subprocess import Popen

View File

@ -1,5 +1,5 @@
#!/usr/bin/python
#-*- coding: utf-8 -*-
# encoding: utf-8
"""
A script that autogenerates some information about campaigns for the

View File

@ -1,5 +1,5 @@
#!/usr/bin/python
# -*- coding:utf-8 -*-
# encoding: utf-8
"""
A script to create the "Terrain Table" on the TerrainCodeTableWML wiki page.

View File

@ -1,4 +1,4 @@
#encoding: utf8
# encoding: utf-8
import os, gettext, time, copy, sys, re
import traceback

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python
# encoding: utf8
# encoding: utf-8
"""
NOTE: You should use wmlparser2.py instead which uses the C++

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python
# encoding: utf8
# encoding: utf-8
import wmldata, os, glob, sys
import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python
# encoding: utf8
# encoding: utf-8
"""
This parser uses the --preprocess option of wesnoth so a working

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
# encoding: utf8
# encoding: utf-8
"""
This parser uses the --preprocess option of wesnoth so a working

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
# encoding: utf8
# encoding: utf-8
"""
add-on_manager.py -- a command-line client for the Wesnoth add-on server

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# encoding: utf-8
"""\
wmlindent - re-indent WML in a uniform way.

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# encoding: utf-8
#
# wmllint -- check WML for conformance to the most recent dialect
#

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# encoding: utf-8
#
# wmlscope -- generate reports on WML macro and resource usage
#

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
#encoding: utf8
# encoding: utf-8
"""
wmlunits -- tool to output information on all units in HTML

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# encoding: utf-8
# pofix - perform string fixups on incoming .po files.
#
@ -175,7 +175,7 @@ except ImportError:
parallel_map = map
def process_file(path):
before = io.open(path, "r", encoding="utf8").read()
before = io.open(path, "r", encoding="utf-8").read()
decommented = re.sub("#.*", "", before)
lines = before.split('\n')
if website_mode:
@ -209,7 +209,7 @@ def process_file(path):
# Save a backup
os.rename(path, path + "-bak")
# Write out transformed version
ofp = io.open(path, "w", encoding="utf8")
ofp = io.open(path, "w", encoding="utf-8")
ofp.write(after)
ofp.close()
return 1

View File

@ -1,7 +1,5 @@
#!/usr/bin/env python3
# encoding: utf8
# encoding: utf-8
#
# wmlxgettext -- generate a blank .po file for official campaigns translations
# (build tool for wesnoth core)