ogajduse / rpms / texlive

Forked from rpms/texlive 5 years ago
Clone
9629944
diff -up doc/xelatex/xepersian/dkun-0.3.py.than doc/xelatex/xepersian/dkun-0.3.py
9629944
--- doc/xelatex/xepersian/dkun-0.3.py.than	2018-05-07 11:52:01.795308478 +0200
9629944
+++ doc/xelatex/xepersian/dkun-0.3.py	2018-05-07 11:53:32.984620222 +0200
9629944
@@ -1,4 +1,4 @@
9629944
-#! /usr/bin/env python
9629944
+#! /usr/bin/python
9629944
 
9629944
 #########################################
9629944
 #	General Public License          #
9629944
@@ -311,7 +311,7 @@ def dk_adjust_shaping(text, i):
9629944
 	try:
9629944
 		u = table_DK_UN[current][0]
9629944
 	except KeyError:
9629944
-		print 'ERROR: unmapped character'
9629944
+		print('ERROR: unmapped character')
9629944
 		return u''
9629944
 
9629944
 	#if you don't want shaping remove the following comment
9629944
@@ -407,7 +407,7 @@ def needs_english_wrapper(part):
9629944
 
9629944
 # Main body of the program 
9629944
 if len(sys.argv) <= 2:
9629944
-	print 'usage: python dkun in_filename out_filename'
9629944
+	print('usage: python dkun in_filename out_filename')
9629944
 	exit(0)
9629944
 
9629944
 filename = sys.argv[1]
9629944
@@ -416,13 +416,13 @@ outfile = sys.argv[2]
9629944
 try:
9629944
 	f = open(filename, 'r')
9629944
 except IOError:
9629944
-	print "Can not open the input file: " + filename
9629944
+	print("Can not open the input file: " + filename)
9629944
 	exit(0)
9629944
 
9629944
 try:
9629944
 	of = codecs.open(outfile, encoding='utf-8', mode='w')
9629944
 except IOError:
9629944
-	print "Can not open the output file: " + outfile
9629944
+	print("Can not open the output file: " + outfile)
9629944
 	exit(0)
9629944
 
9629944
 line_number = 0
9629944
diff -up doc/xelatex/xepersian/dkun-0.4.py.than doc/xelatex/xepersian/dkun-0.4.py
9629944
--- doc/xelatex/xepersian/dkun-0.4.py.than	2018-05-07 11:53:54.187692708 +0200
9629944
+++ doc/xelatex/xepersian/dkun-0.4.py	2018-05-07 11:54:32.272822907 +0200
9629944
@@ -1,4 +1,4 @@
9629944
-#! /usr/bin/env python
9629944
+#! /usr/bin/python
9629944
 
9629944
 #########################################
9629944
 #	General Public License          #
9629944
@@ -311,7 +311,7 @@ def dk_adjust_shaping(text, i):
9629944
 	try:
9629944
 		u = table_DK_UN[current][0]
9629944
 	except KeyError:
9629944
-		print 'ERROR: unmapped character'
9629944
+		print('ERROR: unmapped character')
9629944
 		return u''
9629944
 
9629944
 	#if you don't want shaping remove the following comment
9629944
@@ -407,7 +407,7 @@ def needs_english_wrapper(part):
9629944
 
9629944
 # Main body of the program 
9629944
 if len(sys.argv) <= 2:
9629944
-	print 'usage: python dkun in_filename out_filename'
9629944
+	print('usage: python dkun in_filename out_filename')
9629944
 	exit(0)
9629944
 
9629944
 filename = sys.argv[1]
9629944
@@ -416,13 +416,13 @@ outfile = sys.argv[2]
9629944
 try:
9629944
 	f = open(filename, 'r')
9629944
 except IOError:
9629944
-	print "Can not open the input file: " + filename
9629944
+	print("Can not open the input file: " + filename)
9629944
 	exit(0)
9629944
 
9629944
 try:
9629944
 	of = codecs.open(outfile, encoding='utf-8', mode='w')
9629944
 except IOError:
9629944
-	print "Can not open the output file: " + outfile
9629944
+	print("Can not open the output file: " + outfile)
9629944
 	exit(0)
9629944
 
9629944
 line_number = 0
9629944
diff -up doc/xelatex/xepersian/ftxe-0.12.py.than doc/xelatex/xepersian/ftxe-0.12.py
9629944
--- doc/xelatex/xepersian/ftxe-0.12.py.than	2018-05-07 11:54:55.163901164 +0200
9629944
+++ doc/xelatex/xepersian/ftxe-0.12.py	2018-05-07 11:57:58.063526433 +0200
9629944
@@ -1,4 +1,6 @@
9629944
-#  This program is free software: you can redistribute it and/or modify
9629944
+#! /usr/bin/python
9629944
+
9629944
+#  This program is free software: you can redistribute it and/or modify
9629944
 #  it under the terms of the GNU General Public License as published by
