Skip to content

Agregar script para crear dict.txt #1059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 3, 2020
Merged

Conversation

cmaureir
Copy link
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
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
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
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

@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()]

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
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
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
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