From 847365f7eea1be1cf019cbb09a8ca0c2456f25d1 Mon Sep 17 00:00:00 2001 From: KhwajaYousuf <135570643+KhwajaYousuf@users.noreply.github.com> Date: Sat, 13 Jan 2024 01:19:20 -0500 Subject: [PATCH] Enhance sorting functionality in asort.py (#772) --- auto_sort/asort_es-ES.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/auto_sort/asort_es-ES.py b/auto_sort/asort_es-ES.py index fa1634b..2a6d583 100644 --- a/auto_sort/asort_es-ES.py +++ b/auto_sort/asort_es-ES.py @@ -5,8 +5,8 @@ # GitHub: https://www.github.com/chrisleegit # File: asort.py # Date: 2016/08/22 11:12 -# Version: 0.1 -# Description: A very simple python script that can sort items alphabetically. +# Version: 0.2 +# Description: A python script to sort items alphabetically. import os import shutil @@ -37,7 +37,7 @@ def main(): print(f'Cargando archivo: {README_FILE}') # Read the file: README.md - with (open(README_FILE, 'r') as infile, open(TEMP_FILE, 'w') as outfile): + with open(README_FILE, 'r') as infile, open(TEMP_FILE, 'w') as outfile: # Process each line for line in infile: if not sort_enable and BEGIN in line: @@ -65,9 +65,9 @@ def main(): print(line, end='', file=outfile) else: print(line, end='', file=outfile) + print('Reemplazar el archivo original: README_es-ES.md') shutil.move(TEMP_FILE, README_FILE) - if __name__ == '__main__': main()