paulyoung / fontello-cli

Command line interface for fontello.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fontello-cli won't fetch updates after saving session in browser

lolmaus opened this issue · comments

Hi!

I've got a fontello.json in my project folder, downloaded manually from fontello.com. I would like to update it with new icons by leveraging fontello-cli.

I have installed fontello-cli locally as i'm going to use it in a Grunt task:

npm install fontello-cli --save-dev

Then i do:

node_modules/fontello-cli/bin/fontello-cli open --config fontello.json

A browser window is opened with my icons already selected.

I select another icon and press "Save selection".

Then i do:

node_modules/fontello-cli/bin/fontello-cli install --config fontello.json --css fontello --font fontello

It successfully downloads the font and css files from Fontello, but the newly selected icon does not appear. The config file is also not updated with the new icon.

Please help me resolve this issue.

From what I can tell, clicking "Save session" makes an rpc request to fontello.com and there's no way for fontello-cli to know about that.

The only thing fontello-cli can currently interface with to download fonts is config.json

According to Fontello API description, a POST request to http://fontello.com/ creates a session with your config and returns your session_id. You can use it later to open Fontello with you configuration and to automatically download your font. Session is stored for 24h.

Thus, this workflow should be possible:

  1. fontello-cli open to open a browser and have it save a session id.
  2. Manually modify icons selection and click Save session.
  3. fontello-cli install to download font using the session if from step 1.
  4. Update the local Fontello config file with the one downloaded from step 3.

Thanks for the info. I'll look into this.

I am experiencing the same problem... the downloads are missing the new icons. The only way I can add icons is to manually download, rename, and move the file.

Same here. Also there is no session id in config.json.

Similar issue, when calling fontello-cli open from my icons directory, I expect it's initial content to be overwritten by the fontello-cli install command with new fonts and css. Instead a new folder being created with session name.

Ditto on this issue. Paul are you going to do this work or would you like us to? Happy to help out on this great project.

@alisman I'm not able to look into this right now but would be happy to discuss a solution and review a pull request if you'd like to contribute.

Just wanted to see if anyone has done any work on this?

If not I will probably take a stab at working this in.

@derekonay not that I know of, feel free!

Yeah, we haven't been able to invest the time. But would be great if this
was solved. Thanks!

On Mon, Nov 2, 2015 at 1:24 PM, Derek Onay notifications@github.com wrote:

Just wanted to see if anyone has done any work on this?

If not I will probably take a stab at working this in.


Reply to this email directly or view it on GitHub
#16 (comment)
.

I just want to see if I am thinking about this correctly, but couldn't we just save the session id from the browser in a variable after running fontello-cli open. Then on install the program makes a get request to the specified url + the saved session id and not the one created from the config.json?

edit Sorry to have not updated this, but I am currently not able to put too much time into this. If I pick it back up I'll be sure to come back and report.

I don't think a variable will cut it because the process exists after each command. The session ID would need to be stored in a way that it will persist after fontello open is run.

+1 The readme should be updated as this module doesn't work.