All Projects → cute-jumper → bing-dict.el

cute-jumper / bing-dict.el

Licence: other
Minimalists' Bing dictionary for Emacs

Programming Languages

emacs lisp
2029 projects

Projects that are alternatives of or similar to bing-dict.el

Jsearch
jSearch(聚搜) 是一款专注内容的chrome搜索扩展,一次搜索聚合多平台内容。
Stars: ✭ 193 (+302.08%)
Mutual labels:  bing
bing-wallpaper
Python Skript that sets the daily www.bing.com picture as a Desktop Wallpaper
Stars: ✭ 21 (-56.25%)
Mutual labels:  bing
Bing-Maps-V8-TypeScript-Definitions
This project contains the TypeScript definitions for the Bing Maps V8 Web Control.
Stars: ✭ 36 (-25%)
Mutual labels:  bing
Search Engine Parser
Lightweight package to query popular search engines and scrape for result titles, links and descriptions
Stars: ✭ 216 (+350%)
Mutual labels:  bing
react-leaflet-bing
Bing layer as React component for Leaflet | This repo is obsolete. Plz, use https://github.com/TA-Geoforce/react-leaflet-bing
Stars: ✭ 13 (-72.92%)
Mutual labels:  bing
Scrapy-SearchEngines
bing、google、baidu搜索引擎爬虫。python3.6 and scrapy
Stars: ✭ 28 (-41.67%)
Mutual labels:  bing
Msmarco
Utilities, Baselines, Statistics and Descriptions Related to the MSMARCO DATASET
Stars: ✭ 175 (+264.58%)
Mutual labels:  bing
freshpaper
This utility automatically sets the wallpaper of the day from various sources as your Desktop wallpaper.
Stars: ✭ 35 (-27.08%)
Mutual labels:  bing
Awesome-meta-tags
📙 Awesome collection of meta tags
Stars: ✭ 18 (-62.5%)
Mutual labels:  bing
BingMapsSDSToolkit
This toolkit makes it easy to use the Bing Maps Spatial Data Services (SDS) in .NET
Stars: ✭ 39 (-18.75%)
Mutual labels:  bing
Sitedorks
Search Google/Bing/Ecosia/DuckDuckGo/Yandex/Yahoo for a search term with a default set of websites, bug bounty programs or a custom collection.
Stars: ✭ 221 (+360.42%)
Mutual labels:  bing
uranus
[W.I.P] An ecosystem of crawlers for detecting: leaks, sensitive data exposure and attempts exfiltration of data
Stars: ✭ 22 (-54.17%)
Mutual labels:  bing
Google-Blocklist
适用于uBlacklist的订阅列表,拯救Google等搜索引擎的搜索体验(过滤内容农场、机器翻译站、垃圾站点)
Stars: ✭ 70 (+45.83%)
Mutual labels:  bing
Idt
Image Dataset Tool (idt) is a cli tool designed to make the otherwise repetitive and slow task of creating image datasets into a fast and intuitive process.
Stars: ✭ 202 (+320.83%)
Mutual labels:  bing
gosimac
Fetch the wallpaper from Bing, Unsplash, etc.
Stars: ✭ 22 (-54.17%)
Mutual labels:  bing
Bing Upyun
轻量必应每日一图API,支持上传至又拍云调用,支持图片处理(高斯模糊、灰阶),支持回溯。
Stars: ✭ 179 (+272.92%)
Mutual labels:  bing
bing-daily-photo
A simple PHP class to fetch Bing's photo of the day.
Stars: ✭ 34 (-29.17%)
Mutual labels:  bing
bing-ip2hosts
bingip2hosts is a Bing.com web scraper that discovers websites by IP address
Stars: ✭ 99 (+106.25%)
Mutual labels:  bing
safe-search
Sets the built-in adult content filter (most often: safe search) on Google, YouTube, Bing, Yahoo, DuckDuckGo, Startpage, Dogpile, Yandex, Vimeo, Reddit, Ecosia, Dailymotion, Qwant, and Patreon.
Stars: ✭ 16 (-66.67%)
Mutual labels:  bing
awesome-search-engine-optimization
A curated list of backlink, social signal opportunities, and link building strategies and tactics to help improve search engine results and ranking.
Stars: ✭ 82 (+70.83%)
Mutual labels:  bing

