Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by biati

  1. Thank you @az566 I'm glad you like it. Hope more people get to know about this workflow.
  2. Hi @tosbsas you need to set the timezone like America/Lima https://www.zeitverschiebung.net/en/timezone/america--lima https://www.php.net/manual/es/timezones.america.php Please try it and let me know if it works-
  3. Hi everyone. I don't know what's the best way to notify about updates to the users? do I simply put a comment here? do I update the main post? I just want people to know that the workflow is maintained in case they want to use it. Anyway the workflow was rewritten, added cryptocurrency support, there was 3 or 4 updates with bug fixes and improvements since the last time I published a comment here in the forum.
  4. I've published a fix for the configuration error, the settings are now saved keeping upper and lowercase. For the other thing you mention please first try the update otherwise you need to be more specific, what's your currency, your locale, give me an example of the output you are expecting, etc. something that helps me to make some tests otherwise there's nothing I can do.
  5. The workflow includes a list of currencies, just Open Alfred and type calculate select "list available units and currencies" then you can type your country name to get the currency code (press enter to copy the currency code) or if you prefer here is a list online https://www.iban.com/currency-codes For dates, you can find here the available options to format the date the way you want. If you do not understand what you have to do in that page then go to this other page you can visually create the date in the format you want. In the section "Build your own" you can for example select how you want to display the day (24 or Sun or Sunday, etc) do the same with the rest of options and at the top you'll see the generated code for example: date('F l Y'); the part you need is inside the quotes so just copy F l Y if you need more help just let me know.
  6. Hi @NathanMcKnight I've updated the workflow to fix the problems you mention, please note there are some conversions that are not yet supported for example: 1 m3 to m 1 ft2 to in 144 in to ft2 The rest should be working fine, I'll be adding more units as soon as I have some free time. To install the update just open Alfred and type calculate and select check for updates.
  7. Hi, I'm glad you like this workflow, about decimals and commas in currency I've fixed the error, I'll publish the update tomorrow. About the workdays calculations I like that idea, it has been implemented, please check for updates tomorrow just open Alfred and type calculate and select check for updates.
  8. Hi @NathanMcKnight thank you for trying the workflow, the error you mention has been fixed in version 1.0.5 please download the latest version from Github also automatic updates have been added so this is the last time you have to manually download an update. Thank you for your nice words.
  9. Hi @vitor I've added OneUpdater, did some tests and it seems to work without problems, it's now available in version 1.0.5 with some changes and bug fixes and a new way to configure the workflow. Thank you for OneUpdater it is really simple to use.
  10. Hi @vitor is there a difference between setting "download_type" to "github_release" and setting the download type to direct and in the workflow_url setting the url to the latest release for example "https://github.com/user/repo/releases/latest/download/weorkflowname.alfredworkflow"? Also after implementing the updater I did a test and it notified me about and update (it downloaded the workflow from GitHub correctly and asked me to update, everything good here) except that there was no update, the thing is that I forgot to push the updated "info.plist" to GitHub (the one in GitHub said 1.0.0) while my workflow was in version 1.0.4, so it appears that the updater only does a simple comparison like $v1 !== $v2 instead of actually checking if the release version is bigger than the current version. So my question is do you think this could cause an issue (not now and not in my case) in the future with any workflow where the author forgets to change the version or something happens? or am I just dumb for making such mistake? Anyways, I think this is awesome, it's really simple to implement and it could basically be implemented in any workflow. As a new Alfred user I spent a few weeks looking and testing workflows you can find 3 or 4 different versions of the same workflow, outdated information, outdated links, etc. and it appears that there's not a single source where everyone could look for workflows (apart from the forum and I'm not sure this is the best way) I hope OneUpdater could become the standard for handling updates. Thank you for sharing.
  11. Hi @Thomas Dunne you are right, as a non us citizen I forgot to add those units, I'll be updating the workflow with this and if I find some other useful units I'll add them.
  12. Hi @deanishe You are right, 24 hours is a lot, I've followed your recommendation and changed the update interval to 2 hours for fixer.io and 12 hours for exchangerates api. The updated workflow can be downloaded from Github Thank you for giving a try to this workflow.
  13. Hi @deanishe I'm glad you liked the idea of using each digit as a script filter 😊 I won't zip the exported files anymore. @vitor @deanishe About the currencies, sorry for the confusion, I've added support for fixer.io also the previous functionality still exists so there's no need to create an API Key for fixer but in case you want to use fixer you can configure the API key with calculate set fixerapi yourapihere Also I've incremented the cache from 6 hours to 24 hours. Not sure if I can edit my original post to update the information but you can find the updated readme on Github
  14. Published an update, please download it from the releases page on Github If someone has some time please try it and let me know what you think.
  15. Hi vitor, thank you for your input. I'm searching information about alfred_workflow_data but not sure exactly what you mean, are you referring to the folder stored in ~/Library/Application Support/Alfred/Workflow Data/com.alfred.calculateanything ? if so I've added some validation to make sure it exists and if not then it's created. If this is not what you mean please let me know. 1.- I've adde "in" to the stop words list so now 100km in m works as expected as any other query like 100 usd in eur. 2.- You are right about the decimals, I'm working on that. 3.- Already fixed the calculate set currency symbol 4.- mmm making some tests on this. Once fetched, the currency is cached for 6 hours and the data is from fixer.io, this is the first time I work with currencies so not sure if 6 hours is a correct amount of time. The data will be fetched again only if a currency conversion is triggered.
  16. Calculate Anything is a workflow for Alfred 4, that uses natural language and is able to calculate multiple things like currency, time, vat, percentage, etc. Why? There are several workflows out there but i just needed a workflow that worked naturally for example you can open alfred and type 100 + 9 and alfred will give you a result no need for keywords or hotkeys it just works, i wanted to be able to jus type 100 + 16% or 100 euros to usd or 100km to cm or 100 years to hours and a large etc. and so this workflow was created. Features - Natural language - type 100 euros to dollars or 100 euros in usd or 100€ to $ or 100eur usd or 100 euros a dolares. It does not matter, the same result will be displayed. - Currency - Up to 168 currencies - Cryptocurrency - Support for 100 cryptocurrencies - Units - 100 kilometers to meters or 100km to m or maybe 100km m - Percentages - 100 + 16% | 100 - 16% etc. - PX,Em,Rem,Pt - 12px or 12px to em or 12px pt - Time - time +15 years? now plus 15 hours? or need to 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. Download Download directly from Github releases page, make sure to download the latest release. Download here Base Configuration There's only one global configuration and is the language, this configuration will be used to display the messages in your own language. View the Translations secction for the available languaes. Configure it with. calculate configure and select Set base language and enter the language for example es_ES For more information about configuration click here Currency You can use natural language or type a few characters and that's all, for example: 100 usd to mxn 100$ in mxn 100€ to $ 100 euros to dollars 100 euros a dolares (you can also write it in your own language) 100eur (If no target the currency will be converted to the base currency that you configured) All this examples will simply work, you can add spaces between the value and the currency or don't. If by any chance you don't remember the currency symbol or abbreviation simply type calculate list and select "List Available Currencies" (view the gift above) Currency Options By default the workflow will use exchangerates api to make the conversion, exchangerates has only support for 32 currencies, if you need support for all the currencies that this worflow includes you need to get a FREE API Key from https://fixer.io it takes less than a minute. The following options are available for the currency. Simply launch Alfred and type calculate configure and select any of the options below. View the configuration section for more info Set base currency This will become your base currency, if you type 100eur it will automatically be converted to mxn, examples of currency (USD, EUR, MXN, CAD, etc) Set currency locale Used to give format to the converted amount using the money format of your contry Set Fixer API Set your fixer API Key for support more currencies 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 You can use this in conjunction with currency to convert 100 cryptocurrencies to up to 168 currencies, again you can use natural language or simply pass the currency symbol and that's all. 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 Options You need to get a FREE API Key from https://coinmarketcap.com/api/pricing/ it takes less than a minute. The following options are available for cryptocurrency. Simply launch Alfred and type calculate configure and select any of the options below. View the configuration section for more info Set Coinmarketcap API Select this option and paste your API key and press enter to save it. Units You can write your query using natural language or just a few characters, either way this workflow will give you the result you need. 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. Finally if you still don't remember the unit abbreviation or it's name simply type calculate list and select "List Available Units" you can type to filter, etc. 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 Options The following options are available. Simply launch Alfred and type calculate configure and select any of the options below. View the configuration section for more info Set System of Measurement Here you can define your System of Measurement, this option is still in development but as the workflow grows this might be necessary for US users, by default the metric system will be used but you can define imperial or metric 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 Time Time is triggered by a keyword because is not often used so you can simply open alfred and type 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 Time Options The following options are available. Simply launch Alfred and type calculate configure and select any of the options below. View the configuration section for more info Set base timezone Base time zone to calculate dates in your time for example (America/Los_Angeles, Mexico/General, etc.) Add date format Configure a new date format so the date is displayed the way you want for example (j F, Y, g:i:s a) Delete date format It will show you a list of configured date formats, simply select the one you want to delete and press enter to remove it Time will use the language that you configure with Set base language VAT (value added tax) With this you can calculate the vat of a given amount. Like time, vat is also triggered with the keyword "vat" you can change the keyword in the workflow. Given the following query vat of 400 (with 16% vat configured, you can configure your own percentage) You will get VAT of 400 = 64 // VAT Amount 400 plus VAT = 464 // Amount plus vat 400 minus VAT = 344.82 // Amount minus vat VAT Options The following options are available. Simply launch Alfred and type calculate configure and select any of the options below. View the configuration section for more info Set VAT percentage for example (16%) Configuration You can easily configure the workflow simply by opening Alfred and typing calculate configure you will see a list of all the available options to configure the workflow, select the option you want and press enter then simply enter your value and again press enter to save it. Check the following gif if you have doubts. Translations Please check the available languages on Github, it's easier to update the information there and also how you can create a translation. Keywords Keywords are words that can be used when writing a query in natural language for example a keyword "ounces" will be converted to "oz", "kilometers" will be converted to "km" or "dollars" will be converted to "USD", "seconds" will become "s" and a large etc. This keywords allows the user to type in a more natural way and in their own language. You can write your own keywords to extend the functionality, please check the information on Github. Stop Words Stop words are words that can be used in the query when using natural language for example "100km to cm" - here the stop word is "to" Stop words are useful for two things: Allows the user to write more naturally and in their own language (e.g 100 dolares a mxn) "a" is the stop word Are used to check if the query has to be processed for example: 100km equals meters if the word "equals" is not registered in the stop_words array then it won't be processed. At the end this stop words are removed so 100km to cm becomes 100km cm. Please take a look at the readme on Github to learn more about this. For Currency, Percentages and Units this workflow will only process the query if it begins with a digit and it has at least 3 characters. Time and VAT have a keyword because those are not often used. Updates Updates are installed automatically when a new version is released you don't have to do anything but if want you can check for new updates manually just launch Alfred and type calculate update the workflow will check for updates and it will let you now if there are any updates available.
  • Create New...