-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Add a command line tool #36
Comments
Do you also want to convert them back? E.g. csv -> gmd? |
I only have a one-sided need right now, I want to count some lines of The Great Ace Attorney. I think being able to turn back would be a great feature too, depending on you. |
The GMDTool does something like this. You could even edit the Program.cs to count the newlines. E.g. something like this. I didn't really test this code. Or you could edit it to spit out CSV stuff. CsvConfiguration csvConfig = new CsvConfiguration(CultureInfo.InvariantCulture)
{
Delimiter = ";",
ShouldQuote = _ => true, // Always insert quotes
HasHeaderRecord = false,
AllowComments = true, // Uses # to identify comments
};
using CsvWriter writer = new CsvWriter(Console.Out, csvConfig);
var records = gmd.Entries
.OfType<GMD_Entry>()
.Select(x => new StringKeyValuePair(x.Key, x.Value))
.ToList();
writer.WriteRecords(records); I attached three archives with the compiled GMDTool. These require .NET 5. GMDTool.zip Though keep in mind that this is all experimental, so it could just crash or something. |
Firstly very much thanks for this project!!
I want to convert many .gmd files to .csv/.txt in batch, is there some way to do this?
The text was updated successfully, but these errors were encountered: