svg2android icon indicating copy to clipboard operation
svg2android copied to clipboard

Add NodeJS support

Open yuraj11 opened this issue 10 years ago • 8 comments

automate svg2android from CLI

yuraj11 avatar May 03 '15 18:05 yuraj11

This would be awesome

victorhaggqvist avatar Oct 31 '15 19:10 victorhaggqvist

There's support for drag & drop multiple svg at once.

yuraj11 avatar Oct 31 '15 19:10 yuraj11

Yeah sure, but kind of inconvenient for several hundred icons multiple times. Having it part of a build script would be handy.

victorhaggqvist avatar Oct 31 '15 20:10 victorhaggqvist

:+1:

Ashraf-Ali-aa avatar Feb 16 '16 17:02 Ashraf-Ali-aa

I will appreciate If someone could implement this - I do not plan implementing this feature. After research this would need a huge code rewrite.

yuraj11 avatar Feb 22 '16 17:02 yuraj11

:+1:

snowdream avatar Jun 18 '16 04:06 snowdream

I would love to pick this up, if you could provide some hints on how to get started since I am a Javscript newbie here :)

bhargavms avatar Jul 07 '17 07:07 bhargavms

@bhargavms: it seems as though the main method is generateCode. It seems to also need flatten.js and svg_shape_converter.js (and jQuery for the xml parsing). You would also need some way to set the command-line arguments that are offered by the web interface, f.ex.bakeTransforms (look for localStorage). @yuraj11 : thanks for the SW, it was the only one that worked for me. Please have a look at the outline and correct if anything is wrong or could be done better.

Summary:

simple:

  1. read svg from command line to data structure (from stdin, file name, pick one)
  2. apply generateCode, see which methods etc are needed
  3. write result to output (stdout, file, pick one)

enhanced:

  • options as set via web interface
  • i/o options
  • ? anything else ?

serv-inc avatar Aug 18 '17 09:08 serv-inc