newsdev / ai2html

A script for Adobe Illustrator that converts your Illustrator artwork into an html page.
http://ai2html.org
Other
904 stars 147 forks source link

Factor out the parser #2

Closed stevenvachon closed 7 years ago

stevenvachon commented 9 years ago

to another library (preferably an npm package) so that other libraries can use it and to single out that feature for community involvement.

I had wanted to write an ai2svg library a while back and may still need to. Using your parser would save me a lot of trouble.

archietse commented 9 years ago

This is on my to do list. Am planning to start with an ai text to archieml export but will eventually expand that later to json that will contain text formatting attributes of each paragraph.

stevenvachon commented 9 years ago

+1

mbloch commented 7 years ago

Hi @stevenvachon,

You mentioned being interested in an ai2svg library... did you envision something that would parse .ai files directly, without having to run Illustrator? ai2html uses Illustrator's internal JavaScript API to read the contents of Illustrator documents, which means running Illustrator. That's probably not going to change.

I think that Archie was suggesting that ai2html switch to a two-step translation: first convert native Illustrator objects to an intermediate format internally, then convert this internal format to one or another output formats (e.g. HTML or JSON).

For conversion to SVG, Illustrator's own export function seems to work well.

Do you want more control over how SVG gets exported than what Illustrator gives you?

stevenvachon commented 7 years ago

@mbloch I'd hoped to not depend on Illustrator. Accurate SVG output is fine, as cleanup can be performed with svgo.

mbloch commented 7 years ago

@stevenvachon It looks like ai2html is always going to depend on Illustrator for .ai file parsing and SVG export. We're not going to be able to remove that dependency...

stevenvachon commented 7 years ago

Ok, thank you.