Coder Social home page Coder Social logo

wikinfo's Introduction

Wikinfo

Wikinfo is an elisp library for scraping Wikipedia infoboxes.

https://melpa.org/packages/wikinfo-badge.svg

Functions

wikinfo (&optional search filter)
Return infobox plist for SEARCH. FILTER is an optional unary function which takes a list of search results as its argument. It must return a single result to use. If either argument is nil, the user is interactively prompted.

For example:

(wikinfo "Emacs" #'car)
    

searches the Wikipedia API for pages with infoboxes that contain the term “Emacs”. The filter will return the first result, similar to Google’s “I’m feeling lucky” search feature. The result is a plist (note: Formatting applied to extract to reduce page width):

( :original-authors "David A. Moon, Guy L. Steele Jr."
  :developers "Various free/libre software developers, including volunteers and commercial developers"
  :initial-release "1976; 44 years ago (1976)"
  :stable-release "27.1 (August 10, 2020; 54 days ago (2020-08-10))"
  :written-in "Lisp, C"
  :operating-system "Cross-platform"
  :type "Text editor"
  :wikinfo ( :extract
             "Emacs or EMACS (Editor MACroS) is a family of text editors that
             are characterized by their extensibility. The manual for the most
             widely used variant, GNU Emacs, describes it as \"the extensible,
             customizable, self-documenting, real-time display editor\".
             Development of the first Emacs began in the mid-1970s, and work on
             its direct descendant, GNU Emacs, continues actively as of 2020."
             :index 1
             :title Emacs
             :id 18933234))

Notice: EXPERIMENTAL

This library is still under design development. There are no guarantees for API/feature stability at this point.

Installation

MELPA

Try it with the straight package manager:

(straight-use-package 'wikinfo)

or use-package:

(use-package wikinfo
  :ensure t)

Manual

Download wikinfo and make sure it is in your load-path. Require it in your init file.

(require 'wikinfo)

wikinfo's People

Contributors

progfolio avatar

Stargazers

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

Watchers

 avatar  avatar

wikinfo's Issues

browse-url of entry at point

hi,
i'm wiki-summary and helm-wikipedia-suggest and just discovered this library.

i wonder how one would go about hooking in browse-url to the entry list, which is displayed in the minibuffer, so it has no mode/keymap etc., afaict.

wikisummary also lacks this feature, but seeing as yours is more active i thought i'd ask here. it wd be nice to be able to plug them in together:

  • select a candidate, display the fully summary text
  • binding from that buffer to load full page with browse-url.

improving results sorting

when i use wikinfo, i often find that the results closest to what i searched for, even pages that have the exact name of what i searched for, do not appear in the limited list displayed. is it possible to improve the candidates list or ordering at all? i guess the filter arg doesn't work in this case, as the readme says it should return a single entry.

e.g. with a search for "industrial relations", the page of that name does not appear in the results lists.

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.