qiflib 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/html/Qiflib/Category.html +338 -354
- data/html/Qiflib/Date.html +362 -368
- data/html/Qiflib/Money.html +284 -291
- data/html/Qiflib/Transaction.html +800 -813
- data/html/Qiflib/Util.html +478 -623
- data/html/Qiflib.html +308 -314
- data/html/README_rdoc.html +210 -218
- data/html/index.html +234 -246
- data/html/lib/qiflib_category_rb.html +38 -38
- data/html/lib/qiflib_constants_rb.html +40 -41
- data/html/lib/qiflib_date_rb.html +38 -38
- data/html/lib/qiflib_money_rb.html +38 -38
- data/html/lib/qiflib_rb.html +50 -51
- data/html/lib/qiflib_transaction_rb.html +38 -38
- data/html/lib/qiflib_util_rb.html +38 -38
- data/html/rdoc.css +365 -308
- data/lib/qiflib_constants.rb +2 -2
- metadata +12 -7
data/html/README_rdoc.html
CHANGED
@@ -1,244 +1,236 @@
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
2
2
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
-
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
4
|
|
5
5
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
6
6
|
<head>
|
7
|
-
|
7
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
8
8
|
|
9
|
-
|
9
|
+
<title>File: README.rdoc [qiflib]</title>
|
10
10
|
|
11
|
-
|
11
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
<script src="./js/jquery.js" type="text/javascript"
|
14
|
+
charset="utf-8"></script>
|
15
|
+
<script src="./js/thickbox-compressed.js" type="text/javascript"
|
16
|
+
charset="utf-8"></script>
|
17
|
+
<script src="./js/quicksearch.js" type="text/javascript"
|
18
|
+
charset="utf-8"></script>
|
19
|
+
<script src="./js/darkfish.js" type="text/javascript"
|
20
|
+
charset="utf-8"></script>
|
21
21
|
</head>
|
22
22
|
|
23
23
|
<body class="file">
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
27
|
<h3 class="section-header">
|
28
28
|
<a href="./index.html">Home</a>
|
29
29
|
<a href="./index.html#classes">Classes</a>
|
30
30
|
<a href="./index.html#methods">Methods</a>
|
31
31
|
</h3>
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
Transaction parsing is supported, including address fields, and up to three
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
<p>
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
transactions into a sqlite3 database.
|
99
|
-
</p>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="project-metadata">
|
36
|
+
|
37
|
+
|
38
|
+
<div id="fileindex-section" class="section project-section">
|
39
|
+
<h3 class="section-header">Files</h3>
|
40
|
+
<ul>
|
41
|
+
|
42
|
+
<li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
|
48
|
+
<div id="classindex-section" class="section project-section">
|
49
|
+
<h3 class="section-header">Class Index
|
50
|
+
<span class="search-toggle"><img src="./images/find.png"
|
51
|
+
height="16" width="16" alt="[+]"
|
52
|
+
title="show/hide quicksearch" /></span></h3>
|
53
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
54
|
+
<fieldset>
|
55
|
+
<legend>Quicksearch</legend>
|
56
|
+
<input type="text" name="quicksearch" value=""
|
57
|
+
class="quicksearch-field" />
|
58
|
+
</fieldset>
|
59
|
+
</form>
|
60
|
+
|
61
|
+
<ul class="link-list">
|
62
|
+
|
63
|
+
<li><a href="./Qiflib.html">Qiflib</a></li>
|
64
|
+
|
65
|
+
<li><a href="./Qiflib/Category.html">Qiflib::Category</a></li>
|
66
|
+
|
67
|
+
<li><a href="./Qiflib/Date.html">Qiflib::Date</a></li>
|
68
|
+
|
69
|
+
<li><a href="./Qiflib/Money.html">Qiflib::Money</a></li>
|
70
|
+
|
71
|
+
<li><a href="./Qiflib/Transaction.html">Qiflib::Transaction</a></li>
|
72
|
+
|
73
|
+
<li><a href="./Qiflib/Util.html">Qiflib::Util</a></li>
|
74
|
+
|
75
|
+
</ul>
|
76
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
|
80
|
+
</div>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
<div id="documentation">
|
84
|
+
|
85
|
+
<h2><a href="Qiflib.html">Qiflib</a></h2>
|
86
|
+
|
87
|
+
<p>A ruby library for reading and parsing qif files.</p>
|
88
|
+
|
89
|
+
<p>Transaction parsing is supported, including address fields, and up to three
|
90
|
+
“splits” per transaction. See the DDL, below, for the list of fields for
|
91
|
+
each transaction.</p>
|
92
|
+
|
93
|
+
<p>Category-name parsing is also supported.</p>
|
94
|
+
|
95
|
+
<p>Also includes DDL generation for importing the parsed categories and
|
96
|
+
transactions into a sqlite3 database.</p>
|
97
|
+
|
100
98
|
<h2>Install</h2>
|
101
|
-
|
102
|
-
|
103
|
-
|
99
|
+
|
100
|
+
<pre>gem install qiflib</pre>
|
101
|
+
|
104
102
|
<h2>Synopsis</h2>
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
... write sh_lines to a file; chmod 744; run it.
|
167
|
-
</pre>
|
103
|
+
|
104
|
+
<pre># Parse the transactions from one or more files to csv.
|
105
|
+
# Due to a discrepancy between the way iBank and Quicken export
|
106
|
+
# qif files, you need to specify either Qiflib::SOURCE_IBANK or
|
107
|
+
# Qiflib::SOURCE_QUICKEN as the :source.
|
108
|
+
|
109
|
+
input_list = []
|
110
|
+
input_list << {
|
111
|
+
:owner => 'Chris',
|
112
|
+
:filename => 'data/ibank_cj.qif',
|
113
|
+
:source => Qiflib::SOURCE_IBANK }
|
114
|
+
input_list << {
|
115
|
+
:owner => 'Teri',
|
116
|
+
:filename => 'data/ibank_tj.qif',
|
117
|
+
:source => Qiflib::SOURCE_QUICKEN }
|
118
|
+
|
119
|
+
csv_lines = Qiflib::Util.transactions_to_csv(input_list)
|
120
|
+
|
121
|
+
... write csv_lines to a file
|
122
|
+
|
123
|
+
# Parse the transactions from one or more files to ^-delimited text.
|
124
|
+
# The text lines are suitable for loading to sqlite3.
|
125
|
+
|
126
|
+
input_list = []
|
127
|
+
input_list << {
|
128
|
+
:owner => 'Chris',
|
129
|
+
:filename => 'data/ibank_cj.qif',
|
130
|
+
:source => Qiflib::SOURCE_IBANK }
|
131
|
+
|
132
|
+
delim_lines = Qiflib::Util.transactions_to_delim(input_list)
|
133
|
+
|
134
|
+
... write delim_lines to a file
|
135
|
+
|
136
|
+
# Parse the categories from one or more files to csv.
|
137
|
+
|
138
|
+
input_list = [ 'data/ibank_cj.qif' ]
|
139
|
+
csv_lines = Qiflib::Util.catetory_names_to_csv(input_list)
|
140
|
+
|
141
|
+
... write csv_lines to a file
|
142
|
+
|
143
|
+
# Parse the categories from one or more files to ^-delimited text.
|
144
|
+
# The text lines are suitable for loading to sqlite3.
|
145
|
+
|
146
|
+
input_list = [ 'data/ibank_cj.qif' ]
|
147
|
+
delim_lines = Qiflib::Util.catetory_names_to_delim(input_list)
|
148
|
+
|
149
|
+
... write delim_lines to a file
|
150
|
+
|
151
|
+
# Generate the DDL for a sqlite3 database with categories and transactions tables.
|
152
|
+
|
153
|
+
ddl_lines = Qiflib::Util.generate_sqlite_ddl
|
154
|
+
|
155
|
+
... write ddl_lines to a file; use it in the following bash-shell script
|
156
|
+
|
157
|
+
# Generate a bash-shell script to load the categories and transactions
|
158
|
+
# delimited files into a sqlite3 database, using the above DDL.
|
159
|
+
|
160
|
+
sh_lines = Qiflib::Util.generate_sqlite_load_script
|
161
|
+
|
162
|
+
... write sh_lines to a file; chmod 744; run it.</pre>
|
163
|
+
|
168
164
|
<h2>Generated DDL</h2>
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
165
|
+
|
166
|
+
<pre># DDL file for sqlite3
|
167
|
+
|
168
|
+
drop table if exists transactions;
|
169
|
+
drop table if exists categories;
|
170
|
+
|
171
|
+
create table transactions(
|
172
|
+
id integer,
|
173
|
+
acct_owner varchar(80),
|
174
|
+
acct_name varchar(80),
|
175
|
+
acct_type varchar(80),
|
176
|
+
date varchar(80),
|
177
|
+
amount real,
|
178
|
+
number varchar(80),
|
179
|
+
ibank_n varchar(80),
|
180
|
+
cleared varchar(80),
|
181
|
+
payee varchar(80),
|
182
|
+
category varchar(80),
|
183
|
+
memo varchar(80),
|
184
|
+
split1_amount real,
|
185
|
+
split1_category varchar(80),
|
186
|
+
split1_memo real,
|
187
|
+
split2_amount varchar(80),
|
188
|
+
split2_category varchar(80),
|
189
|
+
split2_memo varchar(80),
|
190
|
+
split3_amount real,
|
191
|
+
split3_category varchar(80),
|
192
|
+
split3_memo varchar(80),
|
193
|
+
address1 varchar(80),
|
194
|
+
address2 varchar(80),
|
195
|
+
address3 varchar(80),
|
196
|
+
address4 varchar(80),
|
197
|
+
address5 varchar(80),
|
198
|
+
address6 varchar(80),
|
199
|
+
eol_ind char(1)
|
200
|
+
);
|
201
|
+
|
202
|
+
create table categories(
|
203
|
+
id integer,
|
204
|
+
name varchar(80)
|
205
|
+
);
|
206
|
+
|
207
|
+
.separator '^'
|
208
|
+
|
209
|
+
.import qiflib_transactions.txt transactions
|
210
|
+
.import qiflib_categories.txt categories</pre>
|
211
|
+
|
216
212
|
<h2>Generated shell script </h2>
|
217
|
-
<pre>
|
218
|
-
# bash-shell script
|
219
213
|
|
220
|
-
|
214
|
+
<pre># bash-shell script
|
215
|
+
|
216
|
+
#!/bin/bash
|
217
|
+
|
218
|
+
sqlite3 qiflib.db < qiflib.ddl</pre>
|
221
219
|
|
222
|
-
sqlite3 qiflib.db < qiflib.ddl
|
223
|
-
|
224
|
-
|
225
|
-
</pre>
|
226
220
|
<h2>Copyright and License</h2>
|
227
|
-
|
228
|
-
Copyright
|
229
|
-
|
230
|
-
<p>
|
231
|
-
|
232
|
-
|
233
|
-
</
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
Rdoc Generator</a> 1.1.6</small>.</p>
|
241
|
-
</div>
|
221
|
+
|
222
|
+
<p>Copyright 2013, Chris Joakim <cjoakim@bellsouth.net>.</p>
|
223
|
+
|
224
|
+
<p>GNU General Public License (GPLv3) license. See <a
|
225
|
+
href="http://www.gnu.org/copyleft/gpl.html">www.gnu.org/copyleft/gpl.html</a></p>
|
226
|
+
|
227
|
+
</div>
|
228
|
+
|
229
|
+
<div id="validator-badges">
|
230
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
231
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
232
|
+
Rdoc Generator</a> 2</small>.</p>
|
233
|
+
</div>
|
242
234
|
</body>
|
243
235
|
</html>
|
244
236
|
|