Example #1
0
        private static void ScoreTwitterList(string listUrl)
        {
            var strings                = listUrl.Split('/');
            var creator                = strings[3];
            var listName               = strings[5];
            var category               = listName.Replace('-', ' ').ToUpper();
            var usersInList            = GetUsersFromList(listName, creator);
            var scoredHandlesFromUsers = GetScoredHandlesFromUsers(usersInList, category);
            var path = string.Format(@"C:\Users\Nishant\Desktop\Dropbox\Ouzero\{0}\", listName);

            Utilities.WriteScoredHandlesFile(path, scoredHandlesFromUsers, category);
            DatabaseConnector.BatchInsertRecords(scoredHandlesFromUsers);
        }
Example #2
0
        public void ShouldGetScoredHandlesFromFileInput()
        {
            const string category      = "Travel";
            var          path          = @"C:\Users\Nishant\Desktop\Dropbox\Ouzero\Tech-moms\";
            var          files         = Directory.GetFiles(path);
            var          scoredHandles = TwitterDataSourcer.ScoreHandlesFromFiles(files, category);

            Utilities.WriteScoredHandlesFile(path, scoredHandles, category);
            DatabaseConnector.BatchInsertRecords(scoredHandles);
            Utilities.WriteMissingHandlesFile(path, category);
            var scoringTimes = TwitterDataSourcer.ScoringTimes;

            path = path + "ScoringTimes.txt";
            Utilities.WriteFile(path, scoringTimes);
        }