Script for basic CSV to QIF conversion

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Script for basic CSV to QIF conversion

John Mason
Simple Bash script to convert from CSV to QIF. I use it, figured someone
else might want to try it to see if it helps them with transaction imports.

Filename: mkqif.sh
Type: Ascii text (BASH Script)
Original Author: John A. Mason
Purpose: Simply create a CSV file (comma separated text) any way you
wish. Then make it match the template formula (you can get a copy of the
template to see some examples and instructions by using the -x
command-line parameter). Then run mkqif on that csv file to create a QIF
file for importing into gnucash. (My version is 1.2.6.1-2)

Features:
     fault-tolerant about values in fields
     Multiple options depending on how your bank provides CSV or just
copy/paste to CSV
     Supports auto-account classifications (can assign transactions
to/from particular accounts from csv)
     Supports split transactions from CSV (see template.csv for
details.... -x CLI parameter)
     Built-in Help option (mkqif -h will show basic help, mkqif -x will
show detailed help within the template.csv)

License: Don't care, just leave my original author line alone and do
what you will with the rest.

Hope this helps someone.
--
John A. Mason
       

-:----::::::///+o+//+/////++ooo+/:+shhyhyyhdmdmNmNNmddh+:/++s+////:///:++ooo++o+++++++++++///++o++++
::::::::://///++oosso++++///://+o/+ohyhmdhhdNNmmdddmddy/-://+:::/::::///++osooooosso++++++++//++/++/
//::::::-::/++++ossssss+/:-----:////yhyhhhydmmmmdmhdhhs/---:::------:://+syyysyhhyyssoo+////////+++o
:::://:://++yyyyys+////::-::-.--::-:ohddyhdmmmdmmmdhhyo/-----:-:-...-:::::///+++sshhhhys+//://///++o
///////::+syhhys+/-.-----....`.-..-./hhmddddmddddmdhhyo/.----:::-.--//+///::----:/ossooo++/::::///++
+///::://+oyys/:----://::-.``...-..`:yhdhhhddmmddmmdhhy/-.---::::://+ooo+oo+/-::--:+o+ooo+//:/++++++
//++//://+os+:---:+osso+:::-......`.:osdddhhhdddhmddhhh/--:----:/+oymNmmNNmdNdys+--/++oso++++o++ooos
/+++++o+oso+/-:oydNddmmmdhy/:-.....-:/ohhhyhhyyyyyyyyyh+/:-::-::/omMMddmNmdyhmNNmyooosyssso++/+++oss
++++++osyyoooohNMMdyhdNNdymm+:.`.--:/oyhyhyhysosyssosyyyy+:::::/+hMMNddmmmhsydMMMmyoosyyyhhysooooo+o
++++++osyso/::+yNMmssyhhhhNMh:-.---:+ysyyyyhssosyysyhhysyo///:/oyNMMMNmmdhhhmMMNy+--:+syhhdhoossooos
/+/+syysys+-..-/smMmdhhdmNNMNh/:--:/+syyyyhysoooysoyssyysso+/++shMNMMMMMMNNMMNdy/-`.-:+sysyhyhyoosss
///+ooooso/-.``.:+ymmNNNNNNMMmo++/:/ossyyyysos+oysyysysyso+//oyyhNNNdyhdddddhs/:--...-/ooo+osssyo+//
////+//oo++/-....-:/+ossooosmdo++/:/osssysyyososhsyssssssoo+:+yyssoo+///////:::::::--:/++///+//+//::
--------:/+/::---...-:-:::-/o+ssso//+oo+osssssyyhsyssso+ooossyss+:::::/::-::::-:--::::::------------
-.......-:://o/:-..-::------:/osso++///++oosyyhyyyysoso+o/+ossoo+/::/:::::::/:::///:///::-..--------
-.......--:/+++/:---::-----:://o++++++++ossyyyyyyhysooos++++///++/:-:::::://://///++/+/:--.---------
-........-:////+//:::-------:/+o++/+//++oosysyyyyyyyso++++///++++//-::::-:///+ooo+++/:::----.....---
..........-:///++:/+::-----::/+////////+ossyshhhhhyyss+/////////+//:-------:////++/+/::-----.-.-.---
...........--::/:::--------::///::::/++osssyyhhdhhyyso++/:://///+//::------.--:::::::--------......-
.........................---:::::::/+oossyyyyhhyhyysss+++/:::::/::-----........-----------....------
..................````.....---:---:/ossyyyyyyhhyhhhyyyso+//:---:-----...........--..........--------
..................``````.....-----/+osyyyyyyyyhhhhhhyhyyo+/:------.-.............-------.....--:----
.................````````.....---:/oyhhhyysyyyyyyhhhhhhhso+:----...............---..---.......-----.
.......```.......```````..``....-/oydhyyyhhhhhhhhyhhyhhhyo+/---.................---.---.......------
.............`..`````...````....:+oyhhhhhhhhyhhhyyyhdyyyys+/:-...................---........--------
................````...````....--/sysyssssso+++o++osysoso+::-........``...............--------------
-.................`````````.....-/++///+oosyyysysso+++++//:-..........``............------------..--
.................````````````.---::/+shdmmmmNNNNNNmmdyo////:-.`....`..``.....-..------------------..
................``.`..````````.-:/+hmNMNNNNNNNNNMMMMMMNds:-..```.......`...-----...---------:---....
......-------.....```.`````````.:smNNNNNNNNNNNNNNNMMMMNNNh:..``.....`.........------------:::::---..
....---------......-.---```````-smmNNNNNNMMMMMMMNMNMMNNNNmy/.``.............--::::::-----:::::-----.
-.-----:::::--....--..`.```````/mmNNMNNMMMMMMMMMMMMMMMMNNmNo.``........---..-:shhyo/:----:+/::------
---....--------...--/-.``..````+mNMMNNMNNNNNMMMMMMMMMMMMMNmo.```......--::://hNNmy+:----:-:-:::-----
--...--.....----..-:+o:-...````:dMMMMMMMMNNNMMNNMMMMMMMMMmh-.`..........--:+yNMMds+/:--:------------
---................-:++-...`````omMMMMMMMMNNMMMMMMMMMMMMMdo..-...-......---smNMNy+:--------.....-..-
...--...............-:+o....``...hMMMMMMMMNNMMMMMMMMMMMMNs-----.....-----:hNmdMdo/----.....-...---..
..--:---.............-/o/...```..-sNMMMMMMMMMNNNMMMMMMMd+-:--....--.....-oNNdyNy+---...-........---.
-::::--........`.....-:+s+....`.--./yNMMMMNMMMNNMMMMMmh+-------........-oNMmyydo/--....-.........---
::::--................-/oys:.`.```.-:odmNMMMMMMMMMNNmho+:----..---.```.+mMMNddy+:-..................
/::--..................:/ohd+-.``...-ohmNNMMMMMMMMNNmmy+/:------.....:yNMMMmhh+:-...................
/:--...................-:/ohNd+-.`..-+yhdhdddmdmmmmddyo+//:::-----.:omMMMMMNdo:.....................
/:-......................:/ohMMdo/---:++ooshdmmmmmddyso+o++://::::/mMMMMMMNmh/......................
/:--..................`...:/odMMN/-+o:/oshNNMMMMMMMMMMNNNNmsdy+yoo+NMMMMMMmmo.`.....................
/::--....................`.-:+NNN:`-yyydNMNNNNNNNMMMNNNNNNNmhyosso+mMMMMNNmy-.......................
::::----...................-:/ymm+`.:sdmNNNNmmmNNNNMmmmmmmddhy+////yNMNNdmy:....---.................
::::::---....`.........``...-/sdhh.`-+yyhddmmmmmmmNNmddddddhhy+:/::yMMNmhs:.........................
---::::--..........`..``````./oyhMs`-:osyhhddddddmmmmdddddhhyoo+/+hNNmdy/-.................``.......
-----------..........``......:sssmdy:/sosyyyhhddhdddmdddhhhyysmNNmdddhs+-`.................``.......
------------.................-+sshhNmdmdoossyhyhhhhhdddhhhhyssMMNy+++/:-....................`.......
--------------..............`.-:+dhdNMMNhsosyyyyyyyyhhhhhyyysdNms::--.............................--
--------------.....`......`.``..:dmmmmNMMMNdyyyyyyyyyyhhyyssdNh/-....``............................-
---------------.-.............``.:ydhsMMMNMMMmhyyyysysyysydmh+-..````.``............................
-----------------................`./shdNMMMNMMMNNmmmNNMNNmy/.```..```````..............-............
-----------------................````-:shmNymMMMMMMMMNmy+-.``..`...````.`.............--.--....-....
-----------------.................``...`.-:+osyhyyso+-.```````.``...```.............--------........
.------------------........................```````````````````.`````.`...............--..---........
---------:-----------.........................`````...`.`````...`````................--....-........
....----::--------------................-.......`..........`....```...........----....--............
....----::---------:------...........................-.....`.`................----..................



