Since this was carried out a particular point in time, we thought it made sense to create a blog post documenting the process by which we went from as many of the Irish Twitter legacy verified accounts that we could reasonably find to categorised sets of the corresponding Ireland-related accounts on Bluesky/Eurosky, using the lists, starter packs and feeds functionality to organise them.

We downloaded a CSV file from GitHub called the Twitter Verified List (413,745 accounts) by data journalist Jon Keegan as a starting point. The process below was completed on a Mac.

Miller (installed using Homebrew) was used to deal with extra linefeeds.

mlr --csv put '                                             
  for (k in $*) {
    if (is_string($[k])) { $[k] = gsub($[k], "\n", " "); }
  }
' verified_users_2022-11-02.csv > verified_noextralfs.csv

We then just used grep to search for common words like Ireland, Irish, the four big cities, to filter this down, and saved it as a CSV file (4,517 accounts). We avoided using all county names or county towns, in the hope that the majority of profiles contained Ireland or Irish or a big city name.

head -n 1 verified_noextralfs.csv > ireland.csv

# grep -i -e Ireland -e Irish -e "Éire" verified_noextralfs.csv >> ireland.csv

grep -i -e Ireland -e Irish -e "Éire" -e Dublin -e Cork -e Limerick -e Galway verified_noextralfs.csv >> ireland.csv

sort -u ireland.csv > ireland2.csv

mlr --csv --opprint cut -f screen_name ireland2.csv

Opening this CSV file in a spreadsheet (Google Sheets), we double checked that the location (J2) or description (L2) contained one of the keywords (rather than them being in their recent tweets), and also did a human check on the results to get a shorter list (3,665 accounts).

=if(or(isnumber(search("ireland", J2)), 
isnumber(search("irish", J2)), 
isnumber(search("éire", J2)), 
isnumber(search("dublin", J2)), 
isnumber(search("cork", J2)), 
isnumber(search("limerick", J2)), 
isnumber(search("galway", J2)), 
isnumber(search("ireland", L2)), 
isnumber(search("irish", L2)), 
isnumber(search("éire", L2)), 
isnumber(search("dublin", L2)), 
isnumber(search("cork", L2)), 
isnumber(search("limerick", L2)), 
isnumber(search("galway", L2)), 
isnumber(search("🇮🇪", J2)), 
isnumber(search("☘️", J2)), 
isnumber(search("🇮🇪", L2)), 
isnumber(search("☘️", L2))), "Yes", "No")

Using the old Twitter screen_name as the first word and appending .bsky.social, we looked for corresponding accounts on Bluesky by calling goat (installed using Homebrew) repeatedly for each account in a shell script, sleeping for a few seconds to avoid hammering with XRPC queries.

goat xrpc query https://public.api.bsky.app app.bsky.actor.getProfile actor==uniofgalway.bsky.social; sleep 5
# multiple lines for each account, similar to the above, put into the shell file that is run below
./tw2at.sh 1>output.txt 2>error.txt

We used jq (installed using Homebrew) to extract the required fields from the output.txt file.

cat output.txt | jq -r '[ .did, .handle, .displayName, .avatar, .description, .followersCount, .followsCount, .postsCount, .verification.verifications[0].issuerHandle ] | @csv' > output.csv

We then realised that some errors were due to underscores in the original screen_name, so we searched error.txt for lines matching "Invalid AT identifier (got", removed any underscores, and called goat again for each of those accounts. We could have just removed the underscores before checking in the shell script above. Adding these to those found already, we were now down to less than a 1/3 (1,086 accounts).

A "Master List for Checking" spreadsheet (Google Sheets again) was used to manually verify if an account on Bluesky matched that from Twitter. Avatars, titles and descriptions that matched visually or in terms of their text were helpful guides, and accounts with no avatar that also followed the single default account on Bluesky could usually be discounted. This was the most time consuming step, but after some weeks, we ended up with about 2/3 of the previous list (667 accounts), including some where an alternative username was discovered and used.

=hyperlink("https://mu.social/profile/"&A3, image(C3, 1))
=hyperlink("https://twitter.com/"&K3, IMAGE(VLOOKUP(substitute(A3, ".bsky.social", ""), probirish!F:AG, 28, 0), 1))

At the same time, we assigned each account to one or more categories (using the top-level categories from DMOZ/ODP), adding the account manually to the appropriate list(s) at first, and later using a formula to generate a bs_new_list_item() command for each in bskyr (r, RStudio).

