Skip to content

About

Emacs Lisp functions for interacting with Mercado Libre.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

mercado-libre.el

Mercado Libre for Emacs

Query and monitor the Mercado Libre marketplace directly from Emacs.

Overview

mercado-libre.el is an Emacs package that allows you to:

  • Search for items on Mercado Libre
  • Monitor searches for new listings
  • Display results in a nicely formatted buffer with images
  • Track which listings you’ve already seen

Prerequisites

This package requires authentication credentials from Mercado Libre’s API:

  1. Register as a developer on the Mercado Libre Developers site
  2. Create an application to get your client ID and client secret
  3. Store your credentials in mercado-libre-client-id and mercado-libre-client-key.

mercado-libre-get-credentials returns the pair from the app-id and app-key fields of the item mercadolibre.com/benthamite in a 1Password Automation vault, read with auth-source-extras-op-get from auth-source-extras.el.

Installation

Manual

Clone this repository to your Emacs load path and add this to your init.el file:

(require 'mercado-libre)

With use-pacakge

If you use the elpaca package manager, add this your init.el file:

;; with vc
(use-package mercado-libre
  :vc (:url "https://github.com/benthamite/mercado-libre"))

;; with elpaca
(use-package mercado-libre
  :ensure (:host github :repo "benthamite/mercado-libre"))

;; with straight
(use-package mercado-libre
  :straight (:host github :repo "benthamite/mercado-libre"))

;; with quelpa
(use-package mercado-libre
  :quelpa (mercado-libre :fetcher github :repo "benthamite/mercado-libre"))

Configuration

You can customize various aspects of the package:

;; Set your API credentials
(setq mercado-libre-client-id "YOUR_CLIENT_ID"
      mercado-libre-client-secret "YOUR_CLIENT_SECRET")

;; Location of the listings database
(setq mercado-libre-listings-db-file "~/path/to/listings-db.el")

;; Number of results displayed
(setq mercado-libre-initial-results-limit 20)  ; For first-time runs
(setq mercado-libre-new-results-limit 30)      ; For subsequent checks

Usage

Monitoring for New Listings

The main command is mercado-libre-monitor:

M-x mercado-libre-monitor RET search-query RET

With a prefix argument (C-u), you can specify the condition (used/new/all):

C-u M-x mercado-libre-monitor RET search-query RET used RET

With a double prefix (C-u C-u), you can also specify how many items to display:

C-u C-u M-x mercado-libre-monitor RET search-query RET used RET 30 RET

View Saved Searches

To select from previously saved search queries:

M-x mercado-libre-show-searches RET

How it Works

  1. The first time you run a search, the package builds a database of all existing listings.
  2. On subsequent runs, it only shows items that have appeared since your last check.
  3. Results are displayed in a nicely formatted Org mode buffer with images.

License

This package is licensed under the GNU General Public License v3.0 or later.

Contributing

Contributions are welcome. Please open an issue or PR on the GitHub repository.

About

Emacs Lisp functions for interacting with Mercado Libre.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages