paulyoung / fontello-cli

Command line interface for fontello.
MIT License
88 stars 30 forks source link

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

Closed lolmaus closed 3 years ago

lolmaus commented 10 years ago

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.

paulyoung commented 10 years ago

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

lolmaus commented 10 years ago

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.
paulyoung commented 10 years ago

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

kblagojevic commented 9 years ago

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.

henrijs commented 9 years ago

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

rootical commented 9 years ago

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.

alisman commented 9 years ago

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.

paulyoung commented 9 years ago

@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.

derekonay commented 9 years ago

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

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

paulyoung commented 9 years ago

@derekonay not that I know of, feel free!

alisman commented 9 years ago

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 https://github.com/paulyoung/fontello-cli/issues/16#issuecomment-153115869 .

derekonay commented 9 years ago

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.

paulyoung commented 8 years ago

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.

EddieOne commented 8 years ago

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

lolmaus commented 3 years ago

Nice, thanks!