@@ -11,12 +11,13 @@ public static void Main(string[] args)
11
11
List < string > ? jsonFiles = null ;
12
12
13
13
bool shouldAddDefinition = true ;
14
+ bool createAliasEntries = true ;
14
15
bool addDefinitionToOneWordNames = false ;
15
16
bool addDefinitionToGivenNames = false ;
16
17
bool addDefinitionToSurnames = false ;
17
18
18
19
bool validArgs = false ;
19
- if ( args . Length is 6 )
20
+ if ( args . Length is 7 )
20
21
{
21
22
string jsonFolderPath = args [ 0 ] . Trim ( '"' , ' ' ) ;
22
23
if ( ! Directory . Exists ( jsonFolderPath ) )
@@ -41,24 +42,30 @@ public static void Main(string[] args)
41
42
{
42
43
outputFilePath = Path . ChangeExtension ( outputFilePath , "json" ) ;
43
44
44
- bool ? result = GetBoolArgValue ( args , "--add-character-details-to-full-names " , 2 ) ;
45
+ bool ? result = GetBoolArgValue ( args , "--create-alias-entries " , 2 ) ;
45
46
if ( result is not null )
46
47
{
47
- shouldAddDefinition = result . Value ;
48
+ createAliasEntries = result . Value ;
48
49
49
- result = GetBoolArgValue ( args , "--add-details-to-one-word -full-names" , 2 ) ;
50
+ result = GetBoolArgValue ( args , "--add-character- details-to-full-names" , 2 ) ;
50
51
if ( result is not null )
51
52
{
52
- addDefinitionToOneWordNames = result . Value ;
53
- result = GetBoolArgValue ( args , "--add-details-to-given-names" , 2 ) ;
53
+ shouldAddDefinition = result . Value ;
54
+
55
+ result = GetBoolArgValue ( args , "--add-character-details-to-one-word-full-names" , 2 ) ;
54
56
if ( result is not null )
55
57
{
56
- addDefinitionToGivenNames = result . Value ;
57
- result = GetBoolArgValue ( args , "--add-details-to-surnames " , 2 ) ;
58
+ addDefinitionToOneWordNames = result . Value ;
59
+ result = GetBoolArgValue ( args , "--add-character- details-to-given-names " , 2 ) ;
58
60
if ( result is not null )
59
61
{
60
- addDefinitionToSurnames = result . Value ;
61
- validArgs = true ;
62
+ addDefinitionToGivenNames = result . Value ;
63
+ result = GetBoolArgValue ( args , "--add-character-details-to-surnames" , 2 ) ;
64
+ if ( result is not null )
65
+ {
66
+ addDefinitionToSurnames = result . Value ;
67
+ validArgs = true ;
68
+ }
62
69
}
63
70
}
64
71
}
@@ -107,6 +114,7 @@ public static void Main(string[] args)
107
114
}
108
115
}
109
116
117
+ createAliasEntries = GetAnserOfYesNoQuestion ( "Create entries for character aliases if they are sufficiently structured? Y/N" ) ;
110
118
shouldAddDefinition = GetAnserOfYesNoQuestion ( "Add character details (age, height, etc.) to the definition of full names? Y/N" ) ;
111
119
if ( shouldAddDefinition )
112
120
{
@@ -147,7 +155,9 @@ public static void Main(string[] args)
147
155
foreach ( VndbNameRecord vndbNameRecord in vndbNameRecords )
148
156
{
149
157
string definition = vndbNameRecord . GetDefinition ( ) ;
150
- List < NameRecord > ? aliasRecords = vndbNameRecord . GetAliasRecords ( ) ;
158
+ List < NameRecord > ? aliasRecords = createAliasEntries
159
+ ? vndbNameRecord . GetAliasRecords ( )
160
+ : null ;
151
161
152
162
ProcessFullNames ( nameTypesDict , convertedRecords , vndbNameRecord . FullName , vndbNameRecord . FullNameInRomaji , definition , vndbNameRecord . Sex , aliasRecords , shouldAddDefinition , addDefinitionToOneWordNames , addDefinitionToGivenNames , addDefinitionToSurnames ) ;
153
163
string [ ] fullNames = vndbNameRecord . FullName . Split ( [ '&' , '/' , '/' , '&' , ',' , '、' , ',' ] , StringSplitOptions . TrimEntries | StringSplitOptions . RemoveEmptyEntries ) ;
@@ -188,7 +198,7 @@ public static void Main(string[] args)
188
198
lines . Add ( line ) ;
189
199
190
200
string definitionForNazeka = record . Definition ?? ( nameType is not null && nameTypes ! . Count < 4
191
- ? $ "( { nameType } ) { record . Reading } "
201
+ ? $ "[ { nameType } ] { record . Reading } "
192
202
: record . Reading ) ;
193
203
194
204
JsonArray nazekaSpellingsArray = [ record . PrimarySpelling ] ;
0 commit comments