Wiki viewer for tty

1

Eu estou querendo saber se existe algum comando para buscar a "introdução" (e talvez o artigo completo) de uma entrada da Wikipedia em um terminal.

Eu encontrei este artigo e muito artigo redirecionando para ele, mas infelizmente ao executar isso no console ele dá:

$ dig +short txt fooba.wp.dg.cx
$

Ele sai com o código 0 , portanto, nenhum erro, mas também não mostra nada.

Existe algum comando de consulta da Wikipédia para o Linux? Eu uso o lynx para navegar na Internet, mas às vezes você simplesmente quer buscar a introdução rapidamente e fazer algum processamento nela.

    
por Willem Van Onsem 18.09.2015 / 01:21

1 resposta

3

Bem, olhando em volta:

$ apt search wikipedia              
Sorting... Done
Full Text Search... Done
libwww-wikipedia-perl/trusty 2.00-1 all
  perl module that provides an automated interface to Wikipedia

wikipedia2text/trusty,now 0.11-3 all [installed]
  displays Wikipedia articles on the command line

wikipediafs/trusty 0.4-5 all
  View and edit Wikipedia articles as if they were real files

Olhando para a página de manual de wikepedia2text :

-s        Display only the summary of the Wikipedia article.

-S        Display the full content of the  Wikipedia  article  and  not
          only the summary.

Teste:

$ wikipedia2text -s Linux
Changes must be reviewed before being displayed on this page.show/hide details
This is the latest accepted revision, reviewed on 17 September 2015.
Jump to: navigation, search
This article is about the operating system. For the kernel (also often referred
to as just "Linux"), used in all variants of the Linux operating system, see
Linux kernel. For other uses, see Linux (disambiguation).

                                     Linux
Tux the penguin
Tux the penguin, mascot of Linux^
Developer Community
 Written  Primarily C and assembly
   in
OS family Unix-like
 Working  Current
  state
 Source   Mainly open source, proprietary software also available


$ wikipedia2text Linux   
Page protected with pending changes level 1

Linux

From Wikipedia, the free encyclopedia
Changes must be reviewed before being displayed on this page.show/hide details
This is the latest accepted revision, reviewed on 17 September 2015.
Jump to: navigation, search
This article is about the operating system. For the kernel (also often referred
to as just "Linux"), used in all variants of the Linux operating system, see
Linux kernel. For other uses, see Linux (disambiguation).

                                     Linux
Tux the penguin
Tux the penguin, mascot of Linux^
Developer Community
 Written  Primarily C and assembly
   in
OS family Unix-like
 Working  Current
  state
 Source   Mainly open source, proprietary software also available
  model
 Initial  1991; 24 years ago (1991)
 release
Marketing Personal computers, mobile devices, embedded devices, servers,
 target   mainframes, supercomputers
Available Multilingual
   in
          Alpha, ARC, ARM, AVR32, Blackfin, C6x, ETRAX CRIS, FR-V, H8/300,
Platforms Hexagon, Itanium, M32R, m68k, META, Microblaze, MIPS, MN103, Nios II,
          OpenRISC, PA-RISC, PowerPC, s390, S+core, SuperH, SPARC, TILE64,
          Unicore32, x86, Xtensa
 Kernel   Monolithic (Linux kernel)
  type
Userland  Various
Default
  user    Many
interface
 License  GPLv2^ and other free and open-source licenses, except for the
          "Linux" trademark^[a]

...
    
por muru 18.09.2015 / 01:28