bs_new_list_item(subject = 'jconnollybooks.bsky.social', uri='at://did:plc:ahqjozh6534hgv3gixtplyg7/app.bsky.graph.list/3mzsqfwfb672o')
Sys.sleep(3)

10% of the accounts (71) from Northern Ireland were added to a Northern Ireland list. We then repeated the previous steps 1 to 9 to search for any missing accounts from Belfast and Derry/Londonderry. This produced an additional 219 accounts, which after human checking yielded 147 accounts, and after searching for matching Atmosphere profiles (removing underscores in advance this time), this gave 48 accounts. These were once again checked to see if they were valid and matched the original Twitter accounts, giving 28 additional accounts for the Northern Ireland list.

The set of lists created by a user can be retrieved using goat, using the first line below. This can be chained into another goat command to retrieve the accounts on those lists, as in the second line. But if there are more than 100 accounts, you need to use a loop to get the next 100 using the previous cursor, using the rest of the code. It isn't that sophisticated so just use CTRL+C to quit running the loop.

goat xrpc query @pds app.bsky.graph.getLists actor==ireland.mu.social

goat xrpc query @pds app.bsky.graph.getLists actor==ireland.mu.social | jq | jq -r '.lists[].uri' | xargs -I {} -n1 goat xrpc query @pds app.bsky.graph.getList list=={} | jq | jq -r '.items[].subject.handle + ", " + .list.name + ", " + .list.uri' | sort

goat xrpc query @pds app.bsky.graph.getList list==at://did:plc:xwwfbjj4jntocrft75l5w3ax/app.bsky.graph.list/3mwd7ss7wtv2r limit==100 cursor=={} >>Arts.txt
while :
do
tail -n 2 Arts.txt |grep cursor |sed -e 's/  \"cursor\"\: \"//' |sed -e 's/\"//' |xargs -I{} -t -n1 goat xrpc query @pds app.bsky.graph.getList list==at://did:plc:xwwfbjj4jntocrft75l5w3ax/app.bsky.graph.list/3mwd7ss7wtv2r limit==100 cursor=={} >>Arts.txt   
grep handle Arts.txt |sort -u |wc
grep cursor Arts.txt |wc
sleep 2
cat Arts.txt | jq | jq -r '.items[].subject.handle' | sort -u > Arts2.txt
done

You can then use the very useful tools from the National Weather Service BSky bots page to convert lists to starter packs, and then use SkyFeed to create feeds from your lists.

Independently of the above, we also did some searches for accounts matching "Ireland" or "Irish" using searchActors via goat. You can use grep to find accounts on Eurosky, plus, by extracting those with custom domains, you can use goat resolve to find what PDS they are on too.

% cat irish.sh
#!/bin/bash
goat xrpc query @pds app.bsky.actor.searchActors q==irish limit==100 > irish.txt
while :
do
tail -n 2 irish.txt |grep cursor |sed -e 's/  \"cursor\"\: \"//' |sed -e 's/\"//' |xargs -I{} -t -n1 goat xrpc query @pds app.bsky.actor.searchActors q==irish limit==100 cursor=={} >>irish.txt   
grep handle irish.txt |sort -u |wc
grep cursor irish.txt |wc
sleep 2
done

% cat ireland.sh
#!/bin/bash
goat xrpc query @pds app.bsky.actor.searchActors q==ireland limit==100 > ireland.txt
while :
do
tail -n 2 ireland.txt |grep cursor |sed -e 's/  \"cursor\"\: \"//' |sed -e 's/\"//' |xargs -I{} -t -n1 goat xrpc query @pds app.bsky.actor.searchActors q==ireland limit==100 cursor=={} >>ireland.txt   
grep handle ireland.txt |sort -u |wc
grep cursor ireland.txt |wc
sleep 2
done

grep '"handle"' *.txt |sort -u |grep eurosky > eurosky.txt

grep '"handle"' *.txt |sort -u |grep -v bsky |grep -v eurosky |grep -v wsocial |grep -v brid.gy |grep -v northsky |grep -v blacksky > owndomains.txt

# for each result in owndomains.txt
goat resolve adam.englishby.ie | jq -r '.alsoKnownAs.[0] + ", " + .service[0].serviceEndpoint' >> resolve.txt

grep -v bsky.network resolve.txt |grep eurosky >> eurosky.txt

And that's it! A screenshot of our spreadsheet used for manual checks is shown above. We hope you found this blog post useful, and look forward to your comments below.

This research from the Unit for Social Semantics at the University of Galway is supported by the Data Spaces & Infrastructure research theme in Rinn AI, Ireland's national AI research and innovation network, funded by Research Ireland under grant number 23/RC/13506.