Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeAgent #6

Closed
davehodg opened this issue Jan 9, 2015 · 36 comments
Closed

FreeAgent #6

davehodg opened this issue Jan 9, 2015 · 36 comments

Comments

@davehodg
Copy link

davehodg commented Jan 9, 2015

My clone is sufficient to get data into FreeAgent.
The code is nasty, since I'm not a JavaScript guy (yet), the date stuff should have a hash for month, and/or got through a Date object, but hey.
Feel free to plunder (and make useful to people) or not!

@AlfieGreen
Copy link

Thanks Dave, that is exactly what I'm looking to pull it into!

How do I go about setting this up?

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

I've created a pull request, there should be instructions in there. Probably just a merge. But you'll definitely want to tidy up the JS!

@AlfieGreen
Copy link

I feel I might be doing something wrong, I just can't get it to pull the CSV file at the end for me.

So, I've cd'ed into: cd /Users/Alfie/Downloads/barclays-bank-pdf-to-csv-master/ - which works

Then, npm install

Which brings the below up:

Alfies-Macbook-Pro:barclays-bank-pdf-to-csv-master Alfie$ npm install
[email protected] node_modules/async

Then I open the index file, and drag the PDF's in, but still no joy from there, it pulls in the pdf, but doesn't render the final file?

Any ideas?

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

Sadly, no.
Are you using the original or my fork?

@AlfieGreen
Copy link

Trying with your one, but also tried the original! Is it working for you?

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

I just used the command-line version. Worked quite well. Now in FreeAgent categorising everything!

@AlfieGreen
Copy link

Did you do anything different from the above to me? Sorry I've really got myself stuck with it haha!

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

node statement-parser ../Statements/
No web necessary.

@AlfieGreen
Copy link

Sorry to be thick, I'm hoping you can help me get it running!

So, in terminal: git clone https://github.com/penrosestudio/barclays-bank-pdf-to-csv.git

Which installs it, then npm install, which just gives an error:

npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT, open '/Users/Alfie/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! System Darwin 14.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/Alfie
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! path /Users/Alfie/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/Alfie/npm-debug.log
npm ERR! not ok code 0


If I try: node statement-parser <Users/Alfie/Statements> I get the error:
-bash: syntax error near unexpected token `newline'

Did you do anything different? Am I missing a step?

Thanks

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

You don't appear to be in the barclays-bank-pdf-to-csv directory! you're in /Users/Alfie :)

Caught me first time too!

@jayfresh
Copy link
Member

jayfresh commented Jan 9, 2015

good catch! I was literally typing that out :)

@AlfieGreen
Copy link

Ah I see! So do i need to redirect this with cd?

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

As I noted above:

node statement-parser ../Statements/

Where you have cd-ed to the barclays directory and ../Statements/ contains the PDFs...

@AlfieGreen
Copy link

I thought I had done this, apologies again for my lack of understanding of this!

cd /users/Alfie/barclays-bank-pdf-to-csv

node statement-parser /Statements/

Which is where my folder is, however it still pulls the below error?

module.js:340
throw err;
^
Error: Cannot find module 'async'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/Users/Alfie/barclays-bank-pdf-to-csv/statement-parser.js:2:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
Alfies-MBP:barclays-bank-pdf-to-csv Alfie$

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

That should be in ./node_modules/async/lib/async.js

@AlfieGreen
Copy link

Okay, I've resolved that...

However, now it is showing:

Alfies-MBP:barclays-bank-pdf-to-csv Alfie$ node statement-parser /Statements/

/Users/Alfie/barclays-bank-pdf-to-csv/statement-parser.js:12
var pdfs = files.filter(function(fileName) {
^
TypeError: Cannot call method 'filter' of undefined
at csvPieces (/Users/Alfie/barclays-bank-pdf-to-csv/statement-parser.js:12:22)
at Object.oncomplete (fs.js:108:15)
Alfies-MBP:barclays-bank-pdf-to-csv Alfie$

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

There's something weird going on here. I worked for me straight away.
I would recommend installing a fresh node (or npm update), cloning a new set of software and trying from scratch,

@AlfieGreen
Copy link

I did just try this, and the same error is coming up again and again... If not that error, it's telling me the folder doesn't contain any PDF's.

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

What command are you using to invoke?

@AlfieGreen
Copy link

I'm slightly unsure as to what you mean?

The full reading is:

node statement-parser /Statements/

or

node statement-parser /Users/Alfie/barclays-bank-pdf-to-csv/Statements/

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

And you're positive you have *.pdf in there?

@AlfieGreen
Copy link

Inside /Statements/ is 5 .pdf files only, nothing else in the folder!

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

And they're definitely Barclays business? I accidentally downloaded personal the first time...

@AlfieGreen
Copy link

All business yep!

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

All i can say is works for me and delegate to the software owner :(

@AlfieGreen
Copy link

It's really annoying as I have around 1,500 lines in these statements I want to transfer into a CSV file/Freeagent... Just can't just past this step. Even in the web only verison nothing seems to come up! Thank you for your help though!

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

If we assume a non-disclosure, do you want me to try one?

@AlfieGreen
Copy link

That would be over and above what I would expect, and would be greatly, greatly appreciated if you could so do!

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

[email protected]

@AlfieGreen
Copy link

Thanks Dave, I've popped you an email!

@AlfieGreen
Copy link

I think I've resolved it! It was because the extension was .PDF not .pdf!

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

D'oh! OK, I'll delete your statement without opening

On Fri, Jan 9, 2015 at 9:17 PM, AlfieGreen [email protected] wrote:

I think I've resolved it! It was because the extension was .PDF not .pdf!


Reply to this email directly or view it on GitHub
#6 (comment)
.

@AlfieGreen
Copy link

Thanks Dave! Hopefully it will help anyone else who stumbles across the same problem!

@davehodg
Copy link
Author

davehodg commented Jan 9, 2015

File a bug :)

The author is awake :)

On 9 Jan 2015, at 21:32, AlfieGreen [email protected] wrote:

Thanks Dave! Hopefully it will help anyone else who stumbles across the same problem!


Reply to this email directly or view it on GitHub #6 (comment).

@jayfresh
Copy link
Member

yup, will fix that

@jayfresh
Copy link
Member

Closing as we have a separate issue (#9)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants