[tools] Starting some basic python scripting to manage the beats table. So far, this only clears beat conten

Pete Travis immanetize at fedoraproject.org
Fri Feb 28 06:35:33 UTC 2014


commit 44959592ebe7e16708dc53bd8b7fda117f2d65db
Author: Pete Travis <immanetize at fedoraproject.org>
Date:   Thu Feb 27 23:35:28 2014 -0700

    Starting some basic python scripting to manage the beats table.
    So far, this only clears beat content and adds the open beats header.
    No arguments, bring your own credentials.

 tools/pybeats/beats.py |   74 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 74 insertions(+), 0 deletions(-)
---
diff --git a/tools/pybeats/beats.py b/tools/pybeats/beats.py
new file mode 100644
index 0000000..d7bd0bb
--- /dev/null
+++ b/tools/pybeats/beats.py
@@ -0,0 +1,74 @@
+#!/usr/bin/python
+import mwclient
+import sys
+
+username = 'yourFASID'
+password = 'DEADBEEF'
+site = mwclient.Site('fedoraproject.org', path = '/w/')
+if username and password:
+    site.login(username, password)
+
+beats = ( "Documentation_Beats_Installer",
+        "Documentation_Architecture_Specific_Content_Beat",
+        "Documentation_x86_Specific_Content_Beat",
+        "Documentation_x86_64_Specific_Beat",
+        "Documentation_Cloud_Specific_Content_Beat",
+        "Documentation_ARM_Specific_Content_Beat",
+        "Documentation_Desktop_Beat",
+        "Documentation_Productivity_Beat",
+        "Documentation_Networking_Beat",
+        "Documentation_Printing_Beat",
+        "Documentation_I18n_Beat",
+        "Documentation_Multimedia_Beat",
+        "Documentation_Entertainment_Beat",
+        "Documentation_Live_Image_Beat",
+        "Documentation_Kernel_Beat",
+        "Documentation_Boot_Beat",
+        "Documentation_Security_Beat",
+        "Documentation_Virtualization_Beat",
+        "Documentation_Web_Servers_Beat",
+        "Documentation_Cloud_Beat",
+        "Documentation_Mail_Servers_Beat",
+        "Documentation_Database_Servers_Beat",
+        "Documentation_File_Servers_Beat",
+        "Documentation_Samba_Beat",
+        "Documentation_System_Daemons_Beat",
+        "Documentation_Server_Configuration_Tools_Beat",
+        "Documentation_File_Systems_Beat",
+        "Documentation_Xorg_Beat",
+        "Documentation_Cluster_Beat",
+        "Documentation_Development_Beat",
+        "Documentation_Development_Runtime_Beat",
+        "Documentation_Development_Tools_Beat",
+        "Documentation_Development_GCC_Tools_Beat",
+        "Documentation_Java_Beat",
+        "Documentation_Development_D_Beat",
+        "Documentation_Development_Haskell_Beat",
+        "Documentation_Development_Eclipse_Beat",
+        "Documentation_Backwards_Compatibility_Beat",
+        "Documentation_Development_OCaml_Beat",
+        "Documentation_Development_Web_Beat",
+        "Documentation_Scientific_and_Technical_Beat"
+        "Documentation_EDA_Beat",
+        "Documentation_Embedded_Development_Beat",
+        "Documentation_Circuit_Design_Beat",
+        "Documentation_Robotics_Beat",
+        "Documentation_Amateur_Radio_Beat",
+        "Documentation_Musicians_Beat",
+        "Documentation_Monitoring_Beat"
+        )
+
+footer = """
+[[Category:Docs Project]]
+[[Category:Draft documentation]]
+[[Category:Documentation beats]]
+"""
+header = "{{header|docs}}"
+docs_beat_open = "{{Docs_beat_open}}"
+
+for beat in beats:
+    page = site.Pages[beat]
+    text = page.edit()
+    string = header + docs_beat_open + footer
+    page.save(string)
+


More information about the docs-commits mailing list