Registered Member
|
Hi,
I've written a AWK filter to convert a CSV to QIF file. KMM baulks at the Date. "15/12/2010" format. I have set the format to %d/%m/%yyyy in the KMM QIF filter screen, but am prompted to make a choice once I have clicked "import"; I understand this happens when KMM can't make sense of the date format. I select %d %m %y, KMM then proceeds but fails to add any records to the account but gives no error message ? What I find odd is, I can use the filter from the cmd-line(Gawk) to create a QIF file from the CSV account and then successfully read the QIF file in to KMM using the "default" QIF setting. My filter line reads "gawk -f /media/truecrypt1/Finance/#Fiscal 10-11/Nationwide/csv2qif.awk" Any help appreciated Chris KDE Development Platform 4.5.85 (4.6 Beta2) Opensuse 11.3(Factory) |
KDE Developer
|
Do I see blanks in filenames? Make sure to quote them correctly. Otherwise this will not work properly.
BTW: KMyMoney 4.5 (trunk I think) has a CSV importer, so no need to reinvent the wheel.
ipwizard, proud to be a member of the KMyMoney forum since its beginning.
openSuSE Leap 15.4 64bit, KF5 |
Registered Member
|
Hi ipwizard,
Thanks for the reply. I used "CutnPaste" to input the file path to the Email,so as is. gawk -f /media/truecrypt1/Finance/#Fiscal 10-11/Nationwide/csv2qif.awk Anyway I did as you suggested and removed the space from the file path /media/truecrypt1/Finance/1Fiscal_10-11/Nationwide/ and replaced it with "_" using "Rename" in "Dolphin"; Then something also changed the "#" to a "1" Import works fine now. Where does the rule of no spaces in file path come from, shouldn't the system(Opensuse/KDE) flag/stop Wallys like me from doing this. Thanks Chris |
KDE Developer
|
Short version: see the bash manual
Long(er) version: how should any system decide if the space in your filename has a different meaning than the filename between the arguments to gawk? As a general rule of thumb: blanks in filenames or even directory names are a (very) bad habbit. Avoiding them safes a lot of time.
ipwizard, proud to be a member of the KMyMoney forum since its beginning.
openSuSE Leap 15.4 64bit, KF5 |
Registered Member
|
Hi ipwizard,
Thanks for the explanation, just slipped into this bad habit as it looked nice/readable . Chris |
Registered Member
|
If you absolutely must have blanks in file names (old Windows addiction...) you need to protect them with a backslash in shell commands: cat a\ b\ c
|
Registered Member
|
Thanks Zebulon
Not an "old Windows addiction". Just old Chris Z80+2k+Eprom = Addiction |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]