Skip to content

sniperXue/alfred-ldoce

 
 

Repository files navigation

alfred-ldoce-express Build Status

Alfred 3 workflow to quick look of Longman dictionary and creating Anki cards.

Search by headword or across all entries

Search by headword or across all entries

Create, choose and delete your decks in Anki

Create, choose and delete your decks in Anki

Use ⌘L for more info by large text and copy it

Use [⌘L] for more info by large text and copy it

Warnings, Notifications

search wichout Anki

Notification

Try this Anki theme (Scramble-sentences) to learning by created cards

anki-scramble-theme

Description

The search, ldoce <query>, uses Pearson's API to hunt for headwords and senses that match headeword/<query>. 25 results are retrieved by default for headword search. This workflow searches from Longman Dictionary of Contemporary English (5th edition)[ldoce5 - API]. And creates Anki cards by your choices (if an article of the current word in this API not existing audio examples the Alfred will create audio examples from Oddcast. [uses random voices: Julie, Kate, James]

Install

$ npm install --global alfred-ldoce
  • Download and import the deck example for Anki to install template for this grabbing from ldoce Api.

Requires: Node.js 7.6+, Alfred Powerpack, Anki intelligent flash cards, AnkiConnect plugin for Anki.

Usage

video presentation

In Alfred, type ldoce, Enter, and your query.
  • ldoce <query> — Search for entries with the given headword

  • ldoces <query> — Generic text search across all entries (searchs all entry fields)

    • , or ⌘ + NUM — Show senses of selected headword
    • ⌥ + ↩ — Show phrasal verbs for selected headword if exist (for verbs only).
    • or ⌘ + L — Show Quick Look preview from ldoceonline.com/dictionary/query
  • <query> — Search for previous matching ldoce

    • , or ⌘ + NUM or click — select to choose sense for creating card
    • ⌘ + L — Show one of example sentences in Alfred's Large Type window
    • ⌘ + ↩ — create card from selected senses of word
    • ⌥ + ↩ — create card from all matching of current query
  • ldl or ldp (last query or last query for phrasal verb) go to the definition of the word of the last query

  • <!set> or <!del> — Choose, create or delete deck for Anki

  • If you notice this sign [ 🔦 ] it means the current deffinition exist additional words for search. Hit ⌥ + ↵ to show and search by this words.

Note: OS X's "delete word" shortcut ( ⌥ + ⌫ ) is very handy for backing out of a current search result.

notation conventions

regular headword : Regular

gramatical example : Gramatical

phrasal verb : Phrasal verbs

collocation : Collocation

runon : Run-on sentences

Configuration

  • There is three options:
    • language: Choose your language (it use google-translate-api).
    • path_to_anki-media: by default don't need to change.
    • note_type: "Ldoce-Express" - by default don't need to change.

ToDo

  • Update Readme
  • Tests

License

MIT © bikeNik

About

Alfred-ldoce-anki

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%