Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage existing image files #6

Open
andreacremaschi opened this issue Oct 7, 2015 · 5 comments
Open

Manage existing image files #6

andreacremaschi opened this issue Oct 7, 2015 · 5 comments

Comments

@andreacremaschi
Copy link

Hi @jondot

thank you for this project! This is something I've always thought about, but your current implementation is even better than my dreams :)

I see some space of possible enhancement in the way file names are handled: currently as I understand it is not possible to use wildcards, and image PNGs must be mapped 1-to-1 with imagesets in asset catalogs. I wonder if you have any thoughts on how to handle wildcards or file name pattern matching in Bladefiles. A different approach could be to auto-generate Bladefiles from the content of a folder or an asset catalog.

Cheers,
ac

@jondot
Copy link
Owner

jondot commented Oct 7, 2015

Hi @andreacremaschi , I'm happy to hear you find Blade useful!
Regarding generating Bladefiles from assetcatalogs - sounds like a great idea in fact.
Regarding wildcards - I'm not sure I completely see what you mean, can you give a short example?

Thanks

@andreacremaschi
Copy link
Author

Well it often happens that I am handed a folder full of images to integrate in my Xcode project.
Creating the Bladefile by hand would be a pain. Being able to create/update a Bladefile from an existing asset catalog would solve the problem: I'd drag the image files in the catalog, let Xcode create it and create the Bladefile from the catalog.
As an alternative I was thinking about something like this:

blades:
  - source: *.png # this image should be the only image, and the biggest image you can use (typically for icons, 1024x1024)
    mount: Assets.xcassets/
    contents: true  # use 'false' if you want to only update existing catalog, 'true' if you want to generate a full catalog every time

This would work if the image sets are created with the same name than the source images. But the first solution discussed is definitely the one I prefer.

@jondot
Copy link
Owner

jondot commented Oct 7, 2015

Aha! yes, that's a cool idea indeed. I'll tag this as enhancement and will work on it as soon as time allows :)

@michallaskowski
Copy link

+1, btw I love the project.

@Jeehut
Copy link

Jeehut commented Feb 7, 2016

@jondot Did you already have time to work on this? This would really save a lot of time when integrating a bunch of new images into a project. 👍

I prefer the second suggestion by the way and I think it shouldn't be too hard to implement given that creating a single asset is already possible. I mean the *.png style. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants