From 38f43ecd1cb7c997a8cf74d921db3c0db848c8b3 Mon Sep 17 00:00:00 2001
From: Lyudmila Vaseva <vaseva@mi.fu-berlin.de>
Date: Thu, 14 Feb 2019 16:37:49 +0100
Subject: [PATCH] Add random notes

---
 notes             | 30 ++++++++++++++++++++++++++++++
 src/explore.ipynb | 11 +----------
 src/main.py       | 20 ++++++++++++++++++++
 3 files changed, 51 insertions(+), 10 deletions(-)

diff --git a/notes b/notes
index 838200c..30a60e1 100644
--- a/notes
+++ b/notes
@@ -899,3 +899,33 @@ TODO: Questions to ask of a text (p.39-40):
 * What kinds of comparisons can you make between texts? Between different texts on the same topic? Similar texts at different times such as organizational annual reports? Between different authors who address the same questions?
 * Who benefits from the text? Why?
 "
+
+================================================================
+https://en.wikipedia.org/w/api.php?action=help&modules=main
+
+action
+
+    Which action to perform.
+
+    abusefiltercheckmatch
+        Check to see if an AbuseFilter matches a set of variables, an edit, or a logged AbuseFilter event.
+    abusefilterchecksyntax
+        Check syntax of an AbuseFilter filter.
+    abusefilterevalexpression
+        Evaluates an AbuseFilter expression.
+    abusefilterunblockautopromote
+        Unblocks a user from receiving autopromotions due to an abusefilter consequence.
+
+================================================================
+https://en.wikipedia.org/wiki/Wikipedia:Database_download
+
+
+================================================================
+https://stats.wikimedia.org/v2
+
+To generate stats for different wiki projects
+
+=====================================================================
+Claudia: * A focus on the Good faith policies/guidelines is a historical development. After the huge surge in edits Wikipedia experienced starting 2005 the community needed a means to handle these (and the proportional amount of vandalism). They opted for automatisation. Automated system branded a lot of good faith edits as vandalism, which drove new comers away. A policy focus on good faith is part of the intentions to fix this.
+
+
diff --git a/src/explore.ipynb b/src/explore.ipynb
index 6c7cdd0..3e27470 100644
--- a/src/explore.ipynb
+++ b/src/explore.ipynb
@@ -1,14 +1,5 @@
 {
  "cells": [
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "# An explorative inquiry into EN Wikipedia's edit filter system\n",
-    "\n",
-    "This notebook serves to explore EN Wikipedia's edit filters"
-   ]
-  },
   {
    "cell_type": "code",
    "execution_count": 16,
@@ -561,7 +552,7 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "**TODO** It would be interesting to check all those filters which actions are set to \"disallow\" but I've "
+    "**TODO** It would be interesting to check all those filters which actions are set to \"disallow\" but I've labeled as \"good_faith\" for example"
    ]
   },
   {
diff --git a/src/main.py b/src/main.py
index 330b631..af743b5 100644
--- a/src/main.py
+++ b/src/main.py
@@ -1,5 +1,6 @@
 import sys
 import pandas as pd
+from mw import database
 
 
 def read_filters(filepath):
@@ -21,6 +22,25 @@ def get_filters_actions(in_file, out_file):
     df_update.to_csv(out_file, sep='\t')
     #print(df[['af_id', 'af_hidden', 'af_actions', 'af_hit_count', 'af_public_comments']])
 
+
+def download_db_table():
+    db = database.DB.from_params(
+        host="analytics-store.eqiad.wmnet",
+        read_default_file="~/.my.cnf",
+        user="research",
+        db="enwiki"
+    )
+
+    users = db.users.query(
+        registered_after="20140101000000",
+        direction="newer",
+        limit=10
+    )
+
+for user in users:
+print("{user_id}:{user_name} -- {user_editcount} edits".format(**user))
+
+
 '''
 main
 '''
-- 
GitLab