Various data updates

This commit is contained in:
2024-07-12 23:35:14 +09:00
parent 4ad609c759
commit e783b3f6b1
18 changed files with 201 additions and 1441 deletions
+54
View File
@@ -0,0 +1,54 @@
#!/usr/bin/env python3
"""
Author: Clemens Schwaighofer
Date: 2023/9/6
Description: download pgn files from pgnmentor.com
"""
# MARK:TOP
import requests
import configparser
class Config:
"""
folder locations and settings
"""
def __init__(self):
self.base_folder: str = ""
self.temp: str = "temp"
self.data: str = "data"
self.download: str = "download"
self.last_download: str = "last_download.txt"
self.last_update: str = "last_update.txt"
self.url_base_file: str = "https://www.pgnmentor.com/files.html"
self.download_target_file: str = "[download][curent_date]/msater/files.html"
self.download_target_pgn: str = "[download][current_date]/pgn/"
class Init:
"""
init on run
- donwload file to temp
- check update diff
- run download and diff flow
"""
def __init__(self, config: Config):
self.conf = config
def main():
conf = Config()
print(f"BASE: {conf.base_folder}")
main()
# __END__