diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-05-18 16:34:41 +0200 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-05-18 16:34:41 +0200 |
| commit | aaa3306a1b9e440c4adf9e54fcfd204243b54404 (patch) | |
| tree | 927a041f1e3197f0199f7484d9d68adb347b5c04 /mailinglist | |
| parent | a9eb56beab0a66199b6fc7844132d28ba81174fa (diff) | |
| download | qemu-analysis-aaa3306a1b9e440c4adf9e54fcfd204243b54404.tar.gz qemu-analysis-aaa3306a1b9e440c4adf9e54fcfd204243b54404.zip | |
mailinglist: iterate through all months and print url
Diffstat (limited to 'mailinglist')
| -rwxr-xr-x | mailinglist/downloader.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mailinglist/downloader.py b/mailinglist/downloader.py new file mode 100755 index 000000000..214528907 --- /dev/null +++ b/mailinglist/downloader.py @@ -0,0 +1,21 @@ +from datetime import datetime, timedelta + +end_date = datetime(2003, 4, 1) +start_date = datetime.today().replace(day=1) + +def months_iterator(start, end): + current = start + while current >= end: + yield current + if current.month == 1: + current = current.replace(year=current.year - 1, month=12) + else: + current = current.replace(month=current.month - 1) + +def main(): + for month in months_iterator(start = start_date, end = end_date): + url = f"https://lists.nongnu.org/archive/html/qemu-devel/{month.strftime("%Y-%m")}/threads.html" + print(url) + +if __name__ == "__main__": + main() |