Mark Allen > App-gfonts-0.01 > gfonts

Download:
App-gfonts-0.01.tar.gz

Annotate this POD

Website

View/Report Bugs
Source  

NAME ^

gfonts - Google Web Fonts from your terminal

VERSION ^

version 0.01

SYNOPSIS ^

    gfonts --scan /font/dir1 /font/dir2

    or

    gfonts [options] --popular 15

    or

    gfonts [options] regex1 regex2 ... regexN

DESCRIPTION ^

This program requires a Google API key for Web Fonts. See this page for more details. Once you have an API key, you must export it into your shell environment.

    $ export GOOGLE_FONTS_API_KEY='sekrit'

The program uses the key to get a JSON list of available fonts and font metadata, parses it into a Perl data structure and then caches the data to disk. If the cache on disk is older than 24 hours, it will get new data, overwriting the old files.

MINIMUM PERL VERSION

This program requires Perl 5.14 or later. It makes use several features and modules added to the perl core as of 5.14.

IMPLEMENTATION QUIRKS

This implementation focuses fairly exclusively on Mac OS X, but I would welcome patches to generalize this code to Linux and/or Windows.

OPTIONS ^

EXAMPLES ^

    google_fonts.pl "^Open Sans"

Show all font names that start with the pattern 'Open Sans'

    google_fonts.pl --output all "^Open Sans$"

Find the font that exactly matches 'Open Sans' and display all of its metadata.

    google_fonts.pl "^A"

Show all font names that begin with the letter 'A'

    google_fonts.pl --download "^A"

Show all the font names that being with 'A' and download them into the current directory.

AUTHOR ^

Mark Allen <mrallen1@yahoo.com>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2013 by Mark Allen.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: