GHC 2017-03-12

23 comments.

, https://git.io/vyKSu in jarun/googler
Sure, it works. Your

```py
self.metadata = self.pop_textbuf().strip().replace('\u200e', '')
```

is better though.

, https://git.io/vyKSz in jarun/googler
> Please text this one

?

, https://git.io/vyKSg in jarun/googler
Fine.

, https://git.io/vyKS2 in jarun/googler
Also, since this is a Python 3 only project, that `u` prefix is superfluous.

, https://git.io/vyKSa in jarun/googler
Sure! (I think the `tag == 'div'` should be aligned with `not`.)

, https://git.io/vyKSV in jarun/googler
I meant

```py
self.start_populating_textbuf(lambda text: text.translate(str.maketrans('', '', '\u200e')))
```

, https://git.io/vyKMa in jarun/googler
Hardcode the character for removal, I guess? Can't think of a better way.

, https://git.io/vyKMV in jarun/googler
That's because depending on your editor/viewer that U+200E may be rendered as anything. In my terminal emulator (iTerm2 on macOS) it's rendered as a space. In Emacs (tty) it's rendered as an underscore. In Chrome it's not rendered.

, https://git.io/vyKMw in jarun/googler
(I mean, note that U+200E, LEFT-TO-RIGHT MARK.)

, https://git.io/vyKMr in jarun/googler
Okay here's what happened:

```
$ devbin/parse <(curl -sS https://gist.githubusercontent.com/anonymous/3181cbad63483043af5143ada6acbb3e/raw/82d12b317af8897e1b149b4b06c6f8b492535417/googler-response-79yyce7z) | sed -n '/metadata/ p' | xxd
00000000: 2020 2020 226d 6574 6164 6174 6122 3a20      "metadata":
00000010: 2252 6174 696e 673a 2037 2e38 2f31 3020  "Rating: 7.8/10
00000020: 2d20 e280 8e39 3234 2c31 3931 2076 6f74  - ...924,191 vot
00000030: 6573 222c 0a                             es",.
```

, https://git.io/vyKMo in jarun/googler
Spaces were collapsed when pasting to GitHub's editor box.

