<commit_before># google-webfonts-helper
Ever wanted to know where Google hosts their webfonts? This service might be handy if you want to download all `.eot`, `.woff`, `.woff2`, `.svg`, `.ttf` files of a font variant directly from google (normally your `User-Agent` would determine the best format).

## [google-webfonts-helper hosted on Heroku](https://google-webfonts-helper.herokuapp.com)

![pic running](http://ranf.tl/static/apps/google-webfonts-helper/full_view.png)

### REST API
The API is public, feel free to use it directly.

#### GET `/api/fonts`
Returns a list of all fonts, sorted by popularity. E.g. `curl https://google-webfonts-helper.herokuapp.com/api/fonts`:
```json
[{
  "id": "open-sans",
  "family": "Open Sans",
  "variants": ["300", "300italic", "regular", "italic", "600", "600italic", "700", "700italic", "800", "800italic"],
  "subsets": ["cyrillic-ext", "vietnamese", "greek", "latin-ext", "latin", "devanagari", "cyrillic", "greek-ext"],
  "category": "sans-serif",
  "version": "v10",
  "lastModified": "2014-10-17",
  "popularity": 1
} [...]
]
```

#### GET `/api/fonts/[id]`
Returns a font with urls to the actual font files google's servers. E.g. `curl https://google-webfonts-helper.herokuapp.com/api/fonts/antic`:

```json
{
  "id": "antic",
  "family": "Antic",
  "variants": [{
    "id": "regular",
    "woff2": [{
      "url": "https://fonts.gstatic.com/s/antic/v7/XHDNSBKb2dlIyyA7tXPbSA.woff2",
      "unicodeRange": "U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000",
      "subset": "latin"
    }],
    "fontFamily": "'Antic'",
    "fontStyle": "normal",
    "fontWeight": "400",
    "local": ["Antic", "Antic-Regular"],
    "woff": "https://fonts.gstatic.com/s/antic/v7/2GNslY5EMAZwbbytmM9wFw.woff",
    "eot": "https://fonts.gstatic.com/s/antic/v7/jrYPXvXYC1H4Vn_CQx7BJQ.eot",
    "ttf": "https://fonts.gstatic.com/s/antic/v7/oPxV1dkj-zBXVn8gGPEP7w.ttf",
    "svg": "https://fonts.gstatic.com/l/font?kit=auEONVTS9YXogC-LoZ073Q#Antic"
  }],
  "subsets": ["latin"],
  "category": "sans-serif",
  "version": "v7",
  "lastModified": "2014-08-28",
  "popularity": 249
}
```

#### GET `/api/fonts/[id]?download=zip`

Download a zipped archive with all `.eot`, `.woff`, `.woff2`, `.svg`, `.ttf` files of a specified font. E.g. `curl -o fontfiles.zip https://google-webfonts-helper.herokuapp.com/api/fonts/lato?download=zip`

### History

This was originally a prototype, that I've started to get familiar with Angular and Express. All magic by [generator-angular-fullstack](https://github.com/DaftMonk/generator-angular-fullstack). See [my note here](http://ranf.tl/2014/12/23/self-hosting-google-web-fonts/). That's all folks.
<commit_msg>example json changed<commit_after># google-webfonts-helper
Ever wanted to know where Google hosts their webfonts? This service might be handy if you want to download all `.eot`, `.woff`, `.woff2`, `.svg`, `.ttf` files of a font variant directly from google (normally your `User-Agent` would determine the best format).

## [google-webfonts-helper hosted on Heroku](https://google-webfonts-helper.herokuapp.com)

![pic running](http://ranf.tl/static/apps/google-webfonts-helper/full_view.png)

### REST API
The API is public, feel free to use it directly.

#### GET `/api/fonts`
Returns a list of all fonts, sorted by popularity. E.g. `curl https://google-webfonts-helper.herokuapp.com/api/fonts`:
```json
[{
  "id": "open-sans",
  "family": "Open Sans",
  "variants": ["300", "300italic", "regular", "italic", "600", "600italic", "700", "700italic", "800", "800italic"],
  "subsets": ["cyrillic-ext", "vietnamese", "greek", "latin-ext", "latin", "devanagari", "cyrillic", "greek-ext"],
  "category": "sans-serif",
  "version": "v10",
  "lastModified": "2014-10-17",
  "popularity": 1
} [...]
]
```

#### GET `/api/fonts/[id]`
Returns a font with urls to the actual font files google's servers. E.g. `curl https://google-webfonts-helper.herokuapp.com/api/fonts/antic`:

```json
{
  "id": "antic",
  "family": "Antic",
  "variants": [{
    "id": "regular",
    "eot": "https://fonts.gstatic.com/s/antic/v7/jrYPXvXYC1H4Vn_CQx7BJQ.eot",
    "fontFamily": "'Antic'",
    "fontStyle": "normal",
    "fontWeight": "400",
    "woff2Subsets": [{
      "url": "https://fonts.gstatic.com/s/antic/v7/XHDNSBKb2dlIyyA7tXPbSA.woff2",
      "unicodeRange": "U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000",
      "subset": "latin"
    }],
    "local": ["Antic", "Antic-Regular"],
    "woff": "https://fonts.gstatic.com/s/antic/v7/2GNslY5EMAZwbbytmM9wFw.woff",
    "svg": "https://fonts.gstatic.com/l/font?kit=auEONVTS9YXogC-LoZ073Q#Antic",
    "woff2": "https://fonts.gstatic.com/s/antic/v7/IVZiQl5Ww-TJ-PrbjA5gMKCWcynf_cDxXwCLxiixG1c.woff2",
    "ttf": "https://fonts.gstatic.com/s/antic/v7/oPxV1dkj-zBXVn8gGPEP7w.ttf"
  }],
  "subsets": ["latin"],
  "category": "sans-serif",
  "version": "v7",
  "lastModified": "2014-08-28",
  "popularity": 249
}
```

#### GET `/api/fonts/[id]?download=zip`

Download a zipped archive with all `.eot`, `.woff`, `.woff2`, `.svg`, `.ttf` files of a specified font. E.g. `curl -o fontfiles.zip https://google-webfonts-helper.herokuapp.com/api/fonts/lato?download=zip`

### History

This was originally a prototype, that I've started to get familiar with Angular and Express. All magic by [generator-angular-fullstack](https://github.com/DaftMonk/generator-angular-fullstack). See [my note here](http://ranf.tl/2014/12/23/self-hosting-google-web-fonts/). That's all folks.

{'fraction_non_alphanumeric': 0.2020273875155611, 'fraction_numerical': 0.047661390716699274, 'mean_word_length': 4.3156899810964084, 'pattern_counts': {'":': 59, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 21, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '842631', 'n_tokens_mistral': 2490, 'n_tokens_neox': 2260, 'n_words': 466}