Skip to content

Commit cb48cb6

Browse files
committed
Añade nuevo script para ordenar líneas de texto
El ordenamiento se hace usando el colaje de cadenas de texto del locale actual, y sobre stdin, haciendo la herramienta lo más flexible posible. Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
1 parent bbfed35 commit cb48cb6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
pip==21.1
22
Sphinx==3.2.1
33
blurb
4+
PyICU
45
polib
56
pospell>=1.1
67
potodo

scripts/sort.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import sys
2+
3+
import icu
4+
5+
6+
collator = icu.Collator.createInstance(icu.Locale())
7+
sorted_entries = sorted(sys.stdin, key=collator.getSortKey)
8+
print("".join(sorted_entries), end='')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy