{"id":24959839,"url":"https://github.com/tchar/ulauncher-albert-calculate-anything","last_synced_at":"2026-01-16T13:29:54.583Z","repository":{"id":42459956,"uuid":"382897793","full_name":"tchar/ulauncher-albert-calculate-anything","owner":"tchar","description":"A ULauncher/Albert extension that supports currency, units and date time conversion, as well as a calculator that supports complex numbers and functions.","archived":false,"fork":false,"pushed_at":"2024-07-18T20:47:29.000Z","size":32191,"stargazers_count":132,"open_issues_count":18,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-19T02:57:11.200Z","etag":null,"topics":["albert","albert-extensions","albertlauncher","calculator","conversion","converter","launcher","launcher-utility","python","python3","ulauncher","ulauncher-extension","ulauncher-extensions"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tchar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-04T16:25:00.000Z","updated_at":"2025-10-04T00:15:57.000Z","dependencies_parsed_at":"2024-04-05T05:22:06.474Z","dependency_job_id":"936b7539-e633-48da-a249-759b245a65f6","html_url":"https://github.com/tchar/ulauncher-albert-calculate-anything","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/tchar/ulauncher-albert-calculate-anything","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchar%2Fulauncher-albert-calculate-anything","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchar%2Fulauncher-albert-calculate-anything/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchar%2Fulauncher-albert-calculate-anything/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchar%2Fulauncher-albert-calculate-anything/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tchar","download_url":"https://codeload.github.com/tchar/ulauncher-albert-calculate-anything/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchar%2Fulauncher-albert-calculate-anything/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["albert","albert-extensions","albertlauncher","calculator","conversion","converter","launcher","launcher-utility","python","python3","ulauncher","ulauncher-extension","ulauncher-extensions"],"created_at":"2025-02-03T08:01:35.638Z","updated_at":"2026-01-16T13:29:54.563Z","avatar_url":"https://github.com/tchar.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# \u003cimg src=\"calculate_anything/images/icon.svg\" alt=\"drawing\" width=\"25\"/\u003e Calculate Anything\n\n[![Platforms](https://img.shields.io/badge/platforms-Linux%20%7C%20Windows%20%7C%20macOS-%23818181)](https://github.com/tchar/ulauncher-albert-calculate-anything/actions)\n[![Python Versions](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-%23007ec6?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj4gIDxkZWZzPiAgICA8bGluZWFyR3JhZGllbnQgaWQ9InB5WWVsbG93IiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKDQ1KSI+ICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI2ZlNSIgb2Zmc2V0PSIwLjYiLz4gICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjZGExIiBvZmZzZXQ9IjEiLz4gICAgPC9saW5lYXJHcmFkaWVudD4gICAgPGxpbmVhckdyYWRpZW50IGlkPSJweUJsdWUiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoNDUpIj4gICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjNjlmIiBvZmZzZXQ9IjAuNCIvPiAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM0NjgiIG9mZnNldD0iMSIvPiAgICA8L2xpbmVhckdyYWRpZW50PiAgPC9kZWZzPiAgPHBhdGggZD0iTTI3LDE2YzAtNyw5LTEzLDI0LTEzYzE1LDAsMjMsNiwyMywxM2wwLDIyYzAsNy01LDEyLTExLDEybC0yNCwwYy04LDAtMTQsNi0xNCwxNWwwLDEwbC05LDBjLTgsMC0xMy05LTEzLTI0YzAtMTQsNS0yMywxMy0yM2wzNSwwbDAtM2wtMjQsMGwwLTlsMCwweiBNODgsNTB2MSIgZmlsbD0idXJsKCNweUJsdWUpIi8+ICA8cGF0aCBkPSJNNzQsODdjMCw3LTgsMTMtMjMsMTNjLTE1LDAtMjQtNi0yNC0xM2wwLTIyYzAtNyw2LTEyLDEyLTEybDI0LDBjOCwwLDE0LTcsMTQtMTVsMC0xMGw5LDBjNywwLDEzLDksMTMsMjNjMCwxNS02LDI0LTEzLDI0bC0zNSwwbDAsM2wyMywwbDAsOWwwLDB6IE0xNDAsNTB2MSIgZmlsbD0idXJsKCNweVllbGxvdykiLz4gIDxjaXJjbGUgcj0iNCIgY3g9IjY0IiBjeT0iODgiIGZpbGw9IiNGRkYiLz4gIDxjaXJjbGUgcj0iNCIgY3g9IjM3IiBjeT0iMTUiIGZpbGw9IiNGRkYiLz48L3N2Zz4=)](https://www.python.org/)\n[![License](https://img.shields.io/github/license/tchar/ulauncher-albert-calculate-anything?color=%23007ec6)](LICENSE)\n[![Latest Version](https://img.shields.io/github/v/tag/tchar/ulauncher-albert-calculate-anything?label=version)](https://github.com/tchar/ulauncher-albert-calculate-anything/releases)\n\u003c!-- [![Requirements Status](https://requires.io/github/tchar/ulauncher-albert-calculate-anything/requirements.svg?branch=master)](https://requires.io/github/tchar/ulauncher-albert-calculate-anything/requirements/?branch=master) --\u003e\n\n[![Linux CI](https://github.com/tchar/ulauncher-albert-calculate-anything/actions/workflows/ci-linux.yml/badge.svg)](https://github.com/tchar/ulauncher-albert-calculate-anything/actions/workflows/ci-linux.yml)\n[![Benchmark](https://github.com/tchar/ulauncher-albert-calculate-anything/actions/workflows/benchmark-linux.yml/badge.svg)](https://tchar.github.io/ulauncher-albert-calculate-anything/benchmarks/)\n[![CodeQL](https://github.com/tchar/ulauncher-albert-calculate-anything/workflows/CodeQL/badge.svg)](https://github.com/tchar/ulauncher-albert-calculate-anything/security/code-scanning)\n[![Codecov](https://codecov.io/gh/tchar/ulauncher-albert-calculate-anything/branch/master/graph/badge.svg?token=FDMWA8UDJW)](https://codecov.io/gh/tchar/ulauncher-albert-calculate-anything)\n\u003c!-- [![Windows CI](https://github.com/tchar/ulauncher-albert-calculate-anything/actions/workflows/ci-windows.yml/badge.svg)](https://github.com/tchar/ulauncher-albert-calculate-anything/actions/workflows/ci-windows.yml) --\u003e\n\u003c!-- [![macOS CI](https://github.com/tchar/ulauncher-albert-calculate-anything/actions/workflows/ci-macos.yml/badge.svg)](https://github.com/tchar/ulauncher-albert-calculate-anything/actions/workflows/ci-macos.yml) --\u003e\n\n[![Code Style](https://img.shields.io/badge/code%20style-black-black)](https://github.com/psf/black)\n\n[![Benchmarks](https://img.shields.io/badge/Benchmarks-blue)](https://tchar.github.io/ulauncher-albert-calculate-anything/benchmarks/)\n\n\n`Ulauncher/Albert Calculate Anything` is an extension for [Ulauncher](https://ulauncher.io/) and [Albert](https://github.com/albertlauncher/albert) to calculate things like currency, time, percentage, units, complex equations, base-n expressions and more.\n\nThe `calculate_anything` module does not depend on `Ulauncher` or `Albert` so it is extensible for other use cases (see [demo with prompt_toolkit](#extending-and-more)).\n\nSee [Features](#features) for supported features, [Contents](#contents) for installation instructions and more\n\n## Albert Demo\n\n![Albert Demo](misc/demo-albert.gif)\n\n## Ulauncher Demo \n\n![Ulauncher Demo](misc/demo-ulauncher.gif)\n\n## Features\n\nCalculator for Anything\n- `Currency Converter`: See [Currency](#currency) for examples\n- `Time Converter`: Convert time to other timezones and compute time expressions or find time remaining until any date-time. See [Time](#time) for examples.\n- `Units Converter`: Compute and Convert units to other units. See [Units](#units) for examples.\n- `Normal Calculator`: Supports functions such as `cos`, `sin`, `tan`. Check [Calculator](#calculator) for examples.\n- `Complex Numbers` Calculator: Also supports Normal Calculator's functions. Check [Calculator](#calculator) for examples.\n- `Percentage Calculator` Calculate percentages see [Percentages](#percentages) for examples.\n    - Supports all expressions that Normal Calculator and Complex Calculator Support\n- `Base N Calculator`: Calculate numbers and expressions to other number base. See [Base N Calculator](#base-n-calculator) for examples.\n    - Base 16 (`hex`): Calculates expression to decimal, biniary, octal, color (i.e `RGB`, `YSV`, etc), Bytes (representation of `string`)\n    - Base 2 (`bin`), Base 8 (`oct`), Base 10 (`dec`)\n    - Supports functions: `or`, `xor`, `and`, `mod`, `div`, `+`, `-`, `/`  \n\n**The only launcher specific files for `ulauncher` and `albert` are `main.py`, `__init__.py` in the root of this project**\n\n**Dependencies**: [simpleeval](https://github.com/danthedeckie/simpleeval), [pint](https://pypi.org/project/Pint/) [parsedatetime](https://pypi.org/project/parsedatetime/) and [pytz](https://pypi.org/project/pytz/) (for parsedatetime)\nCurrency and Unit converter as well as a Calculator for numbers, complex numbers, percentages and time that supports mathematical functions and Complex Numbers.\n\nOptional Dependencies: [babel](https://github.com/python-babel/babel). Installing this will format your results in your language/locale.\n\n## Contents\n\n - [Install for Ulauncher](#install-for-ulauncher)\n - [Install for Albert](#install-for-albert)\n - [How to setup](#how-to-setup)\n - [Examples](#examples)\n - [Known Issues](#known-issues)\n - [Extending and more](#extending-and-more)\n\n\n## Install for Ulauncher\n\nThus extension depends on [Pint](https://github.com/hgrecco/pint), [simpleeval](https://github.com/danthedeckie/simpleeval) and [parsedatetime](https://github.com/bear/parsedatetime). Install them with:\n```bash\n# You probably have some of them already installed\n/usr/bin/python3 -m pip install Pint simpleeval parsedatetime pytz\n\n# Optionally for translations and formatting to your locale\n/usr/bin/python3 -m pip install babel\n```\n\nOpen `Ulauncher` go to `Extensions` \u003e `Add extension` and paste https://github.com/tchar/ulauncher-albert-calculate-anything\n\n## Install for Albert\n\nSimilarly to `Ulauncher` the same dependencies are are required.\n\nTo install the extension for Albert run\n```bash\n# You probably have some of them already installed\n/usr/bin/python3 -m pip install Pint simpleeval parsedatetime pytz\n\n# Optionally for translations and formatting to your locale\n/usr/bin/python3 -m pip install babel\n\n# Determine Install location\n[ -z \"$XDG_DATA_HOME\" ] \u0026\u0026 INSTALL_DIR=~/.local/share || INSTALL_DIR=$XDG_DATA_HOME\n\n# Create module directory if not exists\nmkdir -p $INSTALL_DIR/albert/org.albert.extension.python/modules/\n\n# Install extension\ngit clone https://github.com/tchar/ulauncher-albert-calculate-anything $INSTALL_DIR/albert/org.albert.extension.python/modules/\n```\n\nOpen albert, enable `Python` extensions and then enable the `Calculate Anything` extension.\n\nYou can double click it to open module's location and edit `__init__.py` to add your preferences.\n\n## How to Setup\n\n### Albert\n\nIf you are using Albert open the extension location normally at `~/.local/share/albert/org.albert.extension.python/modules/ulauncher-albert-calculate-anything/__init__.py` and edit the preferences mentioned below in the apropriate variable `API_KEY`, `CACHE`, `DEFAULT_CURRENCIES`, `DEFAULT_CITIES`, `SHOW_EMPTY_PLACEHOLDER` or `__triggers__` for the keyword\n\nThe extension can work in albert without keywords if you comment out the `__triggers__` option, however if another extension has the keyword you type, `Calculate Anything won't trigger` (see [relevant issue](https://github.com/albertlauncher/albert/issues/978))\n\n### Ulauncher\n\nIf you are using Ulauncher use the extension preferences.\n\n### Set Currency Provider\n\nYou can select from different currency providers. Supported providers are:\n- [fixer.io](https://fixer.io/): You need an API Key (see [Set API Key](#set-api-key)). Get a free one at https://fixer.io/signup (go to your `fixer.io` dashboard and get your API key). This will include all providers from Internal\n- Internal: If you select this option currencies are going to be fetched from a variety of providers like [coinbase](https://www.coinbase.com/), [mycurrency.net](https://www.mycurrency.net/) and [European Central Bank](https://www.ecb.europa.eu/home/html/index.en.html): No API key is requred.\n\nPreferences:\n- ULauncher: Select one in currency provider\n- Albert: Modify the `CURRENCY_PROVIDER` in `__init__.py` to one of [`fixerio`, `internal` (European Central Bank)]\n\n### Set API Key\n\nIn order for the currency conversion to work for providers that need an API Key, you need to set it in the preferences.\n- ULauncher: Copy your api key to the `API KEY` box in preferences\n- Albert: Modify the `API_KEY` in `__init__.py`\n\n\n### Cache\n\nFor currency conversion you can enable the cache for a minimum of 1 day up to 1 year. This will store the results fetched by your currency provider to prevent redundant requests. This is especially helpful if you have a free plan on a paid currency provider that limits your requests. It will also display the results faster, since no request is made. If all requested currencies have been cached, no request is made.\n\n- Ulauncher: Edit `Currency Cache` in the extension preferences\n- Albert: Edit `CACHE=86400` in `__init__.py` and set it to your interval in seconds\n\n### Default currency\n\nIn the preferences you can define a comma separated list of default currencies to show when typing conversion without target unit/currency.\nDefaults to `USD,EUR,CAD,GBP,AUD`\n\n- ULauncher: Edit in `Default Currencies` preferences\n- Albert: Edit `DEFAULT_CURRENCIES` in `__init__.py`\n\n### Default cities\n\nIn the preferences you can define a comma separated list of default cities when using the time command\n\n- ULauncher: Edit in `Default Currencies` preferences\n- Albert: Edit `DEFAULT_CITIES` in `__init__.py`\n\n### Units Conversion Mode\n\nIn the preferences you can define a units conversion mode. For now there is normal (default) and crazy.\n\nCrazy means that the unit converter/calculator tries to convert all possible units (currency included) available under the name.\n\nSee [Currency](#crazy-conversion) and [Units](#crazy-conversion-1) for more\n\n**Crazy mode is experimental and bugs are to be expected**\n\n- ULauncher: Edit in `Units Conversion mode` preferences\n- Albert: Edit `UNITS_CONVERSION_MODE` in `__init__.py`\n\n### Show Empty Placeholder\n\n - ULauncher: Default is `No`. Set to `Yes` to show an empty placeholder when extension doesn't return anything\n - Albert: Change `SHOW_EMPTY_PLACEHOLDER=True` in `__init__.py`\n\n### Commands and Syntax\n\nTo calculate/convert anything you can use the keywords\n- `=`: For currency, units and calculator\n- `time`: For time calculations\n- `dec`/`hex`/`bin`/`oct`: For base-n and calculations\n\nYou can go directly to [examples](#examples) or use the ones from the demo\n\nTo convert currency type your keyword and then\n\n- `AMOUNT CURRENCY` to get conversion in the default currencies set in the preferences (requires cache)\n- `AMOUNT CURRENCY in(or to) CURRENCY1,CURRENCY2,CURRENCY3`\n- `CURRENCY in(or to) CURRENCY1,CURRENCY2,CURRENCY3`\n\nTo convert units use\n\n- `AMOUNT UNIT in(or to) UNIT1,UNIT2,UNIT3`\n- `UNIT in(or to) UNIT1,UNIT2,UNIT3`\n\nComma separated units and currencies can have spaces between them.\n\nFor time you can use the time keyword with a syntax\n\n- `time` To get the current time plus the `default cities` you defined in the preferences\n- `time at CITY,[COUNTRY|COUNTRY CODE|STATE CODE]` to get the current time for a specified city\n- `time + AMOUNT [MONTH|YEAR|WEEK|DAY|HOUR|MINUTE|SECOND] [+ AMOUNT ...] [at CITY, [COUNTRY|COUNTRY CODE|STATE CODE]]` to get the time after the calculation at a specified city.\n\nTo calculate an expression just type your expression as in the demo\n - You can use functions such as `tan`,`atan`,`asinh`\n - You can use complex numbers too like `1 + 5i`\n\nTo calculate percentages you can use one of the following\n- `AMOUNT1% of AMOUNT2` to calculate the AMOUNT1 percent of AMOUNT2\n- `AMOUNT1 as % of AMOUNT2` to calculate AMOUNT1 as a percentage of AMOUNT2\n\nIf you select one results it will be copied to clipboard.\n\n## Examples\n\n### Currency\n\n#### **Simple Conversion**\n- Convert 10 euros to american dollars\n    - `10 eur to USD`\n    - `10 euros to $`\n    - `10 eurs to dollars`\n\n#### **Multiple Conversion**\n- Convert 10 euros to american dollars, canadian dollars, bitcoin, and mexican pesos\n    - `10 EUR to USD,canadian,bitcoin,mexican`\n\n#### **Crazy Conversion**\n`crazy` mode must be enabled in preferences\n- Convert 1 us dollar per pound to euros per kilogram\n    - `1 $ / pound to EUR / kg`\n- Convert 10 us dollars  per square foot squared to canadian dollars per meter squared\n    - `10 $ / foot ^ 2 to CAD / meter ^ 2`\n\n### Time\n\nYou can also add and subtract time\nFor example if now is `2021-07-05 14:14:42` then you can use the following\n\nBe careful to use date timespans like `2 years 5 months 2 weeks 3 days 1 hour 4 minutes 3 seconds` and not dates like `December 2022`.\n\n**In the following examples the time returned is accompanied by the date time in the `default cities` you specified in the extension preferences**\n\n- `time`: Returns 2021-07-05 14:14:42 as well as the date time in the default cities specified in settings\n- `time plus 1 hour`: Returns Today at 15:14:42 \n- `time + 1 day`: Returns Tomorrow at 14:14:42\n- `time minus 1 day`: Returns Yesterday at 14:14:42\n- `time + 2 hours` 2 minutes 5 seconds: Returns Today at 15:16:47\n- `time + 1 year`: Returns 2022-07-05 14:14:42\n- `time + 1 year 2 days 2 hours - 4 years 4 minutes`: Returns 2018-07-07 16:10:42\n\n#### **Specifying a target city**\n\nYou can use all the commands above followed by `at CITY NAME` or `at CITY NAME, COUNTRY NAME|COUNTRY CODE|STATE CODE` to get te result in your local time as well as the specified city\n- `time at Prague`\n- `time + 2 hours at Madrid`\n- `time + 2 hours at Vancouver, CA`: (There are two Vancouvers, so by specifying CA as returns the Canadian Vancouver)\n- `time + 2 days 3 seconds at Vancouver, Canada`\n- `time + 1 hour + 3 years at Athens, AL`: (Athens AL refers to Athens at Alabama)\n\n#### **Using until**\n\nYou can also use the until command (**Experimental**) to calculate duration of time until a specific date\n\n**Note: The midnight keyword shifts one day after, so midnight is considered to belong in the *next* day**\n\nIn the following examples you can specify a specific date and time or say for example a number of years months etc.\n\nKeywords such as `a/next/last/previous/ago`, `years/months/weeks/days/hours/minutes/seconds`, `morning/noon/afternoon/evening/night/midnight`, `tomorrow/yesterday` and the combination of those will work like in the normal mode.\n\n- `time until December 31 midnight`: Returns remaining days, hours minutes until January 00:00:00 (end of day for December)\n- `time until midnight`: Returns remaining hours minutes seconds until midnight for this day (midnight is at 00:00:00)\n- `time until tomorrow`: Day starts at 09:00\n- `time until tomorrow evening`: Hours/Days until tomorrow at 18:00 \n- `time until a year ago`: Negative result\n- `time until 2000000 year`: Easter egg\n\nAnd many more combinations\n\n### Units\n\nThe units supported are all units that [pint](https://github.com/hgrecco/pint) supports (which is quite a lot)\n\n#### **Simple Conversion**\n- Convert 100 fahrenheit to celsius\n   - `100 f to c`\n\n#### **Multiple Conversion**\n  - Convert 20 centimeters to inches and meters\n    - `20 cm to inches, m`\n    - `20 cm to inches,meters`\n\n#### **Advanced Conversion**\n- Convert kilometers per meter to centimeters per minute, kilometers per minute, inches per second and centimeters per second.\n    - `20 km/h to cm/min, km/minute, in/s, cm/sec`\n- Convert kilowhats per second to horsepower per hour and megawatts per second\n    - `10 kw/sec to hp/h, mw/s`\n- Convert meters per squared second to kilometers per squared hour\n    - `10 m/s^2 to km/h^2`\n- Convert megabytes per second to gigabytes per hour\n    - `10 mb/s to gb/h`\n\n**You can lieterally convert anything if the apropriate units match**\n- Convert kilometer * centimeter * second per gibabyte to inches * meter * hour per megabyte\n    - `10 km * cm * s / gb to inches * meter * hour / mb`\n\n#### **Crazy Conversion**\n`crazy` mode must be enabled in preferences\n- `1 m to cm` may have two compatible units `meter` and `mole`, so it will return both results\n\n### Percentages\n\n#### **Simple Cases**\n- Calculate what is 10% of 40\n    - `10% of 40`: Answer is 4\n- To calculate what percentage of 30 is 5, any of the following works\n    - `5 is what % of 30`: Answer is 16.6667%\n    - `5 is what % 30`\n    - `5 as % of 30`\n    - `5 in % of 30`\n    - `5 in % 30`\n\n#### **Advanced Cases**\n- `10% of cos(pi) + 5`: Answer is 0.4\n- `3 + 2 * pi % of cos(pi) + 5`: Answer is 0.371328\n- `5 as % sqrt(2) + 5`: Answer is 77.9519%\n- `1 + sin(pi) as % sqrt(2) + 5`: Answer is 15.5904%\n\n### Calculator\n\nThe calculator works like a normal calculator, but is able to work with complex numbers too.\n\nThe following constants exist: `pi`, `e`, `tau` and others from [cmath](https://docs.python.org/3/library/cmath.html)\n\nThe following functions exist: `phase`, `polar`, `rect`, `exp`, `log`, `log10`, `sqrt`, `acos`, `asin`, `atan`, `cos`, `sin`, `tan`, `acosh`, `asinh`, `atanh`, `cosh`, `sinh`, `tanh` and others from [cmath](https://docs.python.org/3/library/cmath.html)\n\n#### **Simple Cases**\n- `10 + sqrt(2)`: Answer is 11.4142\n- `10 + cos(pi) + 30 * e ^ 2`: Answer is 230.672\n\n#### **Complex Numbers**\nUse i as the imaginary unit\n- `10 + sqrt(2) + i`: Answer is 11.4142 + i\n- `cos(1 + i)`: Answer is 0.83373 - 0.988898i\n- `e ^ (pi * i) + 1`: Answer is 0 (Euler's identity)\n\n### Base N Calculator\n\nUse with the keywords `hex`, `dec`, `bin`, `oct` by default.\n\n#### **Simple Cases**\n- `dec 1000`: Returns result in `hex`, `bin`, `oct`\n- `hex ffa12`: Returns result in `dec`, `bin`, `oct` as well as `bytes` representation of the input query (including spaces)\n- `bin 10101`: Returns result in `dec`, `hex`, `oct`\n\n#### **Special cases with `hex`**\nThe hex calculator will always produce the `byte` representation of its input query.\n\n#### **Color Conversion with `hex`**\nIf the input is in the format of #xxxxxx where xxxxxx is a valid hex number, it will convert the number representing a color to other color formats.\n- `hex #fa1234`: Returns colors result in `rgb`, `hsv`, `hsl`, `cmyk`.\n\n#### **Advanced Cases**\n- `dec/hex/bin/oct 10101 and 10110 xor 10 + 1010 - 1010 div 10 and 10101`: Returns the result in all available base-n (`dec`, `hex`, `oct`, `bin`)\n    - Digits must be valid in the base you are using (e.g 2012 is invalid for `bin`)\n\n## Known Issues\nIf at any moment currency stops showing try removing the currency cache file and restart the Launcher/program\n\nLinux\n```bash\nrm ~/.cache/com.github.tchar.calculate-anything/currency_data.json\n```\n\nWindows\n```powershell\nrm ~\\AppData\\Local\\tchar\\com.github.tchar.calculate-anything\\Cache\\currency_data.json\n```\nmacOS\n```zsh\nrm ~/Library/Caches/com.github.tchar.calculate-anything/currency_data.json\n```\n\n\n## Extending and More\n\nThe calculate_anything module does not depend on ulauncher or albert, only the `main.py` (for Ulauncher) and `__init__.py` (for albert) do. You can extend it for other cases.\n\nSee the [documentation](docs/API.md) for API call examples\n\nYou can also find a sample usage of the API using [prompt_toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) at the [prompt.py](misc/prompt.py) file.\n\nHere is a demo\n\n![](misc/demo-prompt_toolkit.gif)\n\n### Adding flags\n\nIf your currencie's flag is missing you can place it in the extension's flags directory at `calculate_anything/images/flags/` and restart your launcher or make a pull request to include it.\n\nMake sure to name your flag image in uppercase 2 letter name of your country. To make a currency flag, simply link the country flag you want to the currency `e.g ln -s US.svg USD.svg` or add a completely new flag For example American Dollar's flag is in `calculate_anything/images/flags/USD.svg`. You can use most image formats (i.e `svg`, `png`) \n\n\u003cdiv\u003eFlag Icons made by \u003ca href=\"https://www.freepik.com\" title=\"Freepik\"\u003eFreepik\u003c/a\u003e from \u003ca href=\"https://www.flaticon.com/\" title=\"Flaticon\"\u003ewww.flaticon.com\u003c/a\u003e\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchar%2Fulauncher-albert-calculate-anything","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftchar%2Fulauncher-albert-calculate-anything","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchar%2Fulauncher-albert-calculate-anything/lists"}