9629944
 #  the Free Software Foundation, either version 3 of the License, or
9629944
 #  (at your option) any later version.
9629944
@@ -488,7 +490,7 @@ def read_size(input,index,last_index):
9629944
 			dim_index = pt_index
9629944
 	next_cmd = input.find(u'\\', index)
9629944
 	if (next_cmd == -1 and dim_index == -1):
9629944
-		print "Error in parsing \epsfxsize command at " + str(line_number) + "\n"
9629944
+		print("Error in parsing \epsfxsize command at " + str(line_number) + "\n")
9629944
 		return -1
9629944
 	elif (next_cmd == -1 or (dim_index != -1 and next_cmd > dim_index)):
9629944
 		epsfxsize = input[index:dim_index+2]
9629944
@@ -499,7 +501,7 @@ def read_size(input,index,last_index):
9629944
 			end_cmd += 1
9629944
 		return end_cmd
9629944
 	else:
9629944
-		print "Error in parsing \epsfxsize command at " + str(line_number) + "\n"
9629944
+		print("Error in parsing \epsfxsize command at " + str(line_number) + "\n")
9629944
 		return -1
9629944
 
9629944
 
9629944
@@ -567,7 +569,7 @@ def generate_farsitex_cmds_file(helper_f
9629944
 	try:
9629944
 		of = codecs.open(helper_filename, encoding='utf-8', mode='w')
9629944
 	except IOError:
9629944
-		print "Can not open the output file: " + helper_filename
9629944
+		print("Can not open the output file: " + helper_filename)
9629944
 		exit(0)
9629944
 	of.write(preamble)
9629944
 	of.close
9629944
@@ -875,7 +877,7 @@ def convert_file(f, of, convert_cmds):
9629944
 
9629944
 	for line in f:
9629944
 		line_number += 1
9629944
-		print line_number,
9629944
+		print (line_number)
9629944
 		output_line = u''
9629944
 		line_len = len(line)
9629944
 		
9629944
@@ -888,7 +890,7 @@ def convert_file(f, of, convert_cmds):
9629944
 		# check line-direction character
9629944
 		line_direction_rtl = (line[0] == '<')
9629944
 		if (line[0] != '>') and (line[0] != '<'):
9629944
-			print "FORMAT ERROR AT LINE: " + str(line_number)
9629944
+			print("FORMAT ERROR AT LINE: " + str(line_number))
9629944
 			exit(0)
9629944
 	
9629944
 		i = 1
9629944
@@ -970,11 +972,11 @@ def convert_file(f, of, convert_cmds):
9629944
 	# end of file processing
9629944
 
9629944
 def print_usage():
9629944
-	print 'usage: python ftxe-0-11 [-r] [-s] [-x] [-u] in_filename1 in_filename2'
9629944
-	print '-r: (DEFAULT) recursively consider files included in the given files'
9629944
-	print '-s: do not recursively consider files'
9629944
-	print '-x: (DEFAULT) insert xepersian related commands'
9629944
-	print '-u: only convert to unicode'
9629944
+	print('usage: python ftxe-0-11 [-r] [-s] [-x] [-u] in_filename1 in_filename2')
9629944
+	print('-r: (DEFAULT) recursively consider files included in the given files')
9629944
+	print('-s: do not recursively consider files')
9629944
+	print('-x: (DEFAULT) insert xepersian related commands')
9629944
+	print('-u: only convert to unicode')
9629944
 
9629944
 ###################################
9629944
 # Begin of main body of the program
9629944
@@ -1011,7 +1013,7 @@ while (options_index < len(sys.argv)):
9629944
 	options_index += 1
9629944
 
9629944
 if (len(filenames) == 0):
9629944
-	print 'error: no input filename is specified!'
9629944
+	print('error: no input filename is specified!')
9629944
 	print_usage()
9629944
 	exit(0)
9629944
 	
9629944
@@ -1026,17 +1028,17 @@ while (index < len(filenames)):
9629944
 	else: 
9629944
 		outfile = filename + '.tex'
9629944
 
9629944
-	print '\n\nConverting "' + filename + '" into "' + outfile + '"'
9629944
+	print('\n\nConverting "' + filename + '" into "' + outfile + '"')
9629944
 	try:
9629944
 		f = open(filename, 'r')
9629944
 	except IOError:
9629944
-		print "Can not open the input file: " + filename
9629944
+		print("Can not open the input file: " + filename)
9629944
 		exit(0)
9629944
 
9629944
 	try:
9629944
 		of = codecs.open(outfile, encoding='utf-8', mode='w')
9629944
 	except IOError:
9629944
-		print "Can not open the output file: " + outfile
9629944
+		print("Can not open the output file: " + outfile)
9629944
 		exit(0)
9629944
 
9629944
 	convert_file(f, of, convert_xepersian)
9629944
diff -up doc/xelatex/xepersian/undk-0.6.py.than doc/xelatex/xepersian/undk-0.6.py
9629944
--- doc/xelatex/xepersian/undk-0.6.py.than	2018-05-07 11:58:18.706597005 +0200
9629944
+++ doc/xelatex/xepersian/undk-0.6.py	2018-05-07 11:59:18.079799981 +0200
9629944
@@ -1,4 +1,4 @@
9629944
-#! /usr/bin/env python
9629944
+#! /usr/bin/python
9629944
 #########################################
9629944
 #	General Public License          #
9629944
 #	Author:	Mostafa Vahedi          #
9629944
@@ -328,7 +328,7 @@ def find_form(line, i):
9629944
 def map_char_unicode_DK(c, form):
9629944
 	try:
9629944
 		n = table_UN_DK[c][0]
9629944
-        except KeyError:
9629944
+	except KeyError:
9629944
 		return c.encode('latin-1')
9629944
 	if (n == 1):
9629944
 		return table_UN_DK[c][1]
9629944
@@ -371,7 +371,7 @@ def is_farsi_numerical(c):
9629944
 
9629944
 # Main body of the program 
9629944
 if len(sys.argv) <= 2:
9629944
-	print 'usage: python undk in_filename out_filename'
9629944
+	print('usage: python undk in_filename out_filename')
9629944
 	exit(0)
9629944
 
9629944
 filename = sys.argv[1]
9629944
@@ -380,13 +380,13 @@ outfile = sys.argv[2]
9629944
 try:
9629944
 	f = codecs.open(filename, 'r', 'utf-8')
9629944
 except IOError:
9629944
-	print "Can not open the input file: " + filename
9629944
+	print("Can not open the input file: " + filename)
9629944
 	exit(0)
9629944
 
9629944
 try:
9629944
 	of = open(outfile, 'w')
9629944
 except IOError:
9629944
-	print "Can not open the output file: " + outfile
9629944
+	print("Can not open the output file: " + outfile)
9629944
 	exit(0)
9629944
 
9629944
 # this is an option
9629944
@@ -425,7 +425,7 @@ for line in f:
9629944
 					this_line += auto_english_part[::-1]
9629944
 					auto_english_part = ''
9629944
 					inAutoEnglish = 0
9629944
-					print 'Warning: mixed Auto-English and Forced-English'
9629944
+					print('Warning: mixed Auto-English and Forced-English')
9629944
 				if (inFarsiNumber == 1):
9629944
 					this_line += number_part[::-1]
9629944
 					number_part = ''
9629944
diff -up doc/xelatex/xepersian/unldk-0.2.py.than doc/xelatex/xepersian/unldk-0.2.py
9629944
--- doc/xelatex/xepersian/unldk-0.2.py.than	2018-05-07 11:59:41.522880125 +0200
9629944
+++ doc/xelatex/xepersian/unldk-0.2.py	2018-05-07 12:00:21.999018500 +0200
9629944
@@ -1,4 +1,4 @@
9629944
-#! /usr/bin/env python
9629944
+#! /usr/bin/python
9629944
 #########################################
9629944
 #	General Public License          #
9629944
 #	Author:	Mostafa Vahedi          #
9629944
@@ -328,7 +328,7 @@ def find_form(line, i):
9629944
 def map_char_unicode_DK(c, form):
9629944
 	try:
9629944
 		n = table_UN_DK[c][0]
9629944
-        except KeyError:
9629944
+	except KeyError:
9629944
 		return c.encode('latin-1')
9629944
 	if (n == 1):
9629944
 		return table_UN_DK[c][1]
9629944
@@ -364,7 +364,7 @@ def is_farsi_numerical(c):
9629944
 
9629944
 # Main body of the program 
9629944
 if len(sys.argv) <= 2:
9629944
-	print 'usage: python unldk in_filename out_filename'
9629944
+	print('usage: python unldk in_filename out_filename')
9629944
 	exit(0)
9629944
 
9629944
 filename = sys.argv[1]
9629944
@@ -373,13 +373,13 @@ outfile = sys.argv[2]
9629944
 try:
9629944
 	f = codecs.open(filename, 'r', 'utf-8')
9629944
 except IOError:
9629944
-	print "Can not open the input file: " + filename
9629944
+	print("Can not open the input file: " + filename)
9629944
 	exit(0)
9629944
 
9629944
 try:
9629944
 	of = open(outfile, 'w')
9629944
 except IOError:
9629944
-	print "Can not open the output file: " + outfile
9629944
+	print("Can not open the output file: " + outfile)
9629944
 	exit(0)
9629944
 
9629944
 inFarsi = 0