The Wayback Machine - https://web.archive.org/web/20210117181320/https://github.com/python/python-docs-es/pull/1059
Skip to content
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

Agregar script para crear dict.txt #1059

Merged
merged 4 commits into from Dec 3, 2020
Merged

Conversation

@cmaureir
Copy link
Collaborator

@cmaureir cmaureir commented Oct 11, 2020

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

cmaureir added 2 commits Oct 11, 2020
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

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

scripts/create_dict.py Outdated Show resolved Hide resolved
scripts/create_dict.py Outdated Show resolved Hide resolved
@cmaureir
Copy link
Collaborator Author

@cmaureir cmaureir commented Oct 11, 2020

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 <[email protected]>
@cmaureir cmaureir marked this pull request as draft Oct 11, 2020
@cmaureir
Copy link
Collaborator Author

@cmaureir cmaureir commented Oct 11, 2020

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

@cmaureir cmaureir marked this pull request as ready for review Oct 31, 2020
Copy link
Contributor

@Bgeninatti Bgeninatti left a comment

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

This comment has been minimized.

@Bgeninatti

Bgeninatti Nov 21, 2020
Contributor

Que te parece hacerlo case insensitive?
y hacer

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

This comment has been minimized.

@cmaureir

cmaureir Nov 21, 2020
Author Collaborator

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

Me parece que está perfecto 👍

@eamanu
eamanu approved these changes Nov 30, 2020
@cmaureir
Copy link
Collaborator Author

@cmaureir 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
2 checks passed
2 checks passed
Travis CI - Pull Request Build Passed
Details
docs/readthedocs.org:python-docs-es Read the Docs build succeeded!
Details
@cmaureir cmaureir deleted the cmaureir:create_auto_dict branch Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.