Add git.gpcf.eu and git.minetest.land detection

This commit is contained in:
SmallJoker 2020-04-11 21:57:20 +02:00
parent 87424f2d03
commit 032edbd917

View File

@ -110,7 +110,8 @@ namespace ModIndexer
} }
} catch (Exception e) { } catch (Exception e) {
Console.WriteLine(e.ToString()); Console.WriteLine(e.ToString());
//Console.WriteLine(enc.GetString(answer)); Console.WriteLine("=============");
Console.WriteLine(enc.GetString(answer));
} }
Console.WriteLine("Done."); Console.WriteLine("Done.");
@ -317,9 +318,9 @@ namespace ModIndexer
// TODO: Find an use for is_git // TODO: Find an use for is_git
} }
/*Console.WriteLine("Found mod: " + mod_name + /*Console.WriteLine("Found mod: " +
"\n\tTag: " + mod_tag + "\n\tTitle: " + info.title +
"\n\tLink: " + download + "\n\tLink: " + info.link +
"\n\tType: " + (int)type + " " + type.ToString());*/ "\n\tType: " + (int)type + " " + type.ToString());*/
update_data.Add(info); update_data.Add(info);
@ -397,13 +398,17 @@ namespace ModIndexer
{ {
string[] patterns = { string[] patterns = {
// GitHub & Notabug // GitHub & Notabug
@"^(https?://(www\.)?(github\.com|notabug\.org)(/[\w_.-]*){2})(/?$|\.git$|/archive/*)", @"^(https?://(www\.)?(github\.com|notabug\.org)(/[\w_.-]*){2})(/?$|\.git$|/archive/*|/zipball/*)",
// GitLab // GitLab
@"^(https?://(www\.)?gitlab\.com(/[\w_.-]*){2})(/?$|\.git$|/repository/*)", @"^(https?://(www\.)?gitlab\.com(/[\w_.-]*){2})(/?$|\.git$|/repository/*)",
// BitBucket // BitBucket
@"^(https?://(www\.)?bitbucket.org(/[\w_.-]*){2})(/?$|\.git$|/get/*|/downloads/*)", @"^(https?://(www\.)?bitbucket.org(/[\w_.-]*){2})(/?$|\.git$|/get/*|/downloads/*)",
// repo.or.cz // repo.or.cz
@"^(https?://repo\.or\.cz/[\w_.-]*\.git)(/?$|/snapshot/*)" @"^(https?://repo\.or\.cz/[\w_.-]*\.git)(/?$|/snapshot/*)",
// git.gpcf.eu (why can't you just be normal?)
@"^(https?://git\.gpcf\.eu/\?p=[\w_.-]*.git)(\;a=snapshot*)?",
// git.minetest.land
@"^(https?://git\.minetest\.land(/[\w_.-]*){2})(/?$|\.git$|/archive/*)",
}; };
// Convert attachment links to proper ones // Convert attachment links to proper ones