Skip to content

Commit

Permalink
Enhance sorting functionality in asort.py (#772)
Browse files Browse the repository at this point in the history
  • Loading branch information
KhwajaYousuf authored Jan 13, 2024
1 parent e5b311d commit 847365f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions auto_sort/asort_es-ES.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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()

0 comments on commit 847365f

Please sign in to comment.