Skip to content

progfolio/wikinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Wikipedia Infobox -> Elisp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published