[Tool/Web/Other] Ini->Sql - Convert .ini Files to SQL Queries!
#1



v1.2
Hello everybody!

I'm pretty sure some of you wanted to switch to MySQL but converting the accounts to SQL was your biggest problem.
I had that same problem but luckly I knew how to program so I made a program in C++ that'll convert my .ini files to SQL queries and it worked perfectly fine, but it wasn't dynamic.
So I've decided to create this app to help all those people out there that want to switch to MySQL to enjoy all of the features MySQL has to offer.

What's this?

It's a .ini to MySQL converter that'll convert all of your .ini files to multiple MySQL INSERT queries.

There's already one!

Yes, I'm fully aware that there is one that is made by gamer931215 found here.

Why didn't I use it you might say?

Because it always crashed/froze when I loaded huge amount of files to it! And sometimes it didn't even work at all.

What do I bring to the table?

My program can take huge amounts of files and convert them(the whole purpose of me creating it), and not only that; I also do some checking under the hood to validate the files(of course it's not gonna remove all the invalid files, but should exclude most!).

Okay, I ran out of questions! Just show me the features.

1)An option to ignore duplicate errors upon executing the INSERT query.
2)Allow you to skip files if their columns don't match the one that I've stored(from the first account file).
3)You can tell the program if your .ini file has the player's username in one of the enteries or not. If there isn't, you can choose a column name for it and it'll get the name of the player automatically for you assuming that the .ini file is named after the player.
4)A popup telling you that the program has done converting.
5)A progress bar that'll show you the progress.

Check Github for more.

Note: I have only tested this on a .ini file that was created using y_ini, but it should work for other systems like dini, because I take care of the spacing between the equal(=) sign.

Screenshots





Converting 48,796 accounts(excluding the invalid ones).



Took me about 33.5 seconds(I'm not using an SSD).

Speed will depend on how good your PC(especially the HDD/SDD) is and how much data you store inside of your .ini file.

How to use?

1)Click on the browse button.

2)Locate the folder where you have your .INI files stored.

3)Locate the folder where you want to store the converted accounts.

4)Change the "table name" text box to your table name.


Optional
• If you don’t want to ignore duplicate errors, uncheck Ignore duplicate errors.

• If your file doesn’t contain the player’s username, uncheck File contains username and enter in a column name for your usernames in the textbox below.
Example: In my table I’ve got a column named usernames and my .INI files don’t contain the user’s name but each .INI file is named after the player it was created for. I’ll uncheck file contains username and in the textbox below it, I’d write usernames.

• If you don’t want to skip files that have missing columns in them, uncheck Skip file if it’s missing columns.

Added in v1.2

• If you want to change your column names, you’ll have to double click on the column you want to rename in the column list to your right.



Bugs

None currently.
I'm not the best programmer in the world so there might be a few bugs here and there
I'd also like to say that this program was just a fun project I was doing since I was bored.

Download

Github

Feedback is highly welcome.
If you're gonna give negative feedback, then please say why and what I can do to improve your experience using my program. Don't expect me to improve it if you just say "It's terrible" without saying why. I can't guess what you hated about it, can I?

Thanks.
Reply
#2

Nice tool !!
Reply
#3

Is there any way of getting Username from the file name? I mean in YINI I don't have a Username column and in SQLite I do.
Reply
#4

That's where the "File contains username" comes in handy. Untick it and then replace "Username column name" with the column name in your database. After that you should be good to go.
Reply
#5

Great job !
Reply
#6

Good idea, It will be useful for the ones who want to turn their script to MySQL from ini.
Reply
#7

Thanks for the feedback!
Reply
#8

The notifications are a great touch, good work
Reply
#9

Very Nice! +REP.
Reply
#10

Quote:
Originally Posted by gtakillerIV
View Post
That's where the "File contains username" comes in handy. Untick it and then replace "Username column name" with the column name in your database. After that you should be good to go.
It wasn't mention in the first post, or I didn't understand it. Thanks, it's gonna help me a lot.
Reply
#11

Version 1.1 released.
Please report any bugs you see and suggest features.
Reply
#12

Nice work! I'm sure that this will be handy for many people who are trying to convert INI formats to SQL.
Reply
#13

hmm a very good attempt. I like the interface of the app and good job anyway
Reply
#14

This is something great, good work. Now atleast server owners will switch to MySQL.
Reply
#15

amazing +rep
Reply
#16

Thanks all.
I've added some more speed improvements(when loading up a folder) and one security fix.
Reply
#17

I have .dubd, but ahh... Anyways gonna re-make to MySQL.
Reply
#18

You're always free to suggest features.
Reply
#19

Version 1.2 Released.
Reply
#20

Work in Windows ? i cant open it, System says : Is not a valid Win32 Application
Help ._.

Sorry for my bad english hehe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)