-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
[FR] Retrieve all italic templates #200
Comments
It seems all these templates (instruments à cordes, divinités...) could be imported from https://fr.wiktionary.org/wiki/Cat%C3%A9gorie:Mod%C3%A8les_de_domaine_d%E2%80%99utilisation no ? |
You are right. I was too lazy to do that at the time. Maybe a simple Python scrapper would work? The thing is that (it seems to me) we need to click on each and every word to get the real "them" to use. This can be done one-time and we would keep the code in the Wiki for later needs, WDYT? |
:) See https://gist.github.com/lasconic/391f19dffac8605b6f5fa4c7a3c40d96 for the scraper code and the result... What do you want to do with it ? |
💪 As there is scraping, I would love to see that object moved to its own file, like done with ebook-reader-dict/scripts/lang/fr/__init__.py Line 192 in ad48993
As done with Also, no need for the |
The original dict contains more than just ones from the new list. So you should move the result of the scraping into its own file and do something like that in templates_italic = {
**basic_italic_templates, # or whatever fitting your mind
"abréviation": "Abréviation",
# ...
} |
Unfortunately, this last bit doesn't always work. |
For the moment, I made a special case for "divinités". See PR #206 |
The way you handled "divinités" is the right one ;) I will review your PR tomorrow 👍 |
The gist is updated : https://gist.github.com/lasconic/391f19dffac8605b6f5fa4c7a3c40d96 |
Wikicode:
Output:
Expected:
The text was updated successfully, but these errors were encountered: