Jump to content
JamesOff

You Need a Budget - category check

Recommended Posts

This is a workflow which lets you look up how much you have left in a You Need a Budget (http://www.youneedabudget.com) category for the current month.

 

It looks for your budget file in ~/Dropbox/YNAB and ~/Documents/YNAB. If you have a single budget in one of those folders, it will use that and needs no configuration. If you have multiple budgets, or a budget somewhere else, you can use a File Action on it to select it as the budget to use.

 

Fuzzy/substring matching, tries to use the currency symbol/format based on the budget's configuration.

 

Hacked up the code to parse the YNAB data myself, so please make sure that it's reporting accurately for you and let me know if not!

 

Screen%20Shot%202013-07-19%20at%2023.23.

 

Screen%20Shot%202013-07-19%20at%2023.21.

 

Download here: http://cloud.jamesoff.net/0J2t2614191h (Updated 2014-10-21)

 

(System Python, no extra dependencies or libraries required.)

Edited by JamesOff

Share this post


Link to post

This looks really good. However, I'm having trouble using the file action. I navigated to my .ynab4 file with Alfred and used the file action, but then my Growl notification came up with the title "YNAB Budget Lookup" and no other text. Then when I try and use the workflow ('budget xyz') it says 'Use Alfred's file action to...' etc. What's going wrong?

Share this post


Link to post

I'm not sure what's up with the File Actions not working right :(

 

In the meantime I'll put in a different method for pointing it at your budget file, watch this space!

 

Edit: here it is: http://cl.ly/400k1H0Q1s29

 

There's now a "budgetlocation" keyword which takes the full path to your budget file as a parameter. You can also use "auto" as the parameter to make it go back to the default auto-detect mode.

 

(An easy way to get the path: search for your budget file in Alfred like above (activate Alfred and then put in '.ynab4), and then hit the right arrow and choose "Copy path to clipboard".)

 

Sorry it's a bit of a kludge for now!

Edited by JamesOff

Share this post


Link to post

I tried your new download and the same problem occurred. I figured out that the problem was probably therefore to do with my file path name. Turns out that as soon as I renamed Ben's Budget-sdflgpert.ynab4 to Budget-sdflgpert.ynab4 it was all fine. So either the apostrophe or the space is causing problems in the name.

 

But then I have a problem when I look up budgets using your workflow. For most categories, it tells me I have overspent when in fact I haven't. Otherwise it just gives me a figure which is incorrect in some way, and for only a few categories is the number corrent. Any idea what's going on here?

Share this post


Link to post

Ok, that sounds like something that'd cause problems - my budget file is just called "My Budget". I'll take at look at that.

 

No idea why it would say what it's saying about your budget categories though - I had to reverse engineer the data file and parse it myself, so if there's something you're doing in your budget I don't have in mine that could confuse it. Are you using YNAB in a reasonably straightforward fashion? Unfortunately the best way for me to look in to it is for you to send me your budget file (or, if you can make a demo budget file which reproduces the problem, that).

Share this post


Link to post

Hi James,

 

Can you fix the link... its broken. Tnks.

 

Just tested the link in my post above, and the one in the first post (which is the same) and both seem to work OK to me. 

Share this post


Link to post

Please ... how do I install this workflow? it doesn't have a .alfredworkflow file that I can click. I just bought the power pack a week ago and I managed to install it somehow, but I removed it to reinstall and now I don't remember how to do it. I feel dumb ... please help!

Share this post


Link to post

Please ... how do I install this workflow? it doesn't have a .alfredworkflow file that I can click. I just bought the power pack a week ago and I managed to install it somehow, but I removed it to reinstall and now I don't remember how to do it. I feel dumb ... please help!

 

Click the link in my post, then on the page which opens click the "YNAB budget check.alfredworkflow" button which will download it. Then, find it in your Downloads folder and open it and Alfred will pop up to install it.

Share this post


Link to post

Any chance you could support multiple budgets? I have two budget files, one for my freelance business and another for personal. This would be awesome to have access to both with 2 separate workflows!

 

— C

Share this post


Link to post

Any chance you could support multiple budgets? I have two budget files, one for my freelance business and another for personal. This would be awesome to have access to both with 2 separate workflows!

 

— C

 

I'll have a think about how I'd do this but I'm sure I can make it work. (Edit: added as an issue on GitHub to remind me: https://github.com/jamesoff/alfred-ynab/issues/1 )

 

I've just posted an update which fixes (hopefully properly this time) parsing of the budget when you have overspends. It also has some more speed improvements.

 

Download link: http://cloud.jamesoff.net/0J2t2614191h

Edited by JamesOff

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...