Changeset - 6bde1c0a04d4
[Not reviewed]
default
0 1 0
Mads Kiilerich (mads) - 5 years ago 2020-10-20 00:48:55
mads@kiilerich.com
Grafted from: 88f8574da28b
py3: drop stray __future__ import
1 file changed with 0 insertions and 2 deletions:
0 comments (0 inline, 0 general)
scripts/i18n_utils.py
Show inline comments
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 

	
 
from __future__ import print_function
 

	
 
import os
 
import re
 
import shutil
 
import subprocess
 
import tempfile
 

	
 

	
 
do_debug = False  # set from scripts/i18n --debug
 

	
 
def debug(*args, **kwargs):
 
    if do_debug:
 
        print(*args, **kwargs)
 

	
 
def runcmd(cmd, *args, **kwargs):
 
    debug('... Executing command: %s' % ' '.join(cmd))
 
    subprocess.check_call(cmd, *args, **kwargs)
 

	
 
header_comment_strip_re = re.compile(r'''
 
    ^
 
    [#][ ]Translations[ ]template[ ]for[ ]Kallithea[.] \n
 
    |
 
    ^
 
    [#][ ]FIRST[ ]AUTHOR[ ]<EMAIL@ADDRESS>,[ ]\d+[.] \n
 
    (?:[#] \n)?
0 comments (0 inline, 0 general)