The tool will download the latest PDF from 新型コロナウイルス感染症患者・無症状病原体保有者の発生について and convert it to a csv file.
Because of the extracted data relies on the PDF format, this parser may miss some data from the PDF document due to incomplete table border. Please check the raw data before implement to your project.
There is a output report for a reference
./data/report.txt
$ pip install requests BeautifulSoup4 pdfplumber pandas pypdf2 fpdf2
$ python3 auto_dl_process.py
[output] ./pdf/processed_latest.pdf
$ python3 auto_parser.py
[output]
./data/auto_output.csv
./data/auto_summary.csv
./data/report.txt
$ python3 parser.py [path/to/file.pdf]
./data/auto_output.csv
./data/auto_summary.csv
./data/manual_output.csv
├── archive (old dev code)
├── data
│ ├── auto_output.csv (created hourly from auto_parser.py)
│ ├── auto_summary.csv (created hourly from auto_parser.py)
│ ├── manual_ouput.csv (created from parser.py)
│ └── report.txt
└── pdf
├── 68_1308.pdf
├── 67_1243.pdf
└── [...].pdf