Browse Source

Properly fix the category issue.

master
Mateusz Brawański 1 year ago
parent
commit
8dd0e762d8
Signed by: Emzi0767 GPG Key ID: 246AB92A3C22030A
  1. 2
      src/Emzi0767.DiscordEmoji.DefinitionFetcher/Properties/launchSettings.json
  2. 6
      src/Emzi0767.DiscordEmoji.MapGenerator/Program.cs
  3. 2
      src/Emzi0767.DiscordEmoji.MapGenerator/Properties/launchSettings.json

2
src/Emzi0767.DiscordEmoji.DefinitionFetcher/Properties/launchSettings.json

@ -2,7 +2,7 @@
"profiles": {
"Emzi0767.DiscordEmoji.DefinitionFetcher": {
"commandName": "Project",
"commandLineArgs": "discordemoji-canary.json Canary"
"commandLineArgs": "discordemoji-stable.json Stable"
}
}
}

6
src/Emzi0767.DiscordEmoji.MapGenerator/Program.cs

@ -176,7 +176,8 @@ namespace Emzi0767.DiscordEmoji
Surrogates = diversityEmoji.Surrogates,
Names = diversityEmoji.Names,
PrimaryNameWithColons = $":{diversityEmoji.Names.First()}:",
NamesWithColons = diversityEmoji.Names.Select(x => $":{x}:").ToArray()
NamesWithColons = diversityEmoji.Names.Select(x => $":{x}:").ToArray(),
Category = emoji.Category
};
var dcps = utf32.GetBytes(emoji.Surrogates);
@ -212,6 +213,7 @@ namespace Emzi0767.DiscordEmoji
}
Console.WriteLine("done, {0:#,##0} definitions processed", emojis.Count);
Console.WriteLine("{0:#,##0} are missing URLs", emojis.Count(x => x.AssetUrl is null));
Console.WriteLine("{0:#,##0} are missing category", emojis.Count(x => x.Category is null));
Console.Write("Creating emoji map... ");
var now = DateTimeOffset.UtcNow;
@ -272,7 +274,7 @@ namespace Emzi0767.DiscordEmoji
Surrogates = diversity.Surrogates,
Names = diversity.Names.Concat(parent.Names.Select(x => $"{x}:{modifier.Name}")).ToArray(),
NamesWithColons = diversity.Names.Select(x => $":{x}:").Concat(parent.Names.Select(x => $":{x}::{modifier.Name}:")).ToArray(),
Category = parent.Category,
Category = diversity.Category,
};
var cps = utf32.GetBytes(diverseEmojiDef.Surrogates);

2
src/Emzi0767.DiscordEmoji.MapGenerator/Properties/launchSettings.json

@ -2,7 +2,7 @@
"profiles": {
"Emzi0767.DiscordEmoji.MapGenerator": {
"commandName": "Project",
"commandLineArgs": "../../../../Emzi0767.DiscordEmoji.DefinitionFetcher/bin/Debug/net5.0/discordemoji-canary.json"
"commandLineArgs": "../../../../Emzi0767.DiscordEmoji.DefinitionFetcher/bin/Debug/net5.0/discordemoji-stable.json"
}
}
}
Loading…
Cancel
Save