mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-15 17:25:32 +00:00
Python scripts: Unify encoding magic comments
This commit is contained in:
parent
e1021b0ff6
commit
809e61db88
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# encoding: utf-8
|
||||
|
||||
# By Elvish_Hunter, April 2014
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
# encoding: utf8
|
||||
# encoding: utf-8
|
||||
#
|
||||
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# encoding: utf8
|
||||
# encoding: utf-8
|
||||
import time, os, glob, sys, re
|
||||
from subprocess import Popen
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/python
|
||||
#-*- coding: utf-8 -*-
|
||||
# encoding: utf-8
|
||||
|
||||
"""
|
||||
A script that autogenerates some information about campaigns for the
|
||||
|
@ -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.
|
||||
|
@ -1,4 +1,4 @@
|
||||
#encoding: utf8
|
||||
# encoding: utf-8
|
||||
|
||||
import os, gettext, time, copy, sys, re
|
||||
import traceback
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
# encoding: utf8
|
||||
# encoding: utf-8
|
||||
|
||||
"""
|
||||
NOTE: You should use wmlparser2.py instead which uses the C++
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
# encoding: utf8
|
||||
# encoding: utf-8
|
||||
import wmldata, os, glob, sys
|
||||
import re
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
# encoding: utf8
|
||||
# encoding: utf-8
|
||||
|
||||
"""
|
||||
This parser uses the --preprocess option of wesnoth so a working
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# encoding: utf8
|
||||
# encoding: utf-8
|
||||
|
||||
"""
|
||||
This parser uses the --preprocess option of wesnoth so a working
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# encoding: utf-8
|
||||
"""\
|
||||
wmlindent - re-indent WML in a uniform way.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# encoding: utf-8
|
||||
#
|
||||
# wmllint -- check WML for conformance to the most recent dialect
|
||||
#
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# encoding: utf-8
|
||||
#
|
||||
# wmlscope -- generate reports on WML macro and resource usage
|
||||
#
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
#encoding: utf8
|
||||
# encoding: utf-8
|
||||
"""
|
||||
wmlunits -- tool to output information on all units in HTML
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user