{"id":20040805,"url":"https://github.com/vadimkantorov/natudump","last_synced_at":"2025-09-15T14:45:25.110Z","repository":{"id":61640500,"uuid":"534241441","full_name":"vadimkantorov/natudump","owner":"vadimkantorov","description":"Scraping LegiFrance naturalisation decrees for fun and OSINT profit","archived":false,"fork":false,"pushed_at":"2023-05-27T21:09:42.000Z","size":59,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T19:47:31.390Z","etag":null,"topics":["legifrance","osint","python","selenium"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vadimkantorov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-09-08T14:08:08.000Z","updated_at":"2025-01-09T04:00:42.000Z","dependencies_parsed_at":"2024-11-13T10:44:08.705Z","dependency_job_id":"a630dfef-ba36-4f12-b255-2937b5133a07","html_url":"https://github.com/vadimkantorov/natudump","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vadimkantorov%2Fnatudump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vadimkantorov%2Fnatudump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vadimkantorov%2Fnatudump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vadimkantorov%2Fnatudump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vadimkantorov","download_url":"https://codeload.github.com/vadimkantorov/natudump/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252466727,"owners_count":21752423,"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":["legifrance","osint","python","selenium"],"created_at":"2024-11-13T10:43:59.064Z","updated_at":"2025-05-05T08:32:05.340Z","avatar_url":"https://github.com/vadimkantorov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is example of scraping public LegiFrance registry's naturalisation decrees for research purposes only (`naturalisation par mariage` is not included in these decrees). Code license is MIT.\n\n```shell\npip install selenium charset_normalizer\n\nmkdir -p jo\n# python3 natudump.py -o jo --years $(seq 2000 2021) --output-directory-prefix \"$(wslpath -a -w \"$PWD\")\\\\\" # for WSL systems, must be on a NTFS drive\npython3 natudump.py   -o jo --years $(seq 2000 2021) --output-directory-prefix \"$PWD/\"\nls jo | wc -l\n\nmkdir -p txtjo\n# https://github.com/pdfminer/pdfminer.six/issues/809\ngit clone --branch 20220524 --depth 1 https://github.com/pdfminer/pdfminer.six\nPYTHONPATH=\"pdfminer.six:pdfminer.six/tools:$PYTHONPATH\" find jo -name '*.pdf' -exec python3 -m pdf2txt {} -o txt{}.txt \\;\nls txtjo | wc -l\n\npython3 tabulate.py -i txtjo -o natufrance_2000_2021.tsv\ngrep 'Russie\\|URSS\\|U.R.S.S' natufrance_2000_2021.tsv | wc -l\n\nmkdir -p catjo\ngit clone --branch v0.4 --depth 1 https://github.com/pmaupin/pdfrw\nrm $(PYTHONPATH=\"$PWD/pdfrw:$PYTHONPATH\" find jo/ -type f -not -exec python3 -c 'import sys, pdfrw; pdfrw.PdfReader(sys.argv[1])' {} \\; -print)\nfor years in $(seq 2000 2021); do PYTHONPATH=\"$PWD/pdfrw:$PYTHONPATH\" python3 pdfrw/examples/cat.py jo/JORF_${years}*; mv cat.JORF_${years}*.pdf catjo; done\nls catjo | wc -l\n\nmkdir -p tarjo\nfor years in $(seq 2000 2021); do tar -cf tarjo/jo${years}.tar jo/*_${years}*; done\nls tarjo | wc -l\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvadimkantorov%2Fnatudump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvadimkantorov%2Fnatudump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvadimkantorov%2Fnatudump/lists"}