Lets consider these files (1):
!Type:Bank
D03/03/10
T-379.00
PCITY OF SPRINGFIELD
^
D03/04/10
T-20.28
PYOUR LOCAL SUPERMARKET
^
D03/03/10
T-421.35
PSPRINGFIELD WATER UTILITY
For this file library works:
{ transactions:
[ { date: '2010-03-03',
amount: -379,
payee: 'CITY OF SPRINGFIELD' },
{ date: '2010-04-03',
amount: -20.28,
payee: 'YOUR LOCAL SUPERMARKET' },
{ date: '2010-03-03',
amount: -421.35,
payee: 'SPRINGFIELD WATER UTILITY' } ],
type: 'Bank' }
But lets consider this file
!Account
NAlior GBP
TBank
^
!Type:Bank
D03/03/10
T-379.00
PCITY OF SPRINGFIELD
^
D03/04/10
T-20.28
PYOUR LOCAL SUPERMARKET
^
D03/03/10
T-421.35
PSPRINGFIELD WATER UTILITY
there is error
Error: File does not appear to be a valid qif file: !Account
at Object.exports.parse (/home/daniel/pro/open_cash_manager/local/node_modules/qif2json/lib/qif2json.js:47:15)
at Object.exports.parseInput (/home/daniel/pro/open_cash_manager/local/node_modules/qif2json/lib/qif2json.js:138:27)
at /home/daniel/pro/open_cash_manager/local/node_modules/qif2json/lib/qif2json.js:169:17
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
But
is described in specification there
https://en.wikipedia.org/wiki/Quicken_Interchange_Format
How it is parsed in other languages. For example for script
https://www.w3.org/2000/10/swap/pim/qif2n3.py
execution of this script on second file gives
# n3 Personal and confidential. Not for distrbution.
# From Quicken data in backup2.qif
# Extracted by $Id: qif2n3.py,v 1.8 2012-12-05 18:29:21 timbl Exp $
@prefix : <#>.
@prefix d: <#>.
@prefix s: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix qu: <http://www.w3.org/2000/10/swap/pim/qif#>.
# @prefix acc: <../../../Financial/Data/accounts.n3#>.
# @prefix cat: <categories.n3#>.
# @prefix cla: <classes.n3#>.
# Account information:
acc:Alior_GBP a qu:Account; s:label "Alior GBP"; qu:type "Bank"; qu:accordingTo <>; .
<#id1> qu:date "1910-03-03"; qu:amount "-379.00"; qu:payee "CITY OF SPRINGFIELD"; qu:accordingTo <>; qu:toAccount acc:alior_gbp .
<#id2> qu:date "1910-03-04"; qu:amount "-20.28"; qu:payee "YOUR LOCAL SUPERMARKET"; qu:accordingTo <>; qu:toAccount acc:alior_gbp .
<#id3> qu:date "1910-03-03"; qu:amount "-421.35"; qu:payee "SPRINGFIELD WATER UTILITY"; .
#ends
But for first file
# n3 Personal and confidential. Not for distrbution.
# From Quicken data in simple.qif
# Extracted by $Id: qif2n3.py,v 1.8 2012-12-05 18:29:21 timbl Exp $
@prefix : <#>.
@prefix d: <#>.
@prefix s: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix qu: <http://www.w3.org/2000/10/swap/pim/qif#>.
# @prefix acc: <../../../Financial/Data/accounts.n3#>.
# @prefix cat: <categories.n3#>.
# @prefix cla: <classes.n3#>.
# List of Bank
<#id1> qu:date "1910-03-03"; qu:amount "-379.00"; qu:payee "CITY OF SPRINGFIELD"; qu:accordingTo <>; qu:toAccount <accouts.n3#Default>; .
<#id2> qu:date "1910-03-04"; qu:amount "-20.28"; qu:payee "YOUR LOCAL SUPERMARKET"; qu:accordingTo <>; qu:toAccount <accouts.n3#Default>; .
<#id3> qu:date "1910-03-03"; qu:amount "-421.35"; qu:payee "SPRINGFIELD WATER UTILITY"; . acc:Default s:label "DEFAULT".
#ends
So differences are in lines
acc:Alior_GBP a qu:Account; s:label "Alior GBP"; qu:type "Bank"; qu:accordingTo <>; .
and property
insetead
Is this feature worth to consider? Should be implemented? If yes I propose the following format:
{ accounts: [ { name: 'Alior GBP', type: 'Bank' } ],
transactions:
[ { date: '2010-03-03',
amount: -379,
payee: 'CITY OF SPRINGFIELD', account: 'Alior GBP' },
{ date: '2010-04-03',
amount: -20.28,
payee: 'YOUR LOCAL SUPERMARKET', account: 'Alior GBP' },
{ date: '2010-03-03',
amount: -421.35,
payee: 'SPRINGFIELD WATER UTILITY', account: 'Alior GBP' } ],
}
if accounts are defined in file
- type: 'Bank' should be removed, because of any transaction has his own account and account has type
- accounts array should be added
- names of account should be considered as uniquer, if not throw exception
- any transaction should have his own property - account name
Question
Is community developing this package interested in implementing this feature?
Lets consider these files (1):
For this file library works:
But lets consider this file
there is error
But
is described in specification there
How it is parsed in other languages. For example for script
execution of this script on second file gives
But for first file
So differences are in lines
and property
insetead
Is this feature worth to consider? Should be implemented? If yes I propose the following format:
if accounts are defined in file
Question
Is community developing this package interested in implementing this feature?