bing-dict.el

MELPA MELPA Stable

A minimalists' Emacs extension to search http://www.bing.com/dict. Support English to Chinese and Chinese to English.

极简主义者的 Emacs 必应词典。 支持中英互译。

Setup

You can install via melpa.

If installing this package manually:

(add-to-list 'load-path "/path/to/bing-dict.el")
(require 'bing-dict)

Usage

You can call bing-dict-brief to get the explanations of you query. The results will be shown in the echo area.

Here is the screenshot:

bing-dict-screenshot1

You should probably give this command a key binding:

(global-set-key (kbd "C-c d") 'bing-dict-brief)

Customization

You can set the value of bing-dict-add-to-kill-ring to control whether the result should be added to the kill-ring or not. By default, the value is nil. If set to t, the result will be added to the kill-ring and you are able to use C-y to paste the result.

Also, sometimes synonyms and antonyms could be useful, set bing-dict-show-thesaurus to control whether you need them or not. The value of bing-dict-show-thesaurus could be either nil, 'synonym, 'antonym or 'both. The default value is nil. Setting the vaule to 'synonym or 'antonym only shows the corresponding part, and setting it to 'both will show both synonyms and antonyms at the same time:

(setq bing-dict-show-thesaurus 'both)

The variable bing-dict-pronunciation-style controls how the pronunciation is shown. By default, its value is 'us and the pronunciation is shown using "American Phonetic Alphabet" (APA). You can choose the "International Phonetic Alphabet" (IPA) by setting its value to 'uk (In fact, any value other than 'us will work):

(setq bing-dict-pronunciation-style 'uk)

You can also build your own vocabulary by saving all your queries and their results into bing-dict-vocabulary-save (which points to ~/.emacs.d/var/bing-dict/vocabulary.org by default):

(setq bing-dict-vocabulary-save t)

By setting bing-dict-vocabulary-file, you can change where all the queries and results are saved:

(setq bing-dict-vocabulary-file "/path/to/your_vocabulary.org")

screenshot:

bing-dict-screenshot2

Use the following configuration if you want bing-dict.el to cache all your queries and results:

(setq bing-dict-cache-auto-save t)

You can customize the value of bing-dict-cache-file to change the location where bing-dict.el stores the cache. The default value is ~/.emacs.d/var/bing-dict/bing-dict-save.el.

Command Line Usage

Add the following script to your PATH to look up a word from the command line:

#!/path/to/emacs --script
(add-to-list 'load-path "/path/to/bing-dict.el")
(require 'bing-dict)
(defun main ()
  (bing-dict-brief (format "%s" command-line-args-left) t))
(main)

For Features Requests

This extension aims for a quick search for a word. Currently this extension only parses several sections in the search results and show a brief message in the echo area using bing-dict-brief. I don't plan to write parsers for all the sections of the search results. At least, for bing-dict-brief, it should not present too much information which may not fit into the echo area.

If you want to view the complete results of your query word, there are two options: using the external browser to do this or contributing to the repo by adding more parsers. For the first option, the following code could partly achieve the goal:

(browse-url
 (concat "http://www.bing.com/dict/search?mkt=zh-cn&q="
       (url-hexify-string
        (read-string "Query: "))))

If you prefer to browse inside Emacs, use eww instead:

(eww-browse-url
  (concat "http://www.bing.com/dict/search?mkt=zh-cn&q="
          (url-hexify-string
           (read-string "Query: "))))

Or open the web page in other window:

(switch-to-buffer-other-window
 (eww-browse-url
  (concat "http://www.bing.com/dict/search?mkt=zh-cn&q="
          (url-hexify-string
           (read-string "Query: ")))))

For the second option, you're welcome to contribute to this extension by adding more parsers. For example, you could try to add a parser for the "Sample Sentences" section. If you're able to write parsers to parse many sections, which turns out to be too large to be shown in the echo area, you should probably define a new command, maybe called bing-dict-complete. I'm totally OK with new commands that could present more results, as long as bing-dict-brief remains its original simplicity.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].