• Stars
    star
    721
  • Rank 62,329 (Top 2 %)
  • Language
    Python
  • License
    Other
  • Created over 10 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Convert between different units in Alfred

Alfred-Convert

Convert between different units offline in Alfred 3 & 4.

Alfred-Convert uses a built-in library for lightning-fast conversions.

You can also add your own custom units.

Note: Currency conversions do require occasional Internet connectivity to update exchange rates. Alfred-Convert will otherwise work just fine without an Internet connection.

Downloading

Download from GitHub releases.

Note: Version 3.7 and above only supports Alfred 4+. If you're still using Alfred 3, please download v3.6.2.

Usage

  • conv <quantity> <from unit> [<to unit>] β€” Perform a conversion
    • ↩ β€” Copy result without thousands separator to pasteboard
    • ⌘C β€” Copy result with thousands separator to pasteboard
    • βŒ˜β†© β€” Add/remove destination unit as default for this dimensionality
    • ⌘L β€” Show result in Alfred's Large Type window
  • convinfo β€” View help file and information about the workflow, or edit custom units and active currencies
    • View Help File β€” Open this page in your browser
    • View All Supported Currencies β€” View/filter the list of all supported currencies in Alfred
    • Edit Active Currencies β€” Edit the list of active currencies in your default text editor
    • Edit Custom Units β€” Edit the list of custom currencies in your default text editor

Conversions

NOTE: Only a limited number of fiat currencies are supported by default. Additional rates are only supported if you set a key for the openexchangerates.org API in the workflow's configuration sheet. You can sign up for a free account here. When you're signed up, copy the App ID from the email you receive or this page into the APP_KEY field in the configuration sheet.

  • conv [<context>] <quantity> <from unit> [<to unit>] β€” Perform a conversion
    • ↩ or ⌘C β€” Copy the result to the pasteboard
    • βŒ˜β†© β€” Add/remove destination unit as default for this dimensionality
    • ⌘L β€” Show result in Alfred's Large Type window

If no destination unit is specified, any defaults you've saved will be used (that aren't the same as the source unit).

The syntax is simple: an optional context, the quantity, the unit you want to convert from then (optionally) the unit you want to convert to. For example:

  • conv 128 mph kph
  • conv 72in cm
  • conv 100psi bar
  • conv 20.5 m/s mph
  • conv 100 eur gbp

Or with a context:

  • conv spectroscopy 1Γ… eV (or conv sp 1Γ… eV)

It doesn't matter if there is a space between the quantity and the units or not. Alfred-Convert will tell you if it doesn't understand your query or know the units.

Actioning an item (selecting it and hitting ↩) will copy it to the clipboard. Using ⌘+L will display the result in Alfred's large text window, ⌘+C will copy the selected result to the clipboard.

Configuration

The workflow is configured via the configuration sheet (the [𝒙] icon) in Alfred Preferences and via a couple of text files in its data directory.

Configuration sheet

Basic configuration is performed in the configuration sheet:

Option Meaning
APP_KEY API key for openexchangerates.org.
COPY_UNIT Include unit when copying conversion result. Any value but 0 or empty turns this option on.
CURRENCY_DECIMAL_PLACES Overrides the default DECIMAL_PLACES setting for currency conversions.
DECIMAL_PLACES Number of decimal places to show in results.
DECIMAL_SEPARATOR Character to separate whole numbers and decimal fractions. Used for parsing input and generating output.
DYNAMIC_DECIMALS Dynamically increase the number of decimal places (up to 10) so that the result is non-zero. Any value but 0 or empty turns this option on.
THOUSANDS_SEPARATOR Character to delimit thousands Used for parsing input and generating output.
UPDATE_INTERVAL How often (in minutes) to update currency exchange rates.

Active currencies