, https://git.io/vyKMK in jarun/googler
```json
> devbin/parse <(curl https://gist.githubusercontent.com/anonymous/3181cbad63483043af5143ada6acbb3e/raw/82d12b317af8897e1b149b4b06c6f8b492535417/googler-response-79yyce7z)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  299k  100  299k    0     0  2244k      0 --:--:-- --:--:-- --:--:-- 2251k
[
  {
    "abstract": "Action · A paraplegic marine dispatched to the moon Pandora on a unique mission becomes ... Avatar -- Clip: Thanator chase · Avatar -- Featurette: Hardware ...",
    "metadata": "Rating: 7.8/10 - ‎924,191 votes",
    "title": "Avatar (2009) - IMDb",
    "url": "http://www.imdb.com/title/tt0499549/"
  },
  {
    "abstract": "Avatar (2009) cast and crew credits, including actors, actresses, directors, writers and more.",
    "title": "Avatar (2009) - Full Cast & Crew - IMDb",
    "url": "http://www.imdb.com/title/tt0499549/fullcredits/"
  },
  {
    "abstract": "Action ... Directed by James Cameron. With Sam Worthington, Zoe Saldana, Sigourney Weaver, Stephen Lang. A sequel to Avatar (2009).",
    "title": "Avatar 2 - IMDb",
    "url": "http://www.imdb.com/title/tt1630029/"
  },
  {
    "abstract": "Avatar -- Jake Sully (Worthington) is a paraplegic war veteran who is brought ... Avatar -- Interview: \"James Cameron On The New Technology Created For This ...",
    "title": "Avatar (2009) - IMDb",
    "url": "http://www.imdb.com/title/tt0499549/reference"
  },
  {
    "abstract": "Explosions consume man, alien and beast alike. On fire, a horse-like creature runs for its life. Jake's avatar nearly knocks the head off one human and hurls ...",
    "title": "Avatar (2009) - Parents Guide - IMDb",
    "url": "http://www.imdb.com/title/tt0499549/parentalguide"
  },
  {
    "abstract": "Animation .... Avatar: The Last Airbender -- US Home Video Trailer from Paramount ... Avatar: The Last Airbender (2005) Joaquim Dos Santos, winner for TV ...",
    "title": "Avatar: The Last Airbender (TV Series 2005–2008) - IMDb",
    "url": "http://www.imdb.com/title/tt0417299/"
  },
  {
    "abstract": "Avatar (2009) Poster. A paraplegic marine dispatched to the moon Pandora on a unique mission becomes torn between following his orders and protecting the ...",
    "title": "Avatar (2009) - IMDb",
    "url": "http://www.imdb.com/title/tt0499549?ref_=vi_tt_t"
  },
  {
    "abstract": "Avatar (2009) on IMDb: When his brother is killed in a robbery, paraplegic Marine Jake Sully decides to take his place in a mission on the distant world of ...",
    "title": "Avatar (2009) - Plot Summary - IMDb",
    "url": "http://www.imdb.com/title/tt0499549/plotsummary"
  },
  {
    "abstract": "Budget. $237,000,000 (estimated). Opening Weekend. $77,025,481 (USA) (20 December 2009) (3,452 Screens) £8,509,050 (UK) (20 December 2009) (503 ...",
    "title": "Avatar (2009) - Box office / business - IMDb",
    "url": "http://www.imdb.com/title/tt0499549/business"
  },
  {
    "abstract": "Avatar (2009) Quotes on IMDb: Memorable quotes and exchanges from movies, TV series and more...",
    "title": "Avatar (2009) - Quotes - IMDb",
    "url": "http://www.imdb.com/title/tt0499549/quotes"
  }
]
```

Anyway, a little bit of postprocessing to collapse spaces in metadata doesn't hurt.

, https://git.io/vyKM6 in jarun/googler
https://gist.githubusercontent.com/anonymous/3181cbad63483043af5143ada6acbb3e/raw/82d12b317af8897e1b149b4b06c6f8b492535417/googler-response-79yyce7z

, https://git.io/vyKMi in jarun/googler
You're probably using `--noua`.

, https://git.io/vyKMP in jarun/googler
> if tag == 'div' and 'slp' in self.classes(attrs):

I didn't go back to the code, but maybe need to check `metadata_registered`. Otherwise looks good.

Could use a bit of refinement on spacing:

    Rating: 6.3/10 -  ‎24,604 votes

, https://git.io/vyKMX in jarun/googler
It should be possible. Look at `.slp`.

, https://git.io/vyKrj in jarun/googler
Well, I monitor two dozen GitHub projects, and semi-auto submit for all of them.

, https://git.io/vyKaK in jarun/googler
Before you ask: https://github.com/Homebrew/homebrew-core/pull/10962.

, https://git.io/vyKa6 in Homebrew/homebrew-core
googler 3.0
===========

Created with `brew bump-formula-pr`.

, https://git.io/vyKRi in Homebrew/brew
> what's this linked to that's not noted explicitly with a depends_on?

Aw, smells like `:linked`...

, https://git.io/vyKRP in Homebrew/homebrew-core
O_O drive-by update gone wrong...

, https://git.io/vyKRX in Homebrew/brew
> This will mean we have no easy way of telling which linkages are or are not explicitly included in the formula.

Yes. But keep in mind that recursive dependencies are explicitly exposed in LDFLAGS. Complaining about it later feels inconsistent.

, https://git.io/vyKmY in mholt/caddy
systemd README: set mode of caddy.service to 644 instead of 744
===============================================================

It makes no sense to set the executable bit on a systemd unit config file. Most likely a typo.