_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

mkqif.sh (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Script for basic CSV to QIF conversion

whwtan
Does anyone else use professional solutions for CSV to QIF/OFX?

I actually use a paid product [Very reasonable price to me on an
individual level] and would be happy to share the link or get
recommendations of better competing alternatives.


On 5/3/2015 4:29 AM, John Mason wrote:

> Simple Bash script to convert from CSV to QIF. I use it, figured
> someone else might want to try it to see if it helps them with
> transaction imports.
>
> Filename: mkqif.sh
> Type: Ascii text (BASH Script)
> Original Author: John A. Mason
> Purpose: Simply create a CSV file (comma separated text) any way you
> wish. Then make it match the template formula (you can get a copy of
> the template to see some examples and instructions by using the -x
> command-line parameter). Then run mkqif on that csv file to create a
> QIF file for importing into gnucash. (My version is 1.2.6.1-2)
>
> Features:
>     fault-tolerant about values in fields
>     Multiple options depending on how your bank provides CSV or just
> copy/paste to CSV
>     Supports auto-account classifications (can assign transactions
> to/from particular accounts from csv)
>     Supports split transactions from CSV (see template.csv for
> details.... -x CLI parameter)
>     Built-in Help option (mkqif -h will show basic help, mkqif -x will
> show detailed help within the template.csv)
>
> License: Don't care, just leave my original author line alone and do
> what you will with the rest.
>
> Hope this helps someone.
>
>
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: Script for basic CSV to QIF conversion

whwtan
In reply to this post by John Mason
Sorry John,

I forgot to mention:
Thank you for the script.

On 5/3/2015 4:29 AM, John Mason wrote:

> Simple Bash script to convert from CSV to QIF. I use it, figured
> someone else might want to try it to see if it helps them with
> transaction imports.
>
> Filename: mkqif.sh
> Type: Ascii text (BASH Script)
> Original Author: John A. Mason
> Purpose: Simply create a CSV file (comma separated text) any way you
> wish. Then make it match the template formula (you can get a copy of
> the template to see some examples and instructions by using the -x
> command-line parameter). Then run mkqif on that csv file to create a
> QIF file for importing into gnucash. (My version is 1.2.6.1-2)
>
> Features:
>     fault-tolerant about values in fields
>     Multiple options depending on how your bank provides CSV or just
> copy/paste to CSV
>     Supports auto-account classifications (can assign transactions
> to/from particular accounts from csv)
>     Supports split transactions from CSV (see template.csv for
> details.... -x CLI parameter)
>     Built-in Help option (mkqif -h will show basic help, mkqif -x will
> show detailed help within the template.csv)
>
> License: Don't care, just leave my original author line alone and do
> what you will with the rest.
>
> Hope this helps someone.
>
>
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: Script for basic CSV to QIF conversion

Michael DeBusk-2
In reply to this post by whwtan
On Fri, Mar 6, 2015 at 10:43 PM, whwtan <[hidden email]> wrote:

> Does anyone else use professional solutions for CSV to QIF/OFX?

I have used this, and it works well: http://csvconverter.gginternational.net/

--
()  ascii ribbon campaign     * against html e-mail
/\  www.asciiribbon.org       * against proprietary attachments
Home: http://nlphilia.com     * Blog: http://nlphilia.net
Registered Linux User #450983 * Ubuntu Counter Project #10548
_______________________________________________
gnucash-user mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.