Jump to content

Mr Pennyworth

Member
  • Posts

    175
  • Joined

  • Last visited

  • Days Won

    10

Reputation Activity

  1. Haha
    Mr Pennyworth reacted to deanishe in GIF Search: Workflow for Searching and Browsing GIFs   
    One of my workflows logged so much, it broke Alfred.
  2. Sad
    Mr Pennyworth reacted to Cyberskier in GIF Search: Workflow for Searching and Browsing GIFs   
    Yep, not working on my M1, either. I get the "Loading . . ." subtitle for a split second, before it goes back to the "Search" one.
  3. Thanks
    Mr Pennyworth reacted to deanishe in GIF Search: Workflow for Searching and Browsing GIFs   
    Works on my Intel Mac, too, now. Awesome workflow. Extremely well done.
  4. Like
    Mr Pennyworth got a reaction from deanishe in GIF Search: Workflow for Searching and Browsing GIFs   
    @Cyberskier @JakeS could you try the latest release and see if works on M1 macs?
    (I don't have access to an M1 mac)
     
    Technical details:
    The workflow no longer depends on nodejs
  5. Like
    Mr Pennyworth got a reaction from Cyberskier in GIF Search: Workflow for Searching and Browsing GIFs   
    @Cyberskier apologies! The workflow right now doesn't support M1, and I'm not sure how much of a work it would be to support it.
     
    Technical details if curious:
    The workflow ships with compiled binaries (an entire nodejs runtime and a swift app).
    As they aren't universal binaries, it won't work on an M1 mac.
    I'm working on getting rid of nodejs right now.
    After that, I'll look into making the swift app universal.
  6. Thanks
    Mr Pennyworth reacted to deanishe in Can someone explain the three kinds of icon options for script filter JSON?   
    fileicon means “use the icon of this file”, e.g. use path = "/Applications/Safari.app" to show Safari’s icon.

    filetype is for UTIs, not paths (which is why you’re not seeing any icon). Use path = "public.folder" to display a folder icon or com.adobe.pdf to display a PDF icon.
     
    You might find the docs for my libraries useful. I write a lot of this stuff down in there, so I don't forget.
  7. Thanks
    Mr Pennyworth got a reaction from JakeS in GIF Search: Workflow for Searching and Browsing GIFs   
    @JakeS I'm going to get rid of the javascript and node-bundling altogether. Will post an update here once done in next day or two.
     
  8. Thanks
    Mr Pennyworth reacted to deanishe in GIF Search: Workflow for Searching and Browsing GIFs   
    /snapshot/gif-downloader/gif-downloader.js:180 .toLowerCase() ^ TypeError: Cannot read property 'toLowerCase' of null at htmlFileName (/snapshot/gif-downloader/gif-downloader.js:180:8) at Server.<anonymous> (/snapshot/gif-downloader/gif-downloader.js:192:24) at Server.emit (events.js:314:20) at parserOnIncoming (_http_server.js:779:12) at HTTPParser.parserOnHeadersComplete (_http_common.js:122:17)  
    Looks like somebody forgot to wrap their handler in try…catch, so a bum request is crashing the whole program instead of getting a 400 or 500 response.
     
    Also, the workflow keeps failing to save query-history.txt because it doesn't create the data directory it's trying to save it in.
  9. Thanks
    Mr Pennyworth got a reaction from Chris Messina in Add CSV export to List Filters   
    In the meanwhile, if you insist on CSV instead of excel sheets, here's a workflow for you: https://github.com/mr-pennyworth/alfred-lf2csv
     
    Example setup:
    1) set hotkey to cmd+option+c

     
    2) in the workflow editor, select the list filter you want to export as csv

     
    3) press the hotkey (cmd+option+c), alfred should have a CSV file ready to be dragged-and-dropped

  10. Like
    Mr Pennyworth got a reaction from vitor in How to show scrollbar initially? (when there's scrollable results)   
    I found the old scrollbar behavior very helpful. It immediately told me that there are more results and not just the 9. From a UX perspective, I think the macOS behavior to "show scrollbar only while scrolling" isn't exactly the same Alfred's latest choice. In most places (like a browser for example), there are plenty other visual affordances to let you know that "there is more content". For example, looking at a webpage, or an article, it becomes apparent most of the times that there's more stuff below the fold. In contrast, the scrollbar was the sole indicator of it in Alfred.
     
    So, here's another strong vote in favor of "I really really wish Alfred gave me a choice to restore old behavior"
  11. Like
    Mr Pennyworth got a reaction from Prometheus in Better Dictionaries   
    Sorry folks for all the errors and failures you keep running into!
     
    The workflow is way too hacky with no good logging, error reporting and very poor debugging... I started working on a revamped version with detailed logging, less moving parts and a consolidated code base in a single swift binary, but work at my day job has gotten way too hectic and the revamping of workflows and bugfixes have taken a backseat
     
    I'd gladly merge pull requests though!
    Thanks and apologies!
  12. Like
    Mr Pennyworth got a reaction from 3komma14 in Way to sort keyword trigger matches before matched Applications (Default Results)?   
    By "result" I mean "item" in the following.
    I'm not sure what's the correct term 😝
     
    "everything is a result" is an interesting philosophy.
    Reminds me of "everything is a file" philosophy of Unix.
    The universality brings simplicity and elegance too, no doubt!
     
    However, the discussion of a third "valid:" state made me wonder...
    (consideration of complexity and elegance aside)
    What if everything is not a result? If a result isn't valid, is it really a result? After all, nothing could be done with it. Alfred already has specialized UIs, they are just not exposed to the workflows: Snippet and Clipboard History Viewer Mini Music Player The tiny "update available" notice What if Alfred exposed more UI elements for workflow authors? Given how elegantly crafted the whole workflow editor is, there's no doubt @Andrew could make a few well-designed, judiciously-crafted UI elements that fit into Alfred beautifully. To my naive eye, it looks like Alfred could benefit from a "notice" element.
    The notice could be used as
    a status indicator a progress monitor an error flag Someone could even go ahead and build a breadcrumbs UI using the notice.
    (would be cool for multi-level-menus (I gather @deanishe would love better support for building multi-level-menus))
     
    An example from Raycast (By a "notice element", I mean something like "Clipboard History" at the top left):

    I understand that it's possible that this could be a stretch.
    Also, it could be seen as "beginning of cluttering of UI".
     
    It's just that I keep having this feeling that "valid: false" results don't belong with the main results, philosophically.
    So throwing this out here for discussion
  13. Sad
    Mr Pennyworth got a reaction from lev78 in Better Dictionaries   
    Sorry folks for all the errors and failures you keep running into!
     
    The workflow is way too hacky with no good logging, error reporting and very poor debugging... I started working on a revamped version with detailed logging, less moving parts and a consolidated code base in a single swift binary, but work at my day job has gotten way too hectic and the revamping of workflows and bugfixes have taken a backseat
     
    I'd gladly merge pull requests though!
    Thanks and apologies!
  14. Like
    Mr Pennyworth got a reaction from David in Better Dictionaries   
    Better Dictionaries

    Better search and live previews for built-in macOS dictionaries.
     
    This post might be outdated, link to up-to-date README
    Download the latest version: Better.Dictionaries.alfredworkflow

    Features
    IPA (phonetic) pronunciations:
    Press ⌘↩ to hear the pronunciation. In-Alfred live previews with colors that
    automatically adapt to Alfred's theme:
    Reverse search:
    More relevant search results:  
    left: macOS/Alfred built-in search, right: BetterDict
    If one word has multiple, unrelated meanings with different
    origin, they are showed as diffrent entries
    (in the above example, see "arm" has two entries at the top) Import any compatible dictionary

    Setup

    After importing the workflow,
    first type .setup-better-dictionaries into Alfred
    and follow the instructions for granting permissions.

    Importing a Dictionary

    After setup, type .dict-import into Alfred.

    Select the dictionary you want to import.  

    Dictionary-specific Keywords and Hotkeys

    After a dictionary is imported, a script filter and a hotkey trigger
    is automatically created into the workflow editor. 
    Freshly-installed workflow without any imported dictionaries:
    Two hotkeys and keyword triggers each automatically added after importing
    two dictionaries. They come pre-labeled with dictionary names:
    This allows you to assign hotkeys and keywords for specific dictionaries.
    For example, below you can see how I have manually assigned keywords
    thesaurus and defn to the thesaurus and dictionary respectively.
    In addition, I can trigger the dictionary search using ⌃⌥⌘D.  


    Word Lookup

    You can use the hotkeys/keywords created above for directly searhcing
    specific dictionaries. That's the recommended way for dictionaries
    that you use frequently.

    For the infrequently used dictionaries for which you haven't assigned
    any hotkeys/keywords, follow this:
     1. Type lookup into Alfred. You'll see a list of all dictionaries
        imported into BetterDict.
       
     2. Select the dictionary to search, and type the search query.

    Notes and Warnings
    [*]Importing a dictionary could take as much as 30 minutes
    on old machines or if there's significant CPU activity from other apps.[*]After each mac restart, for the first time when you run
    the workflow, expect a comparatively slower search.
    Subsequent searches should be instant.[*]This workflow takes a LOT of space on disk. Take a look at the comparison:

     

    # Built-in dictionaries Oxford Thesaurus:   7 MB Oxford Dictionary: 36 MB # After importing into BetterDict Oxford Thesaurus:     101 MB (html files) Oxford Dictionary:    442 MB (html files) Search index for two: 730 MB (apart from html)

     

    Known IssuesThe workflow doeesn't work if the theme is Alfred Classic.  
    If you must use that theme, duplicate that theme and use the
    duplicated one.
  15. Like
    Mr Pennyworth reacted to Chris Messina in Better support for native app x-callbacks/deeplinks?   
    Yes! This is exactly what I was suggesting — it's both more accurate and doesn't obtrusively get in the way of the default/majority case:
     

     
    Thanks for hearing me out and considering this discussion and moving quickly on an implemented solution, @Andrew!
     
    And thank you @Mr Pennyworth for summarizing the different perspectives and moving the core conversation forward which, in my view, resulted in a better Alfred for everyone. 😅
  16. Thanks
    Mr Pennyworth got a reaction from Chris Messina in Better support for native app x-callbacks/deeplinks?   
    I love this discussion minus the part where @Chris Messina felt unwelcome. From my limited interactions with @deanishe and @vitor I feel damn confident that no one on this thread means to attack / argue in bad faith with anyone.
     
    MacOS settings:
    I don't agree with the thesis that Apple's "Default Web Browser" setting is misleading or incomplete. "Web" implies http(s), no? I don't see any ambiguity there. Apple is saying "choose an app to open http(s) urls". It is just that for all other URL schemes, Apple hasn't provided a UI. But whatever UI is present, it is precise, and complete. It claims to be about "web" and it is.
     
    Alfred:
    Reading the text for the "Open URL" object, presence of terms like "website's search URL" and example of twitter, I feel like there's a possibility that the original design intent behind the "Open URL" object was exclusively for http(s) URLs. The copy certainly reads like that. Another reason for me to believe so is the fact that it is grouped together with "Default *Web* Search".

    To my eyes, being able to open other URL schemes with this workflow object seems like a case of "it is possible due to particular implementation details".
     
    As @vitor has correctly pointed out, terms "Browser" or "Default Browser" are a bit of a lie.
    Imagine the user (workflow user who has opened the object out of curiosity) experience:
    - User sees that the URL is "craft://..."
    - Browser is "[firefox icon] Default Browser"
    - User rightly concludes that it'll open a firefox tab/window and the address bar will have "craft://..."
    - User concluded wrong
    - When workflow runs, craft app is opened
     
    As a user, I don't like such surprises. This is where @vitor's another observation comes in.
    - What fraction of users will feel "lied to"? (guess: teeny tiny)
    - How easy is it for the above users to update their mental model? That is, them realizing that "when alfred says *default browser*, it means, under the hood, it is like calling 'open' without an app argument" (guess: very easy for most users)
     
    My interpretation of @vitor's view is that because it is only a teeny tiny fraction of users who will ever get confused (cuz most users won't know/bother about non-http(s) schemes), and those users (not all, but most) will quickly figure what is going on, it is not worth changing the UI as it would mean complicating the UI for the other users. This is the part where I disagree. What if the said change didn't complicate stuff?
     
    Here's a mock:

    - instead of "Browser:" it says "Open With:"
    - instead of "[Firefox Icon] Default Browser" it says "[Generic Mac Icon] MacOS Default"
     
    To my eyes, this change won't add or cause any confusion for the majority of users (who are concerned only with *web*).
    At the same time, it eliminates the confusion for the minority too (who would enter "craft://..." and get confused as to why the dropdown has only web browsers)
     
    TL;DR: Presently, the following are simultaneously true
    As @Chris Messina pointed out, the UI is wrong in some cases. (It shows "[firefor icon] Default Browser, but opens in Craft, which is not a browser) As @deanishe pointed out, most users learn that even though the UI is wrong, the actual behavior is correct. Not all users, because Chris just gave us a data point. As @vitor pointed out, changing UI is a bad idea if it improves experience of a tiny minority while making it worse for the majority. @vitor what do you think about my proposed changes? Do you think it'll degrade the "most users'" experience?
    @Chris Messina what about you? Do you think these changes that I suggested would go a long way in addressing your complaint (which is my complaint too, by the way)?
     
    @Andrew it would be awesome if you chimed in. You're the OG and solo designer, and looking at Alfred, an outstanding one!
    - Do you see this as an issue or non-issue?
    - What do you think of the proposed changes?
  17. Like
    Mr Pennyworth got a reaction from vitor in Better support for native app x-callbacks/deeplinks?   
    I love this discussion minus the part where @Chris Messina felt unwelcome. From my limited interactions with @deanishe and @vitor I feel damn confident that no one on this thread means to attack / argue in bad faith with anyone.
     
    MacOS settings:
    I don't agree with the thesis that Apple's "Default Web Browser" setting is misleading or incomplete. "Web" implies http(s), no? I don't see any ambiguity there. Apple is saying "choose an app to open http(s) urls". It is just that for all other URL schemes, Apple hasn't provided a UI. But whatever UI is present, it is precise, and complete. It claims to be about "web" and it is.
     
    Alfred:
    Reading the text for the "Open URL" object, presence of terms like "website's search URL" and example of twitter, I feel like there's a possibility that the original design intent behind the "Open URL" object was exclusively for http(s) URLs. The copy certainly reads like that. Another reason for me to believe so is the fact that it is grouped together with "Default *Web* Search".

    To my eyes, being able to open other URL schemes with this workflow object seems like a case of "it is possible due to particular implementation details".
     
    As @vitor has correctly pointed out, terms "Browser" or "Default Browser" are a bit of a lie.
    Imagine the user (workflow user who has opened the object out of curiosity) experience:
    - User sees that the URL is "craft://..."
    - Browser is "[firefox icon] Default Browser"
    - User rightly concludes that it'll open a firefox tab/window and the address bar will have "craft://..."
    - User concluded wrong
    - When workflow runs, craft app is opened
     
    As a user, I don't like such surprises. This is where @vitor's another observation comes in.
    - What fraction of users will feel "lied to"? (guess: teeny tiny)
    - How easy is it for the above users to update their mental model? That is, them realizing that "when alfred says *default browser*, it means, under the hood, it is like calling 'open' without an app argument" (guess: very easy for most users)
     
    My interpretation of @vitor's view is that because it is only a teeny tiny fraction of users who will ever get confused (cuz most users won't know/bother about non-http(s) schemes), and those users (not all, but most) will quickly figure what is going on, it is not worth changing the UI as it would mean complicating the UI for the other users. This is the part where I disagree. What if the said change didn't complicate stuff?
     
    Here's a mock:

    - instead of "Browser:" it says "Open With:"
    - instead of "[Firefox Icon] Default Browser" it says "[Generic Mac Icon] MacOS Default"
     
    To my eyes, this change won't add or cause any confusion for the majority of users (who are concerned only with *web*).
    At the same time, it eliminates the confusion for the minority too (who would enter "craft://..." and get confused as to why the dropdown has only web browsers)
     
    TL;DR: Presently, the following are simultaneously true
    As @Chris Messina pointed out, the UI is wrong in some cases. (It shows "[firefor icon] Default Browser, but opens in Craft, which is not a browser) As @deanishe pointed out, most users learn that even though the UI is wrong, the actual behavior is correct. Not all users, because Chris just gave us a data point. As @vitor pointed out, changing UI is a bad idea if it improves experience of a tiny minority while making it worse for the majority. @vitor what do you think about my proposed changes? Do you think it'll degrade the "most users'" experience?
    @Chris Messina what about you? Do you think these changes that I suggested would go a long way in addressing your complaint (which is my complaint too, by the way)?
     
    @Andrew it would be awesome if you chimed in. You're the OG and solo designer, and looking at Alfred, an outstanding one!
    - Do you see this as an issue or non-issue?
    - What do you think of the proposed changes?
  18. Thanks
    Mr Pennyworth reacted to Andrew in Better support for native app x-callbacks/deeplinks?   
    @Chris Messina this is indeed a UI issue, however minor, as the underlying feature works as expected (all URLs are routed via macOS).
     
    Alfred should really dynamically be showing the correct default handler if possible.
     
    Taking suggestions from this thread (thanks for the relevant input), I've updated Alfred to show "Open With" instead of "Browser", and the default handler will automatically update as you type, for example:
     



     
    This should be in the 4.3.2 pre-release in the next few days.
     
    Cheers,
    Andrew
  19. Like
    Mr Pennyworth reacted to vitor in Better support for native app x-callbacks/deeplinks?   
    I’d say the issue might be the amount of back and forth. There are three Alfred veterans trying to help on this thread (and in your others, there were multiple as well). In general, one of us is enough and the others move on to help someone else or only make a small comment for completeness. But since you continue to argue back (not a criticism), the others will try to further clarify the points already made and fill any gaps, which makes it so you have more people to respond to (while we still only have one each—you).
     
     
    Yes, but to be honest the example answer you gave is to me the one which feels patronising. It’s essentially what’s already been said but with a “good job, here’s a cookie” in there. I wouldn’t enjoy receiving it, and I wouldn’t feel genuine giving it unless I were truly impressed by the idea (admittedly a high bar). It may have made sense to make such a comment at the start of the conversation, but I entered late into it—when specifics are what matter.
     
    Frankly, I need to be direct to be efficient because I assist a crap ton of people daily, both here and on Homebrew Cask plus other projects. The vast majority of people I interact with in this manner find it perfectly fine, so I know it works for me.
     
    Everyone has their style, so perhaps ours clash. I’ll pay attention on the next chance we have to interact, and perhaps deliberately pass on it. Again, I understand how you may have found my comment insulting (and I apologise for that) but I expected the previous rapport to have made it less probable to have been interpreted as such, not more.
     
    Surely none of us imagined we’d spend so much of a Sunday discussing this. I understand and accept your side of it. I expect you accept mine. Have a great week!
  20. Like
    Mr Pennyworth got a reaction from Espresso in How to - type query, press enter, get results .... and repeat?   
    @Espresso
    Edit:
    Here's your workflow modified to do exactly what you were aiming for: https://drive.google.com/file/d/1eX_pa_E3thrMvdKVKzYDpjrKyOT2oLyS/view?usp=sharing
    I haven't edited the python script at all, just re-arranged and edited some stuff in the workflow editor.
    Now it looks like this:

     
    For a crude explanation of how it works, refer below:
     
    Before edit:
    The following workflow does precisely what you've described:
    https://github.com/mr-pennyworth/alfred-gif
     
    I know you want to write your own, so, you can take a look at this workflow and see how it is done and do the same in your own workflow. Here's how it achieves the behavior you described:
     

    This is a script filter. As @deanishe mentioned, in a script filter, you can't do wait-for-enter. So, I do this hack instead:
    The script filter basically does no work except for storing the query in a file. When the user presses enter, (2) and (3) are activated simultaneously. Returns immediately with a "search in progress..." message. Gets results from the gif website, returns a message about the gif. The messages from (2) or (3) are stored in an environment variable. Re-populate Alfred's search box with the query that was just executed.
  21. Like
    Mr Pennyworth got a reaction from deanishe in How to - type query, press enter, get results .... and repeat?   
    @Espresso
    Edit:
    Here's your workflow modified to do exactly what you were aiming for: https://drive.google.com/file/d/1eX_pa_E3thrMvdKVKzYDpjrKyOT2oLyS/view?usp=sharing
    I haven't edited the python script at all, just re-arranged and edited some stuff in the workflow editor.
    Now it looks like this:

     
    For a crude explanation of how it works, refer below:
     
    Before edit:
    The following workflow does precisely what you've described:
    https://github.com/mr-pennyworth/alfred-gif
     
    I know you want to write your own, so, you can take a look at this workflow and see how it is done and do the same in your own workflow. Here's how it achieves the behavior you described:
     

    This is a script filter. As @deanishe mentioned, in a script filter, you can't do wait-for-enter. So, I do this hack instead:
    The script filter basically does no work except for storing the query in a file. When the user presses enter, (2) and (3) are activated simultaneously. Returns immediately with a "search in progress..." message. Gets results from the gif website, returns a message about the gif. The messages from (2) or (3) are stored in an environment variable. Re-populate Alfred's search box with the query that was just executed.
  22. Thanks
    Mr Pennyworth reacted to biati in Calculate Anything   
    Calculate Anything is a workflow for Alfred 4, that uses natural language and is able to calculate multiple things like currency, time, vat, px, em, rem, percentage, and more.
     
    Why?
     
    There are several conversion workflows out there but I wanted a workflow that worked naturally. For example, you can open Alfred, type `100 + 9` and get a result. No need for keywords or hotkeys -- it just works. With Calculate Anything you can do the same, simply type `100 + 16%`, `100 euros to usd`, `100km to cm` or `100 years to hours` and many more.
     
    Features

    - Natural language - type 100 euros to dollars, 100 euros in usd, 100€ to $, 100eur usd, 100 euros a dolares -- it does not matter, the same result will be displayed It includes support for English, Spanish and Swedish
    - Currency - Up to 168 currencies
    - Cryptocurrency - Support for up to 5,000 cryptocurrencies
    - Units - 100 kilometers to meters or 100 km to m or simply 100km m
    - Data Storage - 100 gigabytes in megabytes, 2 gb to mb, 400MiB to kib, 2tb gb, etc.
    - Percentages - 100 + 16%, 100 - 16%, 40 as a % of 50, 20 is what % of 50, etc.
    - PX,Em,Rem,Pt - 12px or 12px to em or 12px pt
    - Time - time +15 years, time now plus 6 hours or convert a timestamp
    - VAT - value added tax calculations, we all need this
    - Translations You can create your own translations to display results in your language
    - Keywords Extend the natural language in the queries so you can type 100 dolares a pesos and the code will see 100usd to mxn
     
    Important
    You will always find the latest version, changelog and updated documentation on Github as is difficult to use the forum to keep track of updates and support. 
     
    Requirements for Mac OS Monterey Users and up
    Starting from Mac OS Monterey Apple removed PHP so you have to install it manually, that can easily be done with Homebrew, just open your terminal and paste the commands below:
     
    1.- Install Homebrew
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"  
    2.- Install PHP
    brew install php  
    That's it, you need to have the latest version of Alfred and will automatically find the PHP version that you install.
     
    Mac OS Big Sur users and below do not need to do anything, your Mac OS already includes PHP.
     
    Download

    Download directly from Github releases page, make sure to download the latest release. Download here
     
    Configuration

    You can configure the workflow using the new Alfred 5 Workflow Configuration window.
     
    Currency
     
    You can use natural language or a few characters -- that's all! For example:
     
    100 us dollars in mexican pesos 100 canadian dollars in argentinian peso 100 euros to dollars 100 euros in dollars 100 euros as dollars 100 euros a dolares (you can also write it in your own language) 100 usd to mxn 100 usd mxn 100usd yen 100€ to $ 100 ¥ in € 100¥ € 100eur (if no target the currency will be converted to the base currencies that you configured)  
    You can set a base currencies so if you type for example 120 euros it will be automatically converted to the currencies that you configured.
    All these examples just work. You can add spaces between the value and the currency or not.
     

     
    Currency Modifiers
     
    When a result is displayed you can use action modifiers to copy the value in different formats:
     
    Return - Press Return to copy the value with format, for example 2,376.54 Command + Return - Press Command + Return to copy the value without formatting, for example 2376.54 Option + Return - Press Option + Return to copy the value of a single unit, for example 23.76  
    Currency API Key (Not required)
     
    By default the workflow will use exchangeratehost api to make the conversion. exchangeratehost only support 32 currencies; if you need support for additional currencies supported by Calculate Anything, you need to get a FREE API Key from https://fixer.io -- it takes less than a minute. Then simply add the API Key in the workflow configuration window.
     
    Currency Symbols
     
    You can also use currency symbols in your query for example 100¥ to € will be converted to 100JPY to EUR, here is a list of available symbols.
     
    Please go to the repo description on Github for a full list of supported symbols it's really difficult to write them here in the forum. View Currency Symbols
     
    Cryptocurrency
    Calculate Anything can convert between 5,000 cryptocurrencies and 168 currencies. Again, you can use natural language or simply pass the currency symbol.
     
    2 bitcoin to dollars 0.1 bitcoin in dollars 5 bitcoins in ethereum 1 ethereum to ¥ 10 ethereum in mxn 1eth btc 1btc (If no target the currency will be converted to the base currency that you configured)  

     
    Cryptocurrency Modifiers
    When a result is displayed you can use action modifiers to copy the value in different formats:
     
    Return - Press Return to copy the value with format, for example 2,376.54 Command + Return - Press Command + Return to copy the value without formatting, for example 2376.54 Option + Return - Press Option + Return to copy the value of a single unit, for example 23.76  
    Cryptocurrency API Key
    You need to get a FREE API Key from https://coinmarketcap.com/api/pricing/ it takes less than a minute. Then simply add the API Key in the workflow configuration window.
     
    Units
     
    You can write your query using natural language or just a few characters. Either way works!
     
    100 kilometers to meters 100 km in meters 100 km m 100km m 100 miles as meters 100miles in meters 100 miles to m 100 ounces to kilograms 100oz to kg 100oz = kg 100oz kg 10 years to months 10years to seconds 1 year to sec 1hr s 10 días a horas (use your own language)  
    If you don't remember the unit abbreviation just simply type the name for example instead of "oz" you can type "ounce" or "ounces" or even use words in your own language for exaple "onza" or "onzas" in spanish.
     

     
    Please go to the repo description on Github for a full list of units it's really difficult to write them here in the forum. View Units
     
    Units Modifiers
    When a result is displayed you can use action modifiers to copy the value in different formats:
     
    Return - Press Return to copy the value with format, for example 2,376.54 Command + Return - Press Command + Return to copy the value without formatting, for example 2376.54 Option + Return - Press Option + Return to copy the value of a single unit, for example 23.76  
     
    Data Storage
    You can write your query using natural language or just a few characters. Either way works!
     
    100 gigabytes in megabytes 100 gigas in megas 100 Mebibytes in Kibibytes 100 gb to mb 100gb to kb 100gb mb 400MiB in kib 2tb gb 1b kb  

    Please note, this workflow follows the IEC Standard (International Electrotechnical Commission) as it had been adopted by the IEEE, EU, and NIST. That means that if you type `1MB in KB` you will get `1000 KB` but if you type `1MiB in KiB` you will get `1024 KB`, you can read more about it here https://en.wikipedia.org/wiki/Byte#Multiple-byte_units
     
    Do you prefer 1 MB = 1024 KB? No problem, you can configure it in the Workflow configuration window.
     
    Data Storage Modifiers
    When a result is displayed you can use action modifiers to copy the value in different formats:
     
    Return - Press Return to copy the value with format, for example 2,376.54 Command + Return - Press Command + Return to copy the value without formatting, for example 2376.54  
    Percentages
     
    You can easily calculate percentages for example:
     
    15% of 50 = 7.50  //7.5 equals to 15% of 50 120 + 30% = 156  //120 plus the 30% of 120 120 plus 30% = 156  //120 plus the 30% of 120 120 - 30% = 84  //120 minus the 30% of 120 120 minus 30% = 84  //120 minus the 30% of 120 30 % 40 = 75%  // 30 is 75% of 40.  
    Translations and natural language can also be used
    120 más 30% = 156  

    PX, EM, REM, PT
    Open Alfred, type `12px` and you'll see the value converted to em, rem and pt. It's that simple. Check the examples below.
     
    12px 12px to em 2 rem 2rem 2rem to pt 12px in em base 17px (use a custom px base or configure it in the workflow)  
     
    Time
     
    Given its less frequently used, time conversions require the use of the keyword time
     
    Gives you the current time
    time  
    Converts the timestamp to a regular date
    time 1577836800  
    Gives you the time from now plus anything you want
    time +15 days time now plus 3 days  
    Number of days until specified date
    time days until 31 december  
    The start date of current year
    time start of year  
    The start date of specified year
    time start of 2021  
    The end date of current year
    time end of year  
    The end date of specified year
    time end of 2021  
    It also works in your language
    time inicio de 2020 time fin de 2020 time dias hasta 31 diciembre  
    Get information about date
    time 31 December, 2021 18:00:00 time 31/12/2021 18:00:00 time 12/31/2021 18:00:00  
    Calculate the difference between two dates
    time 25 December, 2021 - 31 December, 2021 time 31-11-2019 - 21-11-2019 time 11/31/2019 - 11/21/2019  

     
    VAT (value added tax)
     
    With this you can calculate the VAT for a given amount. Like time, VAT is also triggered with a keyword. By default, the keyword is "vat" but you can change the keyword in the workflow.
     
    Given the following query
    vat of 400 (with a 16% VAT configured, a percentage you can configure)
     
    Calculate Anything will provide the following conversions:
     
    VAT of 400 = 64 (the VAT amount) 400 plus VAT = 464 (the Amount plus VAT) 400 minus VAT = 344.82 (the Amount minus VAT, useful if you have a final amount and want to know the VAT applied)  
     
    Cache
     
    The workflow stores some data about currency in the workflow data folder. You can delete the cache by opening Alfred and typing `_caclear`.
  23. Like
    Mr Pennyworth got a reaction from Alan He in Script Filter Icon from URL   
    https://www.alfredapp.com/help/workflows/inputs/script-filter/json/
    Search for "Rerunning script filters automatically" on that page
  24. Thanks
    Mr Pennyworth reacted to deanishe in Stripping trailing characters in a python script not working for me   
    Don’t need the flush() at the end of a script.

    Another possibility is print(output, end='') as long as you’re using Python 3 or from __future__ import print_function in Py2.
  25. Like
    Mr Pennyworth got a reaction from Vero in How long have you been using Alfred?   
    In May 2020, a friend saw me using spotlight and claimed "I'm going to pull you out of stone age". And she told me to get Alfred. I had been using it as "just another spotlight" since then.
     
    Beginning of November, I got curious "what is this powerpack thing?".
    Searched online, found packal, and this forum, downloaded a bunch of workflows.
    It hit me so hard!! "HOLY SHIT! ALFRED IS SO POWERFUL!!"
    "It's not an app, it's a platform!" 🤩💕
    I was up all night for a couple of days building stupid workflows and playing around.
    In a day or two, I became a mega supporter.
×
×
  • Create New...