What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

This is kind of an edge case, but can we add an advanced super ninja search option for matching posts owned by a ♦? I keep running into the case where I remember that a meta post was posted by a dev, but can't actually remember which one, and can't get the search terms close enough to find it. Something like user:mod or bymod:1 would be helpful

share|improve this question
6  
Just change your focus to this: meta.stackoverflow.com/search?q=user%3A146126 –  random Jun 29 '11 at 21:59
    
Would you also be interested in it returning results for former mods? –  squillman Jun 29 '11 at 22:22
    
@squillman I guess showing posts by people that were mods when they wrote them would be potentially useful, but I'm sure that's much more complicated; just current diamonds would be fine –  Michael Mrozek Jun 29 '11 at 22:25
    
Declining this...that's too much of an edge case to add to the supported syntax list. –  Nick Craver Jan 9 '13 at 3:16

2 Answers 2

This is too specialized a requirement for the UI. Reach for the API. There's a query to return the list of moderators, and from there you can return their questions and answers.

Here's a crudely-crafter script that shows the list of posts by moderators. Pass it two arguments: the site name, and further parameters to restrict the post queries.

#!/usr/bin/env python
import json, re, sys, urllib
(site, params) = (sys.argv[i] for i in (1,2))

def get(tail):
    stream = urllib.urlopen("http://api." + site + "/1.1/" + tail)
    data = json.load(stream)
    stream.close()
    return data
def quote_for_markdown(raw):
    return re.sub("[][*<>\\`]", "\g<0>", raw)

mods = [m["user_id"] for m in get("users/moderators")["users"]]
base = "users/" + ";".join(map(str, mods)) + "/"
questions = get(base + "questions?" + params)
answers = get(base + "answers?" + params)
posts = ([(q["question_id"], q["title"]) for q in questions["questions"]] +
         [(q["answer_id"], q["title"]) for q in answers["answers"]])
posts.sort(key=lambda x:x[0])
for (id, title) in posts:
    print "[%s](http://%s/q/%d)" % (quote_for_markdown(title), site, id)

Example: yesterday's posts from moderators on Meta.SO:

python get_moderator_posts meta.stackoverflow.com "answers?fromdate=1309305600&todate=1309392000"
share|improve this answer

There aren't that many ♦ moderators; couldn't you just search for each individually?

share|improve this answer
2  
There are 14 here, and it's more often the case that I'm looking for a dev post; there's like 20 of them –  Michael Mrozek Jun 29 '11 at 22:02
2  
There are 11 devs/employees on Meta. Or at least, 11 who have diamonds. –  mmyers Jun 29 '11 at 22:18
3  
@mmyers Well, due to my spectacular laziness, that's enough for me to want a search option –  Michael Mrozek Jun 29 '11 at 22:24
    
@Michael +1 simply for that comment alone –  squillman Jun 29 '11 at 22:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .