Please download this 1.50 version of csvfix from here : http://limelinx.com/chc90.
(EDIT: now a dead link. Please see at top of page 2 for a valid link to a newer version.)

Enjoy!

musher0
//////////////////////////
Hello, everyone.

I just thought I'd share with you that there's a new multi-platorm csv processor out
there: CSVfix 1.20. It was released under a MIT licence late last year.

I've compiled it from source and here it is. gposil already presented a DBF type
database in a personal base thread. As well, there are a few SQL incarnations on
this board, so this good csv processor is just the thing to round out Puppy's
databasing capacity.

I've started using it, toying with a copy of the icewm "menu" present on all
Puppies-- to make it into a real csv file, among other things. I have very little
experience of this program yet, but it seems to be doing what you want it to do.

About the attached pet: in order to save space, the executable has been upx'd (still
works great; upx'ing does not affect performance), and the docs have been
archived in 7z format. You'll have to unpack these html docs to read them. Once
you've unpacked them, you'll find a convenient link to the Introduction in ~/my-
documents/Docs-Linux.

Finally, also included is a simple script I made base on "less" to help you view *.txt
and *.csv files. The script in ~/my-applications/bin, and you might want to link it in
~/.config/rox.sourceforge.net/OpenWith/.text_plain and
~/.config/rox.sourceforge.net/OpenWith/.text_csv

That way, you can view or follow what's happening to your csv file as csvfix
processes it, almost in real time, so to speak.

Although csvfix is not a "window"-type application, the pet contains a loader (edit)
which reminds you what command to type to launch csvfixin the terminal. As you
can realize, it might difficult to make a GUI for csvfix,given that it has so many
functions and parameters. That said, used in conjunction with less (above) and
dmcsv (see a couple of posts down), you get a very powerful tool to process csv
(aka flat-file) databases.

Finally, reading the doc is a must if you want to make the most out of this program.

The following will speak volumes, to whoever got headaches trying to
successfully process a csv database, about the usefulness of this
program. It also describes what csvfix command to use to solve a
particular problem. From the docs.

Here are some of the common problems that you may experience when
dealing with CSV data, and brief suggestions as to how CSVfix can help
you with them:

"The fields in the data are in the wrong order"
* Reorder them using the order command.

"The records in the data are in the wrong order"
* Sort them using the sort command. Remove duplicates with the unique
command.

"Some fields are missing from my data"
* If you simply need to add empty fields to keep your application happy,
use the pad command. If you need to enrich your data with values from
another file, use the join command. If you need to add a fixed string to
the data, use the put command.

"My CSV data isn't comma-separated!"
* Use the -sep and -rsep flags to tell CSVfix what separator to use.

"I need to read tab-separated data"
* Use the read_dsv command with the -s '\t' flag to convert tab-separated
data to CSV.

"I need to convert XML to CSV"
* The from_xml command probably does what you need.

"I need to perform calculations on some of the fields in my CSV data"
* The eval command provides arithmetic and other functions you can
apply to your CSV data.

"I need to extract data from the middle of a field"
* Use the split_fixed and split_char commands to break fields up into sub
fields. If you need to build a field from values in other fields, use the
merge command.

"I need to remove some lines from a CSV file before processing it further"
* The find and remove commands allow you to filter your CSV files using
regular expressions, value ranges and field lengths. You can also create
exclusion lists and use the join command with the -inv flag to exclude
selected rows.

"I need to merge the data from two CSV files"
* Use the order command to get the fields in the same order, and then
the unique command to merge them, discarding duplicates.

"I need to convert CSV data to this weird format"
* Use write_fixed, write_dsv and the printf and template commands to
format your output.

"I want to extract data from a SQL database as CSV"
* In the Windows version of CSVfix, the odbc_get command allows you to
extract data from SQL databases.

"I need to import data into a database, but the data is in a weird format"
* Use CSVfix to convert the data to CSV using the read_fixed, read_dsv,
and/ot read_multi commands, and then convert the CSV to SQL INSERT
statements using sql_insert.

"I need special date formatting"
* Use the date_format and date_iso comnands to read and re-format
dates.

I seem to remember few years ago a similar Windows Program for creating and processing CSVs. This was very useful for prepping data for DB entry.

Does CSVFIX has a front-ent gui for processing CSVs or is it a CLI only tool.

Thanks in advance_________________Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Enginesor use DogPile

Update, Saturday, Dec. 20, 2014
Please see second message on page 2 for csvfix's new companion, CSVpad-1.2.
Although an ok program, dmscsv is not as powerful. Thanks.
~~~~~~~~~~~~~~~~~

Hi, gcmartin.

No csvfix is only CLI. But I "intuited" your question, as I came back to
upload dmcsv.

dmcsv is a simple csv viewer -- don't expect CSVed for Linux, here --, but
still it will help you view the results of your processing with csvfix -- if
you're unsure in your mind of what the process will do. It is less abstract
of course than viewing your modified csv file with less -- which is fine, too.

In any case, enjoy! And have a great day!

P.S. Here is a very short description of dmcsv, as given by the author:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DMcsvEditor is simple csv/tab files editor
darhmedia.hu [where you'll find the archive of the file]
darhmedia@gmail.com
goo.gl/77BAE
*** this version developing on Trisquel GNU/Linux ***
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And at the same it will give the opportunity to explain some csvfix commands.

Let's start with the csvfix commands.

For example, let's say you wish to number a list of clients, putting the entry number as the first field.

You would thus use the command

Code:

csvfix sequence

with its parameters:

-n 1 -> start at number one
-i 1 -> with an interval of 1
-p 000 -> pad for up to 999 entries (you want the sequencing column to be three digits wide)
-ibl -> remove blank entries if any
-sep , -> specifies that you wish to have the comma as field separator
-smq -> use smart quotes in output file
-o [name of output file] -> put here a filename you invent to avoid confusion -- without the brackets, of course.
And finally the filename of the file you wish to process (your input file).

Distracting a slight bit from the original subject, I recently ram across another light-weight database called 'recutils'. It's a CLI database which lends itself well to scripting or front-ending with some dialog program. Also, it uses flat plain-text files so the databse can easily be worked with using grep, awk, sed or any text editor you like.
recutils is in the ubuntu repos so you can look for it there.

Oh, I'm definitely suggesting! At least until I have a need or an itch to satisfy somebody else's need. Come on, there's lots of gkdialog programmers around here -even though I rather see a regular gtk GUI or something done with something beside gtkdialog... Far be it from me to implement something which others could do instead... I have my hands full already. But you can (nearly) always count on me for suggestions and wry criticism!

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum