Skip to content

Agregar script para crear dict.txt#1059

Merged
cmaureir merged 4 commits intopython:3.8from
cmaureir:create_auto_dict
Dec 3, 2020
Merged

Agregar script para crear dict.txt#1059
cmaureir merged 4 commits intopython:3.8from
cmaureir:create_auto_dict

Conversation

@cmaureir
Copy link
Copy Markdown
Collaborator

Usuarios en Windows, que no utilizan Git bash no pueden generar el
archivo dict.txt, pues no tienen acceso al comando 'awk'.
Si bien, la construcción de toda la documentación no es necesaria,
este paso es importante incluso cuando se quiere hacer la verificación
pospell a un archivo determinado, pues necesitamos el diccionario
general que incluye todas las variaciones de 'dictionaries/'
y 'dict'.

Usuarios en Windows, que no utilizan Git bash no pueden generar el
archivo `dict.txt`, pues no tienen acceso al comando 'awk'.
Si bien, la construcción de toda la documentación no es necesaria,
este paso es importante incluso cuando se quiere hacer la verificación
pospell a un archivo determinado, pues necesitamos el diccionario
general que incluye todas las variaciones de 'dictionaries/'
y 'dict'.
Copy link
Copy Markdown
Contributor

@mondeja mondeja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¿Qué te parecen estos pequeños cambios en el script?

@cmaureir
Copy link
Copy Markdown
Collaborator Author

En realidad deberíamos usar pathlib, pero como quería hacer algo simple, usé os.
glob está bastante en desuso, con lo que por tus sugerencias, voy a subir una nueva versión con pathlib,
gracias.

Co-authored-by: Álvaro Mondéjar <mondejar1994@gmail.com>
@cmaureir cmaureir marked this pull request as draft October 11, 2020 19:37
@cmaureir
Copy link
Copy Markdown
Collaborator Author

Tengo que testear en Windows y macOS y lo convierto a 'ready for review'

@cmaureir cmaureir added the hacktoberfest-accepted mantainer-approved contribution to hacktoberfest label Oct 31, 2020
@cmaureir cmaureir marked this pull request as ready for review October 31, 2020 23:19
Copy link
Copy Markdown

@Bgeninatti Bgeninatti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmaureir

No soy muy entendido sobre la parte de Travis, pero hice un comentario sobre el script de python.

Gracias por el aporte!

# Read custom dictionaries
for filename in Path("dictionaries").glob("*.txt"):
with open(filename, "r") as f:
lines = [i.rstrip() for i in f.readlines()]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Que te parece hacerlo case insensitive?
y hacer

lines = [i.rstrip().lower() for i in f.readlines()]

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lo habíamos discutido antes de implementar lo de dictionaries/ pero al final el tema fue que si algo decía por ejemplo la the PythonClassImportantBla y alguien lo deja como la pythonclassimportantbla no iba a dejar un error, entonces lo mismo ocurre cuando algo que comienza despues de un punto o un párrafo.

Copy link
Copy Markdown
Contributor

@mondeja mondeja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me parece que está perfecto 👍

@cmaureir
Copy link
Copy Markdown
Collaborator Author

cmaureir commented Dec 3, 2020

Gracias por sus approvals @mondeja @eamanu, hacemos el merge entonces :)

@cmaureir cmaureir merged commit fa0d4fe into python:3.8 Dec 3, 2020
@cmaureir cmaureir deleted the create_auto_dict branch December 3, 2020 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted mantainer-approved contribution to hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants