GHC 2019-11-16

6 comments.

, https://git.io/JeogX in jarun/googler
Drop option --nohl
==================

This reverts commit 7e725573f801c587df7688a07f9fc7a9408d76eb.

Per discussion[1], the value proposition has changed now that text wrapping in
presence of ANSI escape sequences has been fixed.

[1] https://github.com/jarun/googler/pull/300#issuecomment-554608255

, https://git.io/JeoBo in jarun/googler
I don’t see any harm.

, https://git.io/Jeocy in jarun/googler
I wrote a wiki article about "No results", which includes a note about outdatedness: https://git.io/googler-no-results. googler now also prints a message pointing to the wiki article when "No results" happens (f0914da4e507e71b6179975a9fed98c51ca4871a). Obviously it won't be shown in old versions, but hopefully it will improve the situation going forward.

, https://git.io/JeocS in jarun/googler
Point user to wiki article when there are no results
====================================================

I wrote a wiki article about what to do when "No results" happens: https://git.io/googler-no-results. Hopefully it will reduce user anxiety and increase efficiency, and save some explanations when the inevitable happens again.

The message is shown at most once per session. It is not shown in --json mode, obviously.

Example:

    $ googler adjskfasdfhasjkfhsajkhdfa
    No results.
    If you believe this is a bug, please review https://git.io/googler-no-results before submitting a bug report.
    googler (? for help) asdfasdfhajsdfhasjkdfhajshdfahjdsk
    No results.
    googler (? for help)

, https://git.io/Jeoc9 in jarun/googler
Hope it doesn't cause any regression.

, https://git.io/Jeocl in jarun/googler
Fix metadata extraction of YouTube results
==========================================

Recently noticed that metadata in YouTube results isn't parsed correctly. To add insult to injury, the semantically important `<br>` tag is dropped amongst other semantically unimportant ones, causing metadata and abstract to be joined without a space in between.

Before:

    $ googler --np gangnam style

     1.  PSY- Gangnam Style (Official Music Video) - YouTube
         https://www.youtube.com/watch?v=CH1XGdu-hzQ
         23 Oct 2012 - 5 min - Uploaded by DanceGangnamStyle50+ videos Play all Mix - PSY- Gangnam Style (Official Music Video)YouTube ·  Darci Lynne ...

After:

    $ googler --np gangnam style

     1.  PSY- Gangnam Style (Official Music Video) - YouTube
         https://www.youtube.com/watch?v=CH1XGdu-hzQ
         23 Oct 2012, 5 min, Uploaded by DanceGangnamStyle
         50+ videos Play all Mix - PSY- Gangnam Style (Official Music Video)YouTube ·  Darci Lynne ...

This is a slightly risky change since metadata criterion changed from `.slp` to `.f` (metadata in the traditional setting is always `.f.slp` in my experience). Not sure if there's regional variance.