Closed (fixed)
Project:
@font-your-face
Version:
7.x-2.x-dev
Component:
Code (general)
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2012 at 12:30 UTC
Updated:
26 Nov 2012 at 23:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
Drave Robber commentedAlso, we can have it return general status information, along the lines of:
Drush allows funny aliases. :)
Comment #2
Drave Robber commentedPatch attached.
Requires patch in #1823722: fontyourface_count_fonts() is broken to be applied first.
Import seems not to work for Font Squirrel as it is in current -dev, because
fontsquirrel_fontyourface_import()does not properly return$success;on the other hand, the new shiny batch import from #1124500: Interface for Font Squirel import only first font in family actually does not work. I need to read up on drush/batches relationship to find out why.
Comment #3
Drave Robber commentedHere's a glimpse of this in action:

I haven't yet figured it out how to create a new command group, but neither I'm sure if it's really necessary.
Comment #4
BarisW commentedAwesome! Thanks so much for setting this up.
Can you change the message 'Imported fonts from edge_fonts' to something like this: 'Imported 1200 fonts from Edge Fonts'?
You might also want to introduce two shortcuts for these command (fyfs & fyfi)?
What are the @i and @s shortcuts for?
Comment #5
Drave Robber commentedImport functions only return TRUE/FALSE, so we won't know how many new/changed were imported; we could however get a count before and after and report it like:
@sis an alias offyf-status; Drush seems to have no problem with such eccentric aliases.I must confess I was tempted to make it drush ffs at first, but then there would be a risk of alias conflict if someone had similar temptation. :)
I'm open to other suggestions as to what the most appropriate aliases would be.
Comment #6
BarisW commentedWhat would think of:
drush font-import / drush fyfi
drush font-status / drush fyfs
Can font-import handle arguments? Like drush font-import google_fonts?
Comment #7
Drave Robber commentedSure:

Comment #8
sreynen commentedI don't have a strong opinion on @s vs. fyfs as the alias. I suspect fyfs would be a little easier to remember, so I'd probably learn toward that, but it's pretty easy to get a reminder of the alias either way.
Comment #9
Drave Robber commentedIn fact, multiple aliases are possible - sorry for making fuss out of non-issue.
Here's a new patch. Differences to #2:
- two aliases for each command;
- found out how to create a command group;
-
fyf-statushandles a situation where there are enabled providers but no enabled fonts;- for Font Squirrel,
fyf-importexplicitly says 'not supported yet' (let's look into it when/if the batch import patch lands);-
fyf-importreports something like 'edge_fonts now has 862 fonts (+2).' for each provider where import was successful.Comment #10
sreynen commentedCommitted. I had to do drush cc drush (clearing the drush cache) before it noticed the new file. There may be something to do in hook_update_N() to make that unnecessary, but I think anyone using this probably knows how to do that already. And if they don't, this note is here.