By default, all supported fiat currencies (provided you've set APP_KEY in the configuration sheet) and a handful of the most popular cryptocurrencies are active.

  • convinfo
    • View All Supported Currencies
    • Edit Active Currencies

Use Edit Active Currencies to open the list of active currencies in your default editor. Add the symbol for the currency you'd like to activate on a new line in this file.

You can use View All Supported Currencies to search for the currency you'd like to activate, then use ⌘C on the result to copy the symbol to the pasteboard.

Custom units

See Adding custom units.

Supported units

Currently, Alfred-Convert only supports the units understood by the underlying Pint library plus currencies and a handful of additional units.

You can add your own custom units to the workflow. If you think they'd be useful to everyone, please create a corresponding GitHub issue to request addition as a default unit or submit a pull request.

Supported currencies

To convert, use the appropriate abbreviation for the relevant currencies, e.g. conv 100 eur gbp.

You can also view (and search) the list from within Alfred by using the keyword convinfo and choosing View All Supported Currencies.

All supported currencies.

Adding custom units

You can add your own custom units using the format defined by Pint. Add your definitions to the unit_definitions.txt file in the workflow's data directory.

To edit this file, enter convinfo in Alfred and select Edit Custom Units. The unit_definitions.txt file will open in your default text editor.

Please see the Pint documentation for the required format. See Pint's default unit definitions for examples.

Releases

See CHANGELOG for more information.

Release Date
3.7.0 2020-02-20
3.6.2 2019-09-06
3.6.1 2019-05-30
3.6.0 2019-05-06
3.5.3 2019-01-26
3.5.2 2019-01-26
3.5.1 2018-01-13
3.5 2018-01-12
3.4 2017-12-26
3.3.1 2017-11-21
3.3 2017-11-20
3.2.2 2017-11-07
3.2.1 2017-11-04
3.2 2017-11-02
3.1 2017-11-02
3.0 2017-07-16
2.6 2017-06-15
2.5 2015-12-11
2.4 2015-11-28
2.3 2015-11-26
2.2 2015-07-16
2.1 Never released
2.0 2014-12-26
1.2 2014-08-19
1.1 2014-08-09

Thanks, copyright, licensing

All other code/media are released under the MIT Licence.

More Repositories

1

alfred-workflow

Full-featured library for writing Alfred 3 & 4 workflows
Python
2,970
star
2

awgo

Go library for Alfred 3 + 4 workflows
Go
859
star
3

zothero

Rapidly search and cite Zotero entries from Alfred
Python
477
star
4

alfred-stackexchange

Search StackOverflow.com from Alfred
Python
434
star
5

alfred-fixum

Fix Alfred 3 Python workflows affected by the Sierra/Alfred-Workflow background process bug
Python
369
star
6

alfred-ssh

Open SSH/SFTP/mosh connections from Alfred 3+
Go
356
star
7

alfred-firefox

Search and control Firefox from Alfred
Go
342
star
8

alfred-repos

Browse, search and open Git repositories in Alfred
Python
313
star
9

alfred-searchio

Alfred workflow to auto-suggest search results from multiple search engines and languages.
HTML
306
star
10

alfred-pwgen

Generate passwords with Alfred
Python
290
star
11

alfred-fakeum

Generate fake test data in Alfred
Python
288
star
12

alfred-gcal

View Google Calendar events in Alfred
Go
222
star
13

alfred-reddit

Browse Reddit from Alfred
Python
214
star
14

alfred-safari-assistant

Alfred 3+ workflow to search and use Safari bookmarks, history, reading list and tabs.
Go
190
star
15

alfred-vpn-manager

Manage Tunnelblick & Viscosity VPN connections from Alfred
Python
154
star
16

alfred-smartfolders

Quick access to your Smart Folders (Saved Searches) from Alfred
Python
119
star
17

alfred-fuzzy

Fuzzy search helper for Alfred 3+ workflows
Python
93
star
18

alfred-appscripts

Alfred workflow to search and run/open AppleScripts for the active application
Python
87
star
19

alfred-sublime-text

Filter and open your Sublime Text (2 and 3) project files from Alfred.
Go
73
star
20

i-sheet-you-not

Automagically turn Excel spreadsheets into Alfred 3 Workflows
Python
67
star
21

alfred-mailto

Send emails to recipients and groups from Alfred
Python
64
star
22

alfred-fuzzyfolders

Fuzzy search across folder subdirectories
Python
57
star
23

alfred-unicode

Preview Unicode characters and emoji in Alfred
Go
57
star
24

alfred-booksearch

Search Goodreads.com from Alfred
Go
56
star
25

alfred-similar-image-search

Google Image searches based on local files via Alfred
Python
50
star
26

alfred-packal-search

Search Packal.org's collection of Alfred workflows from Alfred
Python
43
star
27

alfred-services

Run macOS services from Alfred
Go
39
star
28

go-safari

Access Safari bookmarks, reading list, history and tabs (macOS)
Go
38
star
29

alfred-relative-dates

Alfred workflow to generate relative dates in different locales
Python
35
star
30

alfred-network-location

List, filter and activate network locations from within Alfred
Python
32
star
31

alfred-duden

Search the duden.de German dictionary from Alfred. With auto-suggest.
Python
32
star
32

alfred-index-demo

Demonstration of using sqlite as a search index in Alfred
Python
26
star
33

alfred-default-folder-x

Access your Default Folder X favourites and recent items in Alfred
Python
25
star
34

alfred-forklift

Filter ForkLift favourites in Alfred
Go
23
star
35

alfred-resolve-url

Alfred workflow to resolve HTTP redirects and return the canonical URL
Python
14
star
36

alfred-gifs

Say it with GIFs (and Alfred)
Python
12
star
37

bundler-icon-server

Generate PNG icons from icon fonts like Font Awesome
HTML
12
star
38

go-env

Access environment variables & populate structs from them
Go
11
star
39

alfred-errnum

Search macOS errors in Alfred 3
Python
10
star
40

alfred-mpd

Control mpd music player from Alfred 3
Python
9
star
41

go-fuzzy

Fuzzy matching & sorting for Go
Go
9
star
42

alfred-glosbe

Translate in Alfred using Glosbe.com
Python
8
star
43

CopyLink.mmBundle

MailMate Command to copy a link to the currently selected email
Python
8
star
44

alfred-transmit

Rapidly search Transmit favourites in Alfred
Go
5
star
45

alfred-bundler-python-demo

Demo Workflow showing how to use the Alfred Bundler in Python
Python
5
star
46

cookiecutter-alfred-workflow

cookiecutter template for Alfred 2 workflows
Python
4
star
47

alfred-star-ratings

Add star ratings to your files on OS X with Alfred
Python
4
star
48

alfred-excel-demo

Demo workflow showing how to use an Excel file as a data source for an Alfred Script Filter
Python
4
star
49

alfred-reminders-demo

Goto lists in Reminders.app
Python
3
star
50

bundler-icon-server-iconpacks

Icon packs for Bundler Icon Server
2
star
51

alfred-subdir-search

Alfred 2 Workflow to search subdirectories
Python
2
star
52

alfred-flixsearch

Search FlixSearch.io from Alfred 2
Python
2
star
53

www.deanishe.net

Hugo static site source
Go
1
star
54

just-a-test

Test Repo for GH API
1
star
55

alfred-workflow-dummy

A dummy repo for testing Alfred-Workflow's update functionality
Python
1
star
56

deanishe.github.io

Generated contents of www.deanishe.net
HTML
1
star