Closed jongalloway closed 5 years ago
@sh4na @andrey_akinshin @antoine_hy @ben_a_adams @daronyondem @daveaglick @dierufdavid @davidpine7 @eric_sink @erikschierboom @gep13 @gcaughey @irisclasson @tidusjar @JessPWhite @jonskeet @jguadagno @lucecarter1 @mairacw @MarcBruins @Mpdreamz @devlead @mjhutchinson @mitchelsellers @dotMorten @nata_dzen @nbarbettini @onovotny @p_mbanugo @haacked @K2Prk @robertmclaws @lakritzator @rdiazconcha @samidip @SaraJChipps @sjkilleen @sbwalker @schneidenbach @stefanov_ @stevejgordon @sahuwanya @dotnetlagos @tonerdo @xen2
If you want to do it again (I had to do a little manual cleanup to remove false positives):
var regex = new Regex("https?:\\/\\/.*twitter.com\\/([a-zA-Z0-9_]{1,15})");
string usernames = string.Join(Environment.NewLine, Directory
.EnumerateFiles(@"C:\Code\election\_campaign-2019")
.Select(x => File.ReadAllText(x))
.SelectMany(x => regex.Matches(x).Cast<Match>().Select(m => m.Groups[1].Value))
.Distinct()
.Select(x => $"[@{x}](https://twitter.com/{x})"));
Edit -- @daveaglick beat me to it, with a better method too! :)
We had a suggestion to create a Twitter list of candidates so people can follow them more easily. I'm happy to create that list under the @dotnetfdn Twitter account.
I think there might be a slick way to parse these from the Markdown files, or it could be done by hand. I can probably do that if things cool down after the election, but if anyone wants to create a list of Twitter handles and reply on this thread, that'd be even better and fasterer.