IonicWind Software

IWBasic => The Roundtable => Topic started by: Brian on October 29, 2018, 12:49:47 PM

Title: Text/CSV line sorter
Post by: Brian on October 29, 2018, 12:49:47 PM
Hi,

This is a re-vamp of a program I wrote 6 years ago, for sorting lines of text. I reckon I probably wrote it to sort CSV files at the time, but it will also do text files. The program is written as a Project, so you may have to calafudge the project's path if you choose to compile, although I have included the exe in the zip

As you load up the source file, it counts the number of lines and also gives you the length of the longest line. I have set the variable that holds a line of text at 2048 bytes, which in my experience of testing is quite ample - I haven't gone over 400 bytes yet. In the unlikely event that a line exceeds 2048 bytes, you will have to expand the "text" and "header" variables, and re-compile

There is the option to not include the first line of a loaded file from sorting, as with CSV files the first line usually contains the text for the column headers

Very simple, and fast. Any suggestions / alterations, please inform me. Test CSV file included

Brian


Update 1.3 for Hallowe'en:

Andy thought that the size of the program's window was a bit too large. I agreed with him, as there is no interaction with the text on screen, really

He also mentioned that if a line had a space or spaces at the beginning, it wouldn't sort properly. It will now take the spaces out as a default, unless you choose not to

Text in Tooltips updated slightly

Added some colour to the screen

Included some bitmaps for the menu items, just to prettify it

Various other tweaks

Brian
Title: Re: Text/CSV line sorter
Post by: Brian on October 31, 2018, 10:00:19 AM
Hi,

Just posted an update to this program. See first post

Brian
Title: Re: Text/CSV line sorter
Post by: Andy on October 31, 2018, 11:12:33 AM
Brian,

It's a great program, very useful, I've added it to my IDE tools.

Thanks for sharing!

Andy.