Jump to content

MuppetGate

Member
  • Posts

    132
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by MuppetGate

  1. Actually, it probably won't find a couple of other artists for the same reason.

     

    Even after checking the location of the library and a couple of CMD+R resets, the mini player refused to see this artist, but I can find his track by name.

     

    There are two artist fields in the track meta date:

     

    Artist

    Album Artist

     

    Although the Artist field is set to Isaac Delusion, the Album Artist field is set to 'Various Artists'. When I change that field to 'Isaac Delusion', the Mini-player can now see the artist.

     

    Not quite sure what's going on here, but I suspect that Alfred only looks for the artist name in Album Artist field.

     

    Anyway, I think Alfred should index on both fields.

     

  2. Right, that was a mostly a bug. Turns out that the decision to supply the current time to anniversaries was not a good one. 

     

    I've tuned up the formatting stuff (ymwdhMs) but due to uneven months, it's never going to be as accurate as just going for 'long' as the format, which calculates the whole thing in one go.

     

    A new version (1.4) is now up on Packal.

     

    You should delete Iva's anniversary and create it again.

     

    P.S.

     

    I've also added start_bst and end_bst for British Summer time.

     

    For example:

     

    dcalc start_bst

  3. Quick question:

     

    Did you mean '29 years' in your last example?

     

    In any case you shouldn't have 12 months as part of any answer. I think this probably due to a rounding error in the calculation of the formats that are not 'long' (which is more accurate because it is calculated differently). 

     

    I'll look into it.

  4. And finally, version 1.3!

     

    The big change is that the function call go at the end, so instead of this:

     

    dcalc wn today

     

    You now write this:

     

    dcalc today wn

     

    I made the change to save keystrokes mainly; you now don't have to tap your way back to the start of the command to change the function, and it's not really a function; it's a bit of formatting that should really happen at the end of the calculation

     

    dcalc alfred + 1d wd

     

    That will tell you the day of the week one day after Alfred's next anniversary.

  5. Hi Shawn.

     

    Even after I update the Packal Updater, it still reads as version 0.4 and says it can still be updated to version 1.0

     

    This is both from inside Alfred and the GUI.

     

    Something I'm missing?

  6. Right, we're up to version 1.2 with clearer instructions regarding the addition of anniversaries.

     

    I've also revamped the anniversary function so it doesn't choke if someone's birthday is on the 29th of February, but bear in mind that the next occurrence of this anniversary might be further away than you think.

  7. :D

     

    It doesn't work for me :(

     

    I followed the instructions above, but "dcalcset list add dean xx-xx-xxxx" give me an "Invalid command" error :(

     

    "dcalcset format" now appears to be an unknown command :(

     

    You also appear to have removed the download link from the OP. It's got links to all the stuff you used to make the workflow (apart from Smirnoff), but there doesn't appear to be one to the actual workflow any more!

     

    Okay, I imagine you're entering in the correct date format. 

     

    The dcalcset format seems to be okay at my end too.

     

    I'll try loading it from packal to make sure I haven't missed anything.

     

    Are you running with Python 2.7?

  8.  

    Nice.  

     

    I've made a couple modifications you might consider:

     

    I added one line to the DATE_MAPPINGS array in date_format_mappings.py - very clear code that was easy to customize:

     

       
     'yyyy-mm-dd':{'name': 'long inverted US date (-)','date-format':'%Y-%m-%d','regex':'\d{4}-\d{2}-\d{2}'},
    
     
    I added an additional Applescript output from the dcalc script filter with a shift modifier to open Fantastical to the calculated date, with the following very simple script:
     
    on alfred_script(q)
      	tell application "Fantastical"
    		parse sentence (q)
    	end tell
    end alfred_script
    

    This makes for a nice quick way to quickly calculate a date and immediately start adding an event or checking what's on my calendar for that date.

     

     

     

     

    Thanks very much for that.

     

    I'll add in the date format (not sure how I managed to miss it to be honest).

     

    I figure that any additional outputs should be pretty easy for anyone to add; that's why I decided to keep the extra text down to a minimum, and tried to make it easy to parse. But a great suggestion, and I'm going to try out Fantastical.

  9. I've never understood the aversion to the indenting thing. I mean, don't you indent code in other languages properly, too?

     

    Or am I just excessively anal about indentation in all my code because I mostly write in Python?

     

    Oh, I always indent code, but I've never come across a language that uses whitespace to decide intent. I'm used to stuff like IF ... ENDIF or braces for that kind of stuff. It just struck me as really bizarre. Still, I also like cheese and jam in the same sandwich, so what is really just a language quirk didn't strike me as  a good reason not to give it a go.

     

    Having played with Python for a week or so, here's what I've noticed about this whole whitespace thing:

     

    Because I don't have to use extra statements to denote the end of a code block, I type less code. If it really bothered me that much, I figured I could always put in a comment to fake it. (#ENDIF for example). As it happened, it took about five minutes to get used it, so I didn't bother.

     

    In my opinion, Python code is the easiest to read. It is much easier to see the structure of properly-indented code if extraneous stuff, like endifs and brackets, is taken out. This is just my opinion of course.

     

    So I'm something of a convert, I think.

     

    :)

×
×
  • Create New...