summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Copeland <ben.copeland@linaro.org>2020-10-06 14:17:03 +0100
committerBenjamin Copeland <ben.copeland@linaro.org>2020-10-06 14:17:03 +0100
commit35619153208faefc6f25245f7a769139d4294964 (patch)
tree8c7383f833424c78fb30f442a3897933906c9a6c
parent44303dd16ce6c8cc102e405d356909df4253f4ac (diff)
Mbox: add script to process import_mbox
This is a simple script to run against import_mbox. Currently we are only running against lore.kernel.org (Kernel repos). Change-Id: I40dfe26d00f7b3f6e4b4dea4b47fcb2c0b2e06a8
-rw-r--r--generate_mbox.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/generate_mbox.py b/generate_mbox.py
new file mode 100644
index 0000000..cdab936
--- /dev/null
+++ b/generate_mbox.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+""" A script to generate a projects.json file from Patchworks.
+
+ This script should be run with the following exports:
+ export PYTHONPATH=$PYTHONPATH:../project:/srv/linaro-git-tools
+ export DJANGO_SETTINGS_MODULE=local_settings
+"""
+
+import django
+import subprocess
+from patchwork.models import Project
+import git
+
+django.setup()
+
+for proj in Project.objects.all():
+ if "kernel.org" in proj.listemail or "alsa-devel" in proj.name:
+ subprocess.call(
+ [
+ "/srv/patches.linaro.org/tools/import_mbox.py",
+ "--mbox_repo",
+ proj.linkname,
+ "--log",
+ "INFO",
+ "--days",
+ "1",
+ ]
+ )