Jump to content

bivalvegruff

Member
  • Content Count

    22
  • Joined

  • Last visited


Reputation Activity

  1. Like
    bivalvegruff reacted to shmulvad in Roman Numeral Converter   
    Okay, I didn't know that - thanks for letting me know!
    The workflow is now updated to use JSON. I'll agree with you, that is much cleaner.
  2. Thanks
    bivalvegruff reacted to shmulvad in Roman Numeral Converter   
    Roman Numeral Converter
    Convert between roman numerals and arabic integers
     
    Installation
    To download, visit the latest release at GitHub. All further updates are handled automatically.  
    Description
    This is a fairly simple workflow for converting between roman numerals and arabic integers. This has been made before by Tyler Eich (Packal link), but hasn't been updated since 2015 and stopped working on my computer during an Alfred or macOS update (can't remember which). But I had an use case for this, and therefore I made a new version written in Python for this simple task.
     
    In Alfred, type rn and enter either your roman numeral or arabic integer. Selected result is copied to your clipboard. 


     
     
    The expression is being evaluated as you type it. If the expression cannot be evaluated, for example if you are using illegal characters, user will be notified about that. 

     
    Note
    The workflow doesn't support incorrectly written roman numerals, i.e. "IC", and will also notify user about this:

     
    Credits
    The workflow makes use of the following code to focus on the implementation of the conversion between the number systems rather than focusing on a lot of Alfred Workflow related stuff.
    OneUpdater to easily check for updates by vitorgalvao. Alfred Workflow Feedback XML Generation to easily add items by lrrfantasy.  
     
  3. Like
    bivalvegruff reacted to luckman212 in Merge last "N" number of clipboards   
    Well, that was a long & winding road. I'm new to Alfred so I'm still figuring things out. I tried everything I could to avoid using a /tmp file but this was the only way that worked. Everything else—using variables, trying to process the clipboard buffers from within the workflow itself, using external triggers etc, all failed.
     
    This seems to be due to the way Alfred processes the query buffer as it passes through the workflow. Internally, a reference like `{clipboard:11}` will always return that exact text (e.g. if used in a comparison statement from bash or python) -- it only converts it to the actual clipboard value during OUTPUT actions such as Large Type or Write Text File. The 2nd problem is, if `{clipboard:11}` contains a NULL (empty) value, instead of returning BLANK (which would be expected), Alfred insists on instead outputting the dynamic placeholder itself. So, if you have only 5 clips and you ask for 10 to be merged, the last 5 will be written out as just `{clipboard:6}, {clipboard:7}...` etc.
     
    TL;DR I could not find a reliable way to test for "empty" values and omit them from the output other than using Write Text File and then processing it with sed. This works fine though, and the script cleans up the /tmp file after itself and is pretty quick about it.
     
    If anyone knows a better way I'm all ears. But I think this is something that would have to be fixed in Alfred itself.
     
    Here's the new version:
     
    changes
    omits empty strings from output if you request > clips than exist in the history configurable MIN_CLIPS and MAX_CLIPS variables added notifications for success/failure https://github.com/luckman212/clipmerge-alfred-workflow/blob/master/README.md
     
  4. Like
    bivalvegruff reacted to pawelgrzybek in Div — simple windows manager   
    Multiple screen support just landed.
     
    https://github.com/pawelgrzybek/div
    http://www.packal.org/workflow/div
  5. Thanks
    bivalvegruff reacted to luckman212 in Merge last "N" number of clipboards   
    Figured out a way - not sure if it's the "right" way but, it works well enough.
    I used a couple of bash scripts to validate/filter the input as well as loop & process the output.
     
    If you want to have a look... 
    (link removed, scroll down for the new version)
     

  6. Like
    bivalvegruff reacted to luckman212 in Merge last "N" number of clipboards   
    I'm trying to make a workflow that accepts a single parameter "N" (a number) and then uses that to merge the last N clipboards, and paste that to the frontmost app. Let's call it "clipmerge" and it uses keyword `cm`.
     
    e.g. "cm9" would take {clipboard:0} {clipboard:1} ... {clipboard:8} and merge them.
     
    Anyone got any ideas on how to achieve this?
     
    edit: I figured out my own solution... click here
  7. Like
    bivalvegruff reacted to pawelgrzybek in Div — simple windows manager   
    Quick update on multiple monitors support.
     
    I finally find a way to make this workflow speak to ObjC NSScreen class. It means that the support for multiple monitors is coming very shortly. I am currently on a business trip, but you can expect it before end of this week.
     
    👌
  8. Like
    bivalvegruff reacted to deanishe in Polyglot - yet another Google Translate workflow   
    It's a JavaScript interpreter/platform. It does the same thing as Python and Ruby and Perl, just they are included with macOS.
     
    In any case, this workflow won't run without Node…
     
     
    The security issues aren't relevant to workflows, and JavaScript is perfectly safe. The way webbrowsers run it causes the problems. So again, not relevant.
  9. Thanks
    bivalvegruff reacted to rhyd in Search Omnifocus: free text search your Omnifocus data   
    What is this?
     
    This is a workflow that allows you to run free text searches against your OmniFocus data.
     
    Why would I need this?
     
    Well, it's difficult to quickly search for, say, a task using OmniFocus' own search box since OmniFocus restricts the results to the current perspective or selection. Other people have noticed this too.
     
    Where can I get it?
     
    From Packal or GitHub.
     
    How do I use it?
     
    The README has full instructions but, here's a starter for 10. Search for all tasks within OmniFocus (irrespective of status) with .s

  10. Thanks
    bivalvegruff reacted to MuppetGate in Yet another date calculator   
    Date Calculator
     
    Hello there!
    I needed a bit of motivation to learn Python and Alfred workflows, so I thought I’d kill two horses with one bullet, so to speak.
    Right, so this is a date calculator – kind of. It won’t tell you when you will the lottery, or how long you’ve got to hide your ‘arty videos’ before your wife gets home, but it will answer one or two very simple questions about dates.
     

    For example, if you enter
     
    dcalc 25.12.14 - 18.01.14
     
    then it will tell you the number of days between those dates. Note that the workflow parses the command as you enter it, so you’ll see invalid command, invalid expression and invalid formaterrors as you type. Once you’ve completed the command then you’ll be given the result.
    You could also try
     
    dcalc 25.12.14 - now
     
    for the number of days until Christmas. (Always seems so far away . . .)
    Maybe you don’t want it in days, but would rather it in weeks:
     
    dcalc 25.12.14 - now w
     
    or days and weeks
     
    dcalc 25.12.14 - now wd
     
    or years, months, weeks and days
     
    dcalc 25.12.14 - now ymwd
     
    or
     
    dcalc 25.12.14 - now long
     
    will do the same thing. Personally, I always use the long format because it’s more accurate.
    For those who like to look ahead, you can add days to a date
     
    dcalc now + 6d
     
    or weeks
     
    dcalc 18.12.14 + 9w
     
    or combine ‘em
     
    dcalc 18.12.12 + 5y 9d 3w - 2d + 1d 1w
     
    What does that mess do?
    Take the date 18.12.12  Add 5 years Add another 9 days Add another 3 weeks Then take off 2 days Add another 1 day And then add another 1 week If you want to know what week number you’re in, then try this:
     
    dcalc today wn
     
    Or for a specific date:
     
    dcalc 25.12.14 wn
     
    You can also use the today thing in other places too:
     
    dcalc today + 4d
     
    And we have another thing called time because the workflow can handle times too:
     
    dcalc time + 6h 8M
     
    will add 6 hours and 8 minutes to the current time. Note the capital ‘M’ to denote minutes. Odd, I know . . . sorry, but the workflow has to distinguish between this and a small ‘m’ (for months). I figured make this one a capital because it would see much less use. (It has for me.)
    If you just want the current time, then just enter
     
    dcalc time
     
    Here’s another time calculation
     
    dcalc 14:35 + 6h
     
    That’s the time 6 hours from now, and for real nerdiness:
     
    dcalc 21.06.14@14:20 - 23.01.12@09:21 long
     
    Probably not all that useful, but some of this other stuff might be. You know all about
     
    dcalc now
     
    For giving you the current time and date. While you can use 
     
    dcalc tomorrow
     
    for tomorrow’s date, and as you would expect
     
    dcalc tomorrow + 1d
     
    will give you the day after tomorrow.
     
    dcalc next tue
     
    will give you the date next Tuesday. Or for for Thursday you could enter
     
    dcalc next tue + 2d
    if you’re still a little too inebriated to realise that
     
    dcalc next thu
     
    will give you the same answer.
    That about covers it, I think. I haven’t done anything clever with locales, but you can pick a different date format with
     
    dcalcset date format
     
    And we also support both 12-hour and 24-hour time formats. 
     
    dcalcset time format
     
    I would recommend sticking with the 24-hour format; it's a lot easier to type because the AM/PM symbols have to be in upper case.
    You can also set the combined date and time format using:
     
    dcalcset date and time format
     
    If you’re ever puzzled by invalid command or invalid expression errors, then start with the settings; they might be set incorrectly.
    Oh, almost forgot.
     
    dcalc easter
     
    Is the date for next Easter Sunday, for no other reason that I can never remember it, and now there’s an easy way to find out how many days until Christmas:
     
    dcalc today - christmas
     
    And to celebrate finishing my new book, I decided to add:
    dcalc passover
     
    Alternative parser
    If surround a simple expression in double quotes, then something quite magical happens:
     
    dcalc "4 hours 8 minutes after 4pm"
     
    or
     
    dcalc "6 weeks and 4 days after next wednesday"
     
    or
     
    dcalc "1 day after tomorrow"
     
    Yup! A natural date language parser! 
    You can even combine it with the existing parser:
     
    dcalc "next friday" + 1d
     
    This is a little bit experimental (I might drop it later if it proves to be problematic), but I thought I'd throw it in for a bit of a fun.
     
     
    Credits
    A list of things that made my first attempt at Python programming possible:
    Dean Jackson for his more-than-slightly awesome Alfred Workflow framework(Jetbrains(HumanFriendly(Python-DateUtil(PyPEG(ParseDateTime(Programming Praxis(MIT(http://opensource.org/licenses/MIT) one will do. :-)The MIT License (MIT)
    Copyright © 2014 MuppetGate Media
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  11. Like
    bivalvegruff reacted to cama900 in macOS Mojave Theme (Dark mode) switcher   
    Hey everybody, I've been testing out macOS Mojave + Dark mode the past few days and wanted to be able to toggle between the light theme and dark theme using alfred. So I made a simple workflow for it.
    It's probably not useful to most of you yet (as Mojave it's still on dev beta 1) but i'll be making sure it stays working as there are more updates
     

     
    Download Workflow
    View on Github
  12. Thanks
    bivalvegruff reacted to deanishe in Safari Assistant   
    Hi @bivalvegruff, welcome to the forum.
     
    This is a known issue. Please read the Mojave help on the Alfred website.
     
    Basically, you need to grant Alfred "Full Disk Access" in the Security & Privacy tab of System Preferences. This is also necessary to use Alfred's native bookmark search, but I guess you're not using that because my workflow's way better  
     
    For future reference, please read the stickied thread on reporting workflow issues.
     
    This problem is simple to fix because I already know the answer (thanks @nikivi), but in general developers will also need the debugger output etc. to properly diagnose an issue.
     
×
×
  • Create New...