Spanish Synonyms Finder for Alfred

I installed Alfred yesterday and bought the power pack to be able to use the workflows feature. I started playing with it and found out a piece of functionality that I couldn’t find: a Spanish Thesaurus. For English, I found one quickly. However, for Spanish, I was unable to find any, so I decided to build one myself.

My strategy to accomplish this:

  • Find out how to use JS (and NodeJS) inside Alfred.
  • Find a service that provides an API for Spanish (surprisingly there is none, or I couldn’t find one).
  • As there was no API, I’d have to do some web scrapping. I found an excellent page to do so, and I hope I am not transgressing any law by doing so. If so, please let me know…

My pseudo code looks like this:

  • Get the {query} to be searched for
  • Request the URL with the {query}
  • Parse the response
  • Get the results in an array
  • Send that to Alfred for display.

I found alfy a nice library that facilitates the creation of Alfred workflows with JS. and based my efforts from there. The documentation is straightforward on how to use it. Before alfy I used axios to make the request but moved back to alfy to reduce dependency.

The final product looks like this:

Is very simple to use. You call Alfred and then type sps (Spanish Synonym). Then you write the word you are looking for, and a series of synonyms appear. You can enter in any of them, and it will take you to the page. You can type shift to see a previous as well.

The code is here:
The packal site here:

My first open source contribution for a while. Hope someone finds it useful.

PTY Cash Only

No sé la historia, pero desde hace más de un año en el aeropuerto de Panamá (PTY), en la mayoría de tiendas puede pagarse sólo con efectivo. A mi me huele eso tan mal, no estoy juzgando, pero tiene que haber una razón muy grande para que un establecimiento en un aeropuerto, no acepte tarjetas de crédito, sabiendo que perderá al menos la mitad de sus clientes. O hay algo de lavado, o una artimaña lega, o son muy tontos (tal vez simplemente no les gustan las tarjetas a los dueños). En fin, para mi como cliente es muy molesto y me hace que el aeropuerto huela mal. Por cierto, en los pocos lugares que sí aceptan tarjetas, no suelen aceptar American Express. En fin…un poco de subdesarrollo artificial.

Por lo general este hub me gusta mucho, pero poco a poco hacen que ya no tanto…