because some people aren’t very smart… nuf said
6 hours ago, Swifter43021 said:
Knew it. So that’s the point of asking for logs, if you can do your stuff with only the ign?
Asked for igns or logs if someone is nice and want to contribute but don’t know how to get dem igns >.<
Also there is limit to igns I can get… but with diff ppl its easier to cover moar of playerbase
4 hours ago, xXConflictionXx said:
because some people aren’t very smart… nuf said
ye u funny.
["nikolaima", "GFeron", "StevenHoking", "weegee", "GFaceKillaB", "Xspot", "valmarc", "IamSC", "Kycu", "CloterChohan", "Polix", "JohnTao", "kAlyan", "Geodehunter", "Kudatarkar", "KommunisT", "BOREI1", "max777max", "Doomb0t", "Pride", "WTFIT", "jason0115", "PashaSirius", "xTAZx", "Dovamih", "ParaLibra", "BlackHawk01", "Ghostrecon", "Platinum333", "AllahBabah", "xx999doktor500", "xXxDonspeeDxXx", "Victus", "prukolust", "VAVILON5", "Nae", "ichimaru967382", "TheDamned", "MS18Kampfer", "CQBECTb", "lnquisitor", "DoomHammerOrcs", "SilverCrovv", "Mandalorec", "Orotimary", "PuLeMaN", "qmc", "MY3blKA", "tim3masta", "Cheshirius"]
1 hour ago, MightyHoot said:
but with diff ppl its easier to cover moar of playerbase
Pack the script as normal executable for windows and you will maybe find more who will run it (not criticising the average player, but most of them don’t know Python/how to run such a script), and maybe add and autouploader to pastebin or similiar.
3 hours ago, John161 said:
[“nikolaima”, “GFeron”, “StevenHoking”, “weegee”, “GFaceKillaB”, “Xspot”, “valmarc”, “IamSC”, “Kycu”, “CloterChohan”, “Polix”, “JohnTao”, “kAlyan”, “Geodehunter”, “Kudatarkar”, “KommunisT”, “BOREI1”, “max777max”, “Doomb0t”, “Pride”, “WTFIT”, “jason0115”, “PashaSirius”, “xTAZx”, “Dovamih”, “ParaLibra”, “BlackHawk01”, “Ghostrecon”, “Platinum333”, “AllahBabah”, “xx999doktor500”, “xXxDonspeeDxXx”, “Victus”, “prukolust”, “VAVILON5”, “Nae”, “ichimaru967382”, “TheDamned”, “MS18Kampfer”, “CQBECTb”, “lnquisitor”, “DoomHammerOrcs”, “SilverCrovv”, “Mandalorec”, “Orotimary”, “PuLeMaN”, “qmc”, “MY3blKA”, “tim3masta”, “Cheshirius”]
Pack the script as normal executable for windows and you will maybe find more who will run it (not criticising the average player, but most of them don’t know Python/how to run such a script), and maybe add and autouploader to pastebin or similiar.
ye, that make sense.
But I’d have to learn how to make proper input function(or pop up window) to choose path. Coz gui would be big ![:D](<fileStore.core_Emoticons>/emoticons/006j.png “:D”)
#!/usr/bin/env python3import os, json, sysdef chat\_parser(players):for dir in dirs: proper\_path = os.path.join(path , dir, 'chat.log')with open(proper\_path, 'r', encoding='ISO-8859-1') as kek:for one in kek:if '\>[' in one: ign = one.split('\>[')[1].split(']')[0].strip(' ') players.append(ign)return playersdef parser(): players = []for dir in dirs: proper\_path = os.path.join(path, dir, 'game.log')with open(proper\_path, 'r') as f:for line in f:if 'ADD\_' in line: ign = line.split(' (')[1].split(',')[0]if ' ' in ign: ign = ign.split(' ')[0] players.append(ign)return players home = os.path.expanduser('~')windows = 'Documents\\My Games\\StarConflict\\logs' linux = '.local/share/starconflict/logs'mac = 'Libary/Application Support/Star Conflict/logs'if os.name == "nt": path = os.path.join(home, windows)elif sys.platform == "linux" or sys.platform == "linux2": path = os.path.join(home, linux)else: path = os.path.join(home, mac)dirs = os.listdir(path)players = chat\_parser(parser())players = list(set(players))json.dump(players, open('igns.txt', 'w'), default=str)
3 hours ago, MightyHoot said:
ye, that make sense.
But I’d have to learn how to make proper input function(or pop up window) to choose path. Coz gui would be big ![:D](<fileStore.core_Emoticons>/emoticons/006j.png “:D”)
This should work without any user input (haven’t tested it on windows/mac yet)
[@John161](< base_url >/index.php?/profile/143536-john161/) thx ![:)](<fileStore.core_Emoticons>/emoticons/001j.png “:)”)
works on windows:
[exe.rar](< base_url >/applications/core/interface/file/attachment.php?id=14182)
What was wrong with mine? It works perfect, fast and built for windows. The one that you just posted errors out for me with the following error. Seriously, feel free to attach the one I compiled to your post as I did it to help. It only took me 10 minutes to compile so it wasn’t a big deal.
Error:
Spoiler
Traceback (most recent call last):
File “igns.py”, line 48, in <module>
FileNotFoundError: [WinError 3] The system cannot find the path specified: ‘C:\Users\Micha\Documents/My Games/StarConflict/logs’
Failed to execute script igns
Clearly its just the slash issue as Linux is always forward slash and windows switches.
2 minutes ago, xXConflictionXx said:
What was wrong with mine? It works perfect, fast and built for windows. The one that you just posted errors out for me with the following error. Seriously, feel free to attach the one I compiled to your post as I did it to help. It only took me 10 minutes to compile so it wasn’t a big deal.
Error:
Traceback (most recent call last):
File “igns.py”, line 48, in <module>
FileNotFoundError: [WinError 3] The system cannot find the path specified: ‘C:\Users\Micha\Documents/My Games/StarConflict/logs’
Failed to execute script igns
both are linked in 1st post
15 minutes ago, MightyHoot said:
I “updated” it, maybe it will work now
19 minutes ago, xXConflictionXx said:
What was wrong with mine? It works perfect, fast and built for windows. The one that you just posted errors out for me with the following error. Seriously, feel free to attach the one I compiled to your post as I did it to help. It only took me 10 minutes to compile so it wasn’t a big deal.
That is the problem
LOL! That’s because you are trying to download the one from your own post quoting mine. I updated it because the framework version was 4.6 so its now 3.5 so people don’t have to install the 4.6 framework if they are using NOT-UP-TO-DATE computers.
Got anything else I can code up for windows? lol I like coding but all my projects are working as intended and need new ideas…
1 minute ago, xXConflictionXx said:
LOL! That’s because you are trying to download the one from your own post quoting mine. I updated it because the framework version was 4.6 so its now 3.5 so people don’t have to install the 4.6 framework if they are using NOT-UP-TO-DATE computers.
mkay, I never liked this forum software. (why can’t they just invalided links if the corresponding file gets deleted, instead of giving such a vague error) (Doesn’t stuff like .Net Framework gets updated with Windows?)
7 minutes ago, John161 said:
mkay, I never liked this forum software. (why can’t they just invalided links if the corresponding file gets deleted, instead of giving such a vague error) (Doesn’t stuff like .Net Framework gets updated with Windows?)
Yes, but that is if you install updates. Lots of Windows users HATE windows update and disable it which is not smart, putting it lightly. Windows 10 makes it much easier to deal with though. And also that is assuming people know what they are doing which I think I already covered that portion of it in one of my recent posts. HINT *nuf said*
Spoiler
Please don’t say switch to Linux then. ![:D](<fileStore.core_Emoticons>/emoticons/006j.png “:D”)
Also @[MightyHoot](< base_url >/index.php?/profile/256206-mightyhoot/ “Go to MightyHoot’s profile”) I added more names in my previous post. I will try to keep more coming in. Just say when you have enough.
24 minutes ago, xXConflictionXx said:
Also @[MightyHoot](< base_url >/index.php?/profile/256206-mightyhoot/ “Go to MightyHoot’s profile”) I added more names in my previous post. I will try to keep more coming in. Just say when you have enough.
k, It’s around 5k atm… so half way ![:(](<fileStore.core_Emoticons>/emoticons/003j.png “:(”)
34 minutes ago, xXConflictionXx said:
Yes, but that is if you install updates. Lots of Windows users HATE windows update and disable it which is not smart, putting it lightly. Windows 10 makes it much easier to deal with though. And also that is assuming people know what they are doing which I think I already covered that portion of it in one of my recent posts. HINT *nuf said*
Please don’t say switch to Linux then. ![:D](<fileStore.core_Emoticons>/emoticons/006j.png “:D”)
That’s sadly true and maybe everyone should use some kind of BSD
Ok, got a better version which will grab more names which means that any that don’t use chat can be gathered as well so long as they are in battle with you. (I just like to code man and i’m a bit bored on this rainy day lol)
C# (Windows only version)
Spoiler
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Text.RegularExpressions;namespace SC\_User\_Extract{class Program{static string ChatLog = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\My Games\StarConflict\logs\";static StringBuilder sb = new StringBuilder();static string igns = Environment.CurrentDirectory + @"\igns.txt";static void Main(string[] args){if (File.Exists(igns)){File.Delete(igns);} foreach (string folders in Directory.GetDirectories(ChatLog)){ foreach (string chatlog in Directory.GetFiles(folders)){// chat.logif (chatlog.Contains("chat.log")){List\<string\> proName = new List\<string\>();using (StreamReader rdr = new StreamReader(chatlog)){ string line;while ((line = rdr.ReadLine()) != null){if (line.Contains("[") && line.Contains("]")){ string val = line.Substring(line.IndexOf('[') + 1).Split(']')[0].Trim(' ');if (!val.Contains("link")) proName.Add(val.ToString());}}} foreach (string nam in proName){Console.WriteLine(nam); sb.Append(nam + "\n");}}// combat.logif (chatlog.Contains("combat.log")){List\<string\> proName = new List\<string\>();using (StreamReader rdr = new StreamReader(chatlog)){ string line;while ((line = rdr.ReadLine()) != null){if (line.Contains("Participant")){ string val = Regex.Match(line, @"(?\<=Participant).\*?(?=Ship\_Race)").Value.TrimStart(' ').TrimEnd(' ');if (!val.Contains("Adept") && !val.Contains("Seeker") && !val.Contains("Hothead") && !val.Contains("Agent") && !val.Contains("Rookie") && !val.Contains("Infiltrator") && !val.Contains("Navigator") && !val.Contains("Assassin") && !val.Contains("Stalker") && !val.Contains("Technician") && !val.Contains("Veteran") && !val.Contains("Operator") && !val.Contains("Enforcer") && !val.Contains("Rogue") && !val.Contains("Scoundrel") && !val.Contains("Professional") && !val.Contains("Guardian") && !val.Contains("Maverick") && val != "\n"){ proName.Add(val.TrimEnd());}}}} foreach (string nam in proName){Console.WriteLine(nam); sb.Append(nam + "\n");}}// game.logif (chatlog.Contains("game.log")){List\<string\> proName = new List\<string\>();using (StreamReader rdr = new StreamReader(chatlog)){ string line;while ((line = rdr.ReadLine()) != null){if (line.Contains("ADD\_PLAYER")){ string val = line.Substring(line.IndexOf('(') + 1).Split(',')[0].Trim(' ');if (!val.Contains("Adept") && !val.Contains("Seeker") && !val.Contains("Hothead") && !val.Contains("Agent") && !val.Contains("Rookie") && !val.Contains("Infiltrator") && !val.Contains("Navigator") && !val.Contains("Assassin") && !val.Contains("Stalker") && !val.Contains("Technician") && !val.Contains("Veteran") && !val.Contains("Operator") && !val.Contains("Enforcer") && !val.Contains("Rogue") && !val.Contains("Scoundrel") && !val.Contains("Professional") && !val.Contains("Guardian") && !val.Contains("Maverick") && val != "\n"){ string value = RemoveBetween(val, '[', ']'); proName.Add(value.TrimEnd());}}}} foreach (string nam in proName){Console.WriteLine(nam); sb.Append(nam + "\n");}}}}File.AppendAllText(igns, RemoveEmptyLines(sb.ToString())); string[] lines = File.ReadAllLines(igns);File.WriteAllLines(igns, lines.Distinct().ToArray());}static string RemoveBetween(string s, char begin, char end){Regex regex = new Regex(string.Format("\\{0}.\*?\\{1}", begin, end));return regex.Replace(s, string.Empty);}static private string RemoveEmptyLines(string lines){return Regex.Replace(lines, @"^\s\*$\n|\r", "", RegexOptions.Multiline).TrimEnd();}}}
Either compile it or download it below.
10 minutes ago, xXConflictionXx said:
Ok, got a better version which will grab more names which means that any that don’t use chat can be gathered as well so long as they are in battle with you. (I just like to code man and i’m a bit bored on this rainy day lol)
C# (Windows only version)
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Text.RegularExpressions;namespace SC_User_Extract{class Program{static string ChatLog = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\My Games\StarConflict\logs";static StringBuilder sb = new StringBuilder();static string ignsTmp = Environment.CurrentDirectory + @"\igns.txt";static string igns = Environment.CurrentDirectory + @"\igns.txt";static void Main(string[] args){if (File.Exists(ignsTmp)){File.Delete(ignsTmp);}if (File.Exists(igns)){File.Delete(igns);} foreach (string folders in Directory.GetDirectories(ChatLog)){ foreach (string chatlog in Directory.GetFiles(folders)){// chat.logif (chatlog.Contains(“chat.log”)){List<string> proName = new List<string>();using (StreamReader rdr = new StreamReader(chatlog)){ string line;while ((line = rdr.ReadLine()) != null){if (line.Contains("[") && line.Contains("]")){ string val = line.Substring(line.IndexOf(’[’) + 1).Split(’]’)[0].Trim(’ ‘);if (!val.Contains(“link”)) proName.Add(val.ToString());}}} foreach (string nam in proName){Console.WriteLine(nam); sb.Append(nam + “\n”);}}// combat.logif (chatlog.Contains(“combat.log”)){List<string> proName = new List<string>();using (StreamReader rdr = new StreamReader(chatlog)){ string line;while ((line = rdr.ReadLine()) != null){if (line.Contains(“Participant”)){ string val = Regex.Match(line, @"(?<=Participant).*?(?=Ship_Race)").Value.TrimStart(’ ‘).TrimEnd(’ ‘); proName.Add(val);Console.WriteLine(val);}}} foreach (string nam in proName){Console.WriteLine(nam); sb.Append(nam + “\n”);}}// game.logif (chatlog.Contains(“game.log”)){List<string> proName = new List<string>();using (StreamReader rdr = new StreamReader(chatlog)){ string line;while ((line = rdr.ReadLine()) != null){if (line.Contains(“ADD_PLAYER”)){ string val = line.Substring(line.IndexOf(’(’) + 1).Split(’,’)[0].Trim(’ '); val = RemoveBetween(val, ‘[’, ‘]’); val.Replace("[", “”); val.Replace("]", “”); proName.Add(val);Console.WriteLine(val);}}} foreach (string nam in proName){Console.WriteLine(nam); sb.Append(nam + “\n”);}}}}File.AppendAllText(ignsTmp, sb.ToString()); string[] lines = File.ReadAllLines(ignsTmp);File.WriteAllLines(igns, lines.Distinct().ToArray());}static string RemoveBetween(string s, char begin, char end){Regex regex = new Regex(string.Format("\{0}.*?\{1}", begin, end));return regex.Replace(s, string.Empty);}}}
Either compile it or download it below.
[igns.zip](< base_url >/applications/core/interface/file/attachment.php?id=14184)
[SC_User_Extract.zip](< base_url >/applications/core/interface/file/attachment.php?id=14185)
Wait… u didn’t have it before? ![o_O](<fileStore.core_Emoticons>/emoticons/007.png “o_O”)
None of them grab names from the other logs in any of the code that has been put into this thread. This newest one I compiled does do that and I have pasted the code so that you guys can make a Linux/mac version. also I have updated it yet again due to not considering that pve and coop bot names are in the logs as well.
If you used my latest log make sure there are no bot names which is fixed now.
7 minutes ago, xXConflictionXx said:
None of them grab names from the other logs in any of the code that has been put into this thread. This newest one I compiled does do that and I have pasted the code so that you guys can make a Linux/mac version. also I have updated it yet again due to not considering that pve and coop bot names are in the logs as well.
If you used my latest log make sure there are no bot names which is fixed now.
![:(](<fileStore.core_Emoticons>/emoticons/003j.png “:(”)
ign from chat log:
def chat\_parser(players):for dir in dirs: proper\_path = os.path.join(path , dir, 'chat.log')with open(proper\_path, 'r', encoding='ISO-8859-1') as kek:for one in kek:if '\>[' in one: ign = one.split('\>[')[1].split(']')[0].strip(' ') players.append(ign)return players
ign from games:
def parser(): players = []for dir in dirs: proper\_path = os.path.join(path, dir, 'game.log')with open(proper\_path, 'r') as f:for line in f:if 'ADD\_' in line: ign = line.split(' (')[1].split(',')[0]if ' ' in ign: ign = ign.split(' ')[0] players.append(ign)return players
but yeah… thx for contribution ![:D](<fileStore.core_Emoticons>/emoticons/006j.png “:D”)
Ah, lol guess I missed that one. ![:D](<fileStore.core_Emoticons>/emoticons/006j.png “:D”)
At least it does now though. At any rate there it is doing as you wanted now.
*Not sure if you know this but the above code does not filter bots which is what I fixed in mine*