{"id":17662713,"url":"https://github.com/naereen/assistant-traduction-cranialinsertion-en-python","last_synced_at":"2025-03-30T11:41:21.438Z","repository":{"id":242916026,"uuid":"810926509","full_name":"Naereen/Assistant-traduction-CranialInsertion-en-Python","owner":"Naereen","description":"Aider à la traduction des articles sur \u003chttps://www.cranial-insertion.com/\u003e, que l'on doit chaque weekend traduire de l'anglais américain vers le français.","archived":false,"fork":false,"pushed_at":"2024-06-05T16:22:42.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T08:11:29.987Z","etag":null,"topics":["beautifulsoup4","cranial-insertion","python","python-tool","requests-python","translation"],"latest_commit_sha":null,"homepage":"https://www.cranial-insertion.com/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Naereen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-05T15:59:08.000Z","updated_at":"2024-06-05T16:22:45.000Z","dependencies_parsed_at":"2024-06-05T18:28:31.819Z","dependency_job_id":"3c800e19-9397-4e8b-ab0e-17868d3d1274","html_url":"https://github.com/Naereen/Assistant-traduction-CranialInsertion-en-Python","commit_stats":null,"previous_names":["naereen/assistant-traduction-cranialinsertion-en-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naereen%2FAssistant-traduction-CranialInsertion-en-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naereen%2FAssistant-traduction-CranialInsertion-en-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naereen%2FAssistant-traduction-CranialInsertion-en-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naereen%2FAssistant-traduction-CranialInsertion-en-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Naereen","download_url":"https://codeload.github.com/Naereen/Assistant-traduction-CranialInsertion-en-Python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314127,"owners_count":20757457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beautifulsoup4","cranial-insertion","python","python-tool","requests-python","translation"],"created_at":"2024-10-23T18:23:24.328Z","updated_at":"2025-03-30T11:41:21.419Z","avatar_url":"https://github.com/Naereen.png","language":"Jupyter Notebook","readme":"# Assistant à la traduction de Cranial-Insertion (en Python)\n\u003e Encore un projet amusant et pas très utile, mais cela me fera réviser des vieilles compétences !\n\u003e En web scrapping, en utilisation d'API web avec une surcouche Python, etc.\n\n## Objectifs\n\nAider à la traduction des articles sur \u003chttps://www.cranial-insertion.com/\u003e, que l'on doit chaque weekend traduire de l'anglais américain vers le français.\n\n## Choses à faire\n\nIdéalement, je cherche à automatiser autant que possible, mais je vais commencer modestement :\n\n- [ ] Idéalement : automatiser tout ce qui serait possible d'être automatisés...\n- [x] Première étape : je veux un script qui utilise mes cookies de connexion pour automatiquement aller chercher le texte (fichier `.md`) du dernier article en anglais (depuis \u003chttps://www.cranial-insertion.com/staff/articles\u003e) et le sauvegarde dans `articles/english/NUMERO.md` (eg. [`articles/english/4238.md`](articles/english/4238.md)). En plus, cet identifiant est sauvegardé [ici (`id_article.txt`)](id_article.txt) ;\n\n```bash\n$ make import-the-latest-article\n./venv/bin/jupyter execute import-the-latest-article.ipynb\n[NbClientApp] Executing import-the-latest-article.ipynb\n[NbClientApp] Executing notebook with kernel: python3\necho id_article.txt\nid_article.txt\ncat id_article.txt\n4238\n```\n\n- [x] Deuxième étape : je veux un script qui remplace les morceaux citant des cartes, par leur nom de cartes en français (avec [Scrython](https://github.com/NandaScott/Scrython) probablement, ou un accès web manuel à [Magic Ville](https://www.magic-ville.com/fr/) ou [Scryfall](https://scryfall.com/)). Par exemple je veux remplacer :\n\n```markdown\n[q]If there's a [c]Collector Ouphe[/c] in play, can I still tap [c]Talisman of Creativity[/c] for mana?[/q]\n\n==\u003e\n\n[q]If there's a [c=Collector Ouphe]Orphe collectionneur[/c] in play, can I still tap [c=Talisman of Creativity]Talisman de créativité[/c] for mana?[/q]\n```\n\n```bash\n$ make translate-card-names\n./venv/bin/jupyter execute translate-card-names.ipynb\n[NbClientApp] Executing translate-card-names.ipynb\n[NbClientApp] Executing notebook with kernel: python3\nls -larth articles/english/* | tail -n1\n-rw-rw-r-- 1 lilian lilian 13K juin   5 18:20 articles/english/4238.md\nls -larth articles/francais/* | tail -n1\n-rw-rw-r-- 1 lilian lilian 13K juin   5 18:21 articles/francais/4238.md\n```\n\n- [ ] Troisième étape : je rêve d'un script qui traduise tout seul le document pré-modifié. Cela semble difficile, ou plutôt, pas très malin : cette traduction automatique ne sera forcément pas  parfaite,, et il faudra donc y revenir. Autant juste avoir une base en anglais, avec les trucs pénibles déjà traduits (cf. étape précédente), et la traduire plus manuellement avec \u003chttps://DeepL.com/\u003e, question par question, en éditant ce qu'il faut. Si besoin, DeepL a une API en Python, gratuite à 500 000 mots par mois, avec [ce module `deepl`](https://pypi.org/project/deepl/).\n\n----\n\n## Tests à faire\n\n- [ ] Prendre des anciens articles, et vérifier manuellement la qualité de la traduction proposée à la fin par mon outil ;\n- [ ] Chaque semaine, m'occuper de mettre à jour le *Google doc* partagé (privé) que l'on utilise pour synchroniser nos traductions, en prémâchant le plus de boulot !\n\n## Autres idées\n\n- [ ] Raffiner l'entraînement d'un LLM spécialement conçu pour la traduction English US -\u003e Français, sur le corpus de texte (de toutes les questions) de tous les articles Cranial déjà rédigés et traduits ;\n- [ ] Écrire une extension Google Chrome qui fasse ce boulot ? Ce serait chiant car il faudrait l'écrire en JavaScript et j'y connais rien aux API permettant d'écrire des extensions de navigateur.\n- [ ] Écrire un bot en PHP qui puisse s'ajouter au site Cranial-Insertion pour faire ce boulot ? Idem, j'ai jamais fait de PHP...\n\n----\n\n## :scroll: License ? [![GitHub license](https://img.shields.io/github/license/Naereen/Assistant-traduction-CranialInsertion-en-Python.svg)](https://github.com/Naereen/Assistant-traduction-CranialInsertion-en-Python/blob/master/LICENSE)\n[MIT Licensed](https://lbesson.mit-license.org/) (file [LICENSE](LICENSE)).\n© [Lilian Besson](https://GitHub.com/Naereen), 2024.\n\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/Assistant-traduction-CranialInsertion-en-Python/graphs/commit-activity)\n[![Ask Me Anything !](https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg)](https://GitHub.com/Naereen/ama)\n[![ForTheBadge built-with-swag](http://ForTheBadge.com/images/badges/built-with-swag.svg)](https://GitHub.com/Naereen)\n[![ForTheBadge uses-badges](http://ForTheBadge.com/images/badges/uses-badges.svg)](http://ForTheBadge.com)\n[![ForTheBadge uses-git](http://ForTheBadge.com/images/badges/uses-git.svg)](https://GitHub.com/)\n[![Awesome Badges](https://img.shields.io/badge/badges-awesome-green.svg)](https://github.com/Naereen/badges)\n[![ForTheBadge 20-30](http://ForTheBadge.com/images/badges/ages-20-30.svg)](http://ForTheBadge.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaereen%2Fassistant-traduction-cranialinsertion-en-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaereen%2Fassistant-traduction-cranialinsertion-en-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaereen%2Fassistant-traduction-cranialinsertion-en-python/lists"}