Change

Musings of a sometime AAUW member

«

Script to work with list of members in Facebook group

Okay, I’m now the administrator of a largish Facebook group and facing the problem of finding a particular member when I want to add them as an admin. The following script may be helpful to convert the list of all members to a delimited text file that can be imported to Excel, and used for that purpose or other metrics.

Notes:

  • You can get the list of all members from the “edit officers” page.
  • My version of Excel (2002) isn’t working too well with non ASCII characters in names. If anyone knows a UTF-8 converter that could be used here (to, say, remove diacritical marks and such — we’re not dealing with huge amounts of non-ASCII data), please let me know.
  • There’s nothing but name and network here. But if you’ve got another list of stakeholders, it might be able to match your Facebook supporters with that.
  • Networks don’t show for some folks. It may be a problem with people who are in more than one network — haven’t really investigated.


# convert list of members (most recent to earliest) from a facebook group
# format
# First{additional} Last {(Network)}
# to the format
# Number:First{additional}:Last{:Network}
# where number is earliest to most recent


sed 's/make officer//' | # delete cruft
sed 's/^ *\* //' | # delete more cruft
awk '{printf "%s\t%s\n", NR,$0}' | # number lines
sort -nr | sed 's/^[0-9]*.//' | # print in order of last to first then delete numbers
awk '{printf "%s:%s\n", NR, $0}' | # renumber in the order folks joined the group, with number as first field
sed 's/ \([A-Z][^ ]*\) (/:\1:/' | # if a network, put separators before last name and network
sed 's/ \([A-Z][a-z]*\)$/:\1/' | # if no network, put separator before last name
sed 's/)//' # delete trailing ) for lines with a network

This entry was posted on Wednesday, May 7th, 2008 at 12:53 pm by Nancy and is filed under Web 2.0 with tags . You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.

HERVotes Campaign

www.hervotes.org

Recent Posts
Categories
Tags
Recent tweets - @nes49
Archives

Where's Nancy?
My Delicious Tags