Giter Club home page Giter Club logo

alfred-ldoce's Introduction

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

Preview

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

or as ldoce-Express.alfredworkflow

  • 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 query

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

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

  • < query > — Search for previous matching ldoce < query >

    • , or ⌘ + NUM or click — select to choose sense for creating card
    • ⌘ + L — Show one of vocabulary entries in Alfred's "Large Type" window
    • ⌘ + ↩ — create card from selected senses of word
    • ⌥ + ↩ — create card from all matching of current query
    • hit fn + ↩ — export current vocabulary entries to other workfows "Call External"
    • hit ⌃ + ↩ to turn back from some additional boxes to current session of query
  • < ldl > (last query or last query for phrasal verb) go to the definition of the word of the last query

  • If you notice this sign 🔦 it means the current deffinition exist additional words for search. Hit ⌃ + ↵ (SEE ALSO) to show and search by this words.

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

    • <!set> - choose another deck for new cards
    • <!del> - delete any deck (with cards)
    • <!refresh> - Refreshing info by AnkiConnect. It will be done automaticaly after each query set, but can be used forcibly by this command.

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: /Library/Application Support/Anki2/< Profile name of Anki >/collection.media.
    • note_type: "Ldoce-Express" - by default don't need to change.

ToDo

  • Update Readme
  • Add Frequency by "Ldoce 9000"
  • Add more info (like "due", "new", "suspend" and count of cards) through the AnkiConnect
  • Tests

By me a coffee

Buy Me A Coffee

License

MIT © bikeNik

alfred-ldoce's People

Contributors

bikenik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

alfred-ldoce's Issues

Disable App Nap

ankiConnect docs

for Anki 2.0

  • defaults write net.ichi2.anki NSAppSleepDisabled -bool true

for Anki 2.1 (in my case works)

  • defaults write org.qt-project.Qt.QtWebEngineCore NSAppSleepDisabled -bool true

Google Translate API causes to error when adding a word to Anki

[2019-04-10 15:01:16][utility.junction] Processing output of 'utility.filter' with arg '{
	"items": [
		{
			"title": "Error\n    at /usr/local/lib/node_modules/alfred-ldoce/node_modules/google-translate-api/index.js:105:17\n    at processTicksAndRejections (internal/process/task_queues.js:86:5)",
			"subtitle": "Press ⌘L to see the full error and ⌘C to copy it.",
			"valid": false,
			"text": {
				"copy": "```\nError\n    at /usr/local/lib/node_modules/alfred-ldoce/node_modules/google-translate-api/index.js:105:17\n```\n\n-\nldoce-Express 1.3.9\nAlfred 3.8.1\ndarwin x64 18.5.0",
				"largetype": "Error\n    at /usr/local/lib/node_modules/alfred-ldoce/node_modules/google-translate-api/index.js:105:17"
			},
			"icon": {
				"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
			}
		}
	]
}

New flashcards application support.

Hi,

Great workflow! As I do not use Anki but Quizlet I would like to know if you are planning adding support for new flashcards applications?

Thank you!

2 issues

my english is not good, sorry, i will say it simplly (wmware+mac os)

  1. serching without anki connection (i'm running anki)
    image
  2. HTTP Error
    image

i'm trying my best to install VM and your soft, learned one by one on internet, thank you

npm install failed for the reason submodule xmlbuilder/lib/XMLStringifier.js:153:15 Invalid character

Hi , nice job

when i install [email protected] , it works well , but when the version after 1.2.2 cause the Invalid character error

npm install failed for submodule xmlbuilder/lib/XMLStringifier.js:153:15 Invalid character

{ Error: Command failed: alfred-link
Error: Invalid character (�) in string: ...
🔦 SEE ALSO at index 4
    at XMLStringifier.module.exports.XMLStringifier.assertLegalChar (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/xmlbuilder/lib/XMLStringifier.js:153:15)
    at XMLStringifier.assertLegalChar (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/xmlbuilder/lib/XMLStringifier.js:4:59)
    at XMLStringifier.module.exports.XMLStringifier.eleText (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/xmlbuilder/lib/XMLStringifier.js:33:19)
    at new XMLText (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/xmlbuilder/lib/XMLText.js:17:35)
    at XMLElement.module.exports.XMLNode.text (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/xmlbuilder/lib/XMLNode.js:165:15)
    at XMLElement.module.exports.XMLNode.txt (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/xmlbuilder/lib/XMLNode.js:365:19)
    at walk_obj (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/plist/lib/build.js:127:30)
    at walk_obj (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/plist/lib/build.js:110:9)
    at walk_obj (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/plist/lib/build.js:110:9)
    at walk_obj (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/plist/lib/build.js:110:9)


    at Promise.all.then.arr (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/execa/index.js:236:11)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
  code: 1,
  killed: false,
  stdout: '',
  stderr: 'Error: Invalid character (�) in string: ...\n🔦 SEE ALSO at index 4\n    at XMLStringifier.module.exports.XMLStringifier.assertLegalChar (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/xmlbuilder/lib/XMLStringifier.js:153:15)\n    at XMLStringifier.assertLegalChar (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/xmlbuilder/lib/XMLStringifier.js:4:59)\n    at XMLStringifier.module.exports.XMLStringifier.eleText (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/xmlbuilder/lib/XMLStringifier.js:33:19)\n    at new XMLText (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/xmlbuilder/lib/XMLText.js:17:35)\n    at XMLElement.module.exports.XMLNode.text (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/xmlbuilder/lib/XMLNode.js:165:15)\n    at XMLElement.module.exports.XMLNode.txt (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/xmlbuilder/lib/XMLNode.js:365:19)\n    at walk_obj (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/plist/lib/build.js:127:30)\n    at walk_obj (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/plist/lib/build.js:110:9)\n    at walk_obj (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/plist/lib/build.js:110:9)\n    at walk_obj (/Users/maintiendrai/.nvm/versions/node/v8.11.2/lib/node_modules/alfred-ldoce/node_modules/plist/lib/build.js:110:9)\n',
  failed: true,
  signal: null,
  cmd: 'alfred-link',
  timedOut: false }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.