busqueda

Debian no tiene escasez de herramientas que digamos cuando se trata de buscar paquetes. Los veteranos y venerados son apt-cache, apt y apt-file. axi-cache es el nuevo chico en el bloque. Esta publicación explica qué hay de nuevo en axi-cache y cómo usarlo.

Primero, axi-cache necesita ser instalado e inicializado de la siguiente manera:

# apt-get install apt-xapian-index
# update-apt-xapian-index

El índice /var/lib/apt-xapian-index está actualizado

La búsqueda básica de axi-cache es sintácticamente muy similar a los comandos de búsqueda mencionados anteriormente:

$ axi-cache search browser
930 results found.
Results 1-20:
100% chromium-driver – web browser – WebDriver support
99% chromium – web browser
99% ruby-browser – browser detection for Ruby
97% libwwwbrowser-perl – Platform independent means to start a WWW browser
96% libhtml-display-perl – module for displaying HTML locally in a browser
96% gcu-plugin – GNOME chemistry utils (browser plugin)
96% python-zope.browser – Shared Zope Toolkit browser components
96% python3-zope.browser – Shared Zope Toolkit browser components
96% chromedriver – web browser – WebDriver support transitional package
96% mythbrowser – Small web browser module for MythTV
96% chromium-widevine – web browser – widevine content decryption support
96% swfdec-mozilla – dummy package for transition to browser-plugin-gnash
95% python-livereload – automatic browser refresher
95% mozilla-plugin-gnash – dummy package for renaming to browser-plugin-gnash
95% python3-livereload – automatic browser refresher (Python 3)
95% qupzilla – lightweight web browser based on libqtwebkit
95% python-livereload-doc – automatic browser refresher (documentation)
95% firefox-esr – Mozilla Firefox web browser – Extended Support Release (ESR)
95% ipig – integrating PSMs into genome browser visualisations
94% epiphany-browser-data – Data files for the GNOME web browser
More terms: refresher livereload safer stable refresh browsing webdriver
More tags: field::religion culture::dutch uitoolkit::gtk field::chemistry use::browsing web::browser interface::x11
`axi-cache more’ will give more results

Una búsqueda similar con apt-cache arroja 962 resultados con los primeros 20 resultados siendo:

389-admin – 389 Directory Administration Server
libds-admin-serv0 – Libraries for the 389 Directory Administration Server
xul-ext-adblock-plus – advertisement blocking extension for web browsers
ajaxterm – Web based terminal written in Python
alevt – X11 Teletext/Videotext browser
alice – Web browser (WebKit or Gecko) based IRC client
xul-ext-all-in-one-sidebar – sidebar extension for Firefox
node-almond – minimal AMD API implementation for use in optimized browser builds
pilot – Simple file browser from Alpine, a text-based email client
ams – Realtime modular synthesizer for ALSA
amule-gnome-support – ed2k links handling support for GNOME web browsers
libjs-angularjs – lets you write client-side web applications as if you had a smarter browser
libjs-animate.css – cross-browser library of CSS animations
libapache2-mod-upload-progress – upload progress support for the Apache web server
apachedex – Compute APDEX from Apache-style logs
xfonts-kapl – APL fonts for A+ development
artemis – genome browser and annotation tool
libjs-asciimathml – Library to render high quality mathematical formulas in a browser
aspectj – aspect-oriented extension for Java – tools
auctex – integrated document editing environment for TeX etc.

Ten en cuenta que, a diferencia de apt-cache, axi-cache devuelve, de forma predeterminada, solo los 20 hitos principales. Puedes ver el conjunto de resultados completo especificando la opción –all (por ejemplo, axi-cache –todo el buscador de búsqueda). Alternativamente, puedes recorrer los resultados ejecutando el siguiente comando después de la búsqueda inicial.

$ axi-cache more

En general, axi-cache arroja resultados más relevantes que apt-cache. Este último implementa una búsqueda rudimentaria tipo grep emparejando los patrones de texto de expresión regular con el nombre del paquete y la descripción de un paquete. A menos que tenga una idea del nombre del paquete, una búsqueda de apt-cache a menudo arroja muchos resultados irrelevantes, como se indica en el ejemplo anterior. Por el contrario, axi-cache puede clasificar los resultados de búsqueda por relevancia con la ayuda de Apt Xapian Index (axi). Este índice es una base de datos de metadatos de paquetes que incluye mucho más que el nombre y la descripción de un paquete. Para examinar lo que está indexado, ejecuta el siguiente comando:

$ axi-cache info
…<snipped>…
Plugin status:
aliases enabled, up to date (430 days, 15:47:18.356149 older than index)
app-install disabled
apttags enabled, needs indexing (6 days, 23:59:10.729973 newer than index)
cataloged_time enabled, needs indexing (6 days, 23:59:10.729973 newer than index)
debtags disabled
descriptions enabled, needs indexing (6 days, 23:59:10.729973 newer than index)
relations enabled, needs indexing (6 days, 23:59:10.729973 newer than index)
sections enabled, needs indexing (6 days, 23:59:10.729973 newer than index)
sizes enabled, needs indexing (6 days, 23:59:10.729973 newer than index)
template enabled, up to date
translated-desc enabled, needs indexing (1 day, 10:56:58.643851 newer than index)
…<snipped>…

Aparte, puedes actualizar Apt Xapian Index ejecutando el siguiente comando como root:

# update-apt-xapian-index

La característica más distintiva del índice es su uso de etiquetas (apttags). Estas etiquetas categorizan un paquete por facetas predefinidas, como rol, protocolo, suite, cultura, uso, trabajos, etc.

Supongamos que eres multilingüe y estás buscando paquetes que instalen, digamos, fuentes chinas. Puedes identificar rápidamente los paquetes que necesita utilizando el siguiente comando.

$ axi-cache search x11::font and culture::chinese and role::data

13 results found.
Results 1-13:
100% fonts-arphic-bkai00mp – “AR PL KaitiM Big5” Chinese TrueType font by Arphic Technology
100% fonts-arphic-bsmi00lp – “AR PL Mingti2L Big5” Chinese TrueType font by Arphic Technology
100% fonts-arphic-gbsn00lp – “AR PL SungtiL GB” Chinese TrueType font by Arphic Technology
100% fonts-arphic-gkai00mp – “AR PL KaitiM GB” Chinese TrueType font by Arphic Technology
100% fonts-cwtex-fs – TrueType Font from cwTeX – FangSong
100% fonts-cwtex-heib – TrueType Font from cwTeX – HeiBold
100% fonts-cwtex-kai – TrueType Font from cwTeX – Kai
100% fonts-cwtex-ming – TrueType Font from cwTeX – Ming
100% fonts-cwtex-yen – TrueType Font from cwTeX – Yen
100% ttf-wqy-zenhei – transitional dummy package
100% xfonts-intl-chinese – international fonts for X – Chinese
100% xfonts-intl-chinese-big – international fonts for X – large Chinese
100% xfonts-unifont – PCF (bitmap) version of GNU Unifont
More terms: chinese fonts truetype cwtex font koanughi cwttf
More tags: made-of::font culture::taiwanese role::dummy role::app-data culture::greek culture::korean culture::russian

La siguiente tabla compila una lista no exhaustiva de facetas comunes y valores de ejemplo. Para obtener una lista completa, haz clic aquí. Para crear una etiqueta, únete a la faceta y al valor usando 2 puntos, por ejemplo, role :: program.

Fuente

FacetValues
admin filesystem, forensics, monitoring, power-management, virtualization
culture chinese, latvian, russian
field arts, astronomy, finance, mathematics, medicine, statistics
game arcade, board, card, fps, mud, puzzle, rpg, sport, toys, typing
implemented-in c, php
interface 3d, commandline, graphical, shell, x11
network client, configuration, server, service, vpn
office finance, groupware, presentation, spreadsheet
protocol ip, ipv6, smtp, webdav
role app-data, data, debug-symbols, devel-lib, documentation, kernel, metapackage, plugin, program, shared-lib, source
security antivirus, authentication, cryptography, log-analyzer
suite bsd, debian, eclipse, emacs, gnome, gnu, kde, mozilla, mysql, openoffice, openstack, postgresql, xfce, xmms2
system cloud, embedded, laptop, mobile, server, virtual
uitoolkit gtk, motif, ncurses, qt, sdl, tk, xlib
use analysing, browsing, calculating, chatting, checking, compressing, configuring, converting, downloading, driver, editing, entertaining, filtering, gameplaying, learning, login, measuring, monitor, organizing, playing, printing, routing, scanning, searching, simulating, storing, synchronizing, transmission, typesetting, viewing
works-with archive, audio, calendar, db, file, font, image, logfile, mail, network-traffic, spreadsheet, text, unicode, video
x11 font, screensaver, theme, window-manager

 

Fuente: maslinux

¿Quién está en línea?

Hay 2795 invitados y ningún miembro en línea