summary refs log tree commit diff stats
path: root/mailinglist/downloader.py
diff options
context:
space:
mode:
Diffstat (limited to 'mailinglist/downloader.py')
-rwxr-xr-xmailinglist/downloader.py21
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()