cparnot / ASCIImage

Create UIImage / NSImage instances with NSString and ASCII art
MIT License
1.52k stars 76 forks source link

ASCIIImage as Xcode plugin, with Monodraw #3

Open cannyboy opened 9 years ago

cannyboy commented 9 years ago

It would be wonderful to have ASCIImage as an Xcode plug-in, perhaps utilising Monodraw - http://monodraw.helftone.com

So a user could: • hit a key-combo • draw image • hit return • have a ASCIIImage method written, with perfect iOS 8 style lines

mono-ascii

The endless tyranny of relying on designers and photoshop would be finished. The dawn bell would mark the hour of liberation, and the soothing light of justice would flood over the horizon. In the far future, when our own humble sun explodes, and when giant spaceships send our descendants into space to populate the universe, they will carry with them the memory of when ASCIIImage was made into an Xcode plugin. Something like that anyway.

cparnot commented 9 years ago

Hefty goals!

I suppose export from MonoDraw would be step 1 ;-) (cc @milen-me)

milend commented 9 years ago

I'm waiting to see how things pan out with ASCIImage Super Studio, as I don't want to end up duplicating work if possible.

Is there any roadmap for the studio app?

cparnot commented 9 years ago

@milen-me The ASCIImage Super Studio does not have any roadmap. I think MonoDraw could make it easier to generate ASCIImage-friendly strings. It's already potentially useful, maybe just a few tweaks needed. To be honest, I have not had a chance to really look into it. Please also use your resources wisely and make sure that makes sense for your app :-)

The Xcode plugin is... not a priority!

milend commented 9 years ago

... generate ASCIImage-friendly strings ...

Do we mean something like:

NSString* asciiImage = @".....";

If so, that'd be quite easy to do and could be another option in the export window. /cc @cparnot

cparnot commented 9 years ago

OK, let me give it a try. Given something like this from Monodraw:

┌─────────────────┐
│                 │
│   ───────────   │
│                 │
│   ───────────   │
│                 │
│   ┌─────────┐   │
│   │         │   │
│   │         │   │
│   └─────────┘   │
│                 │
└─────────────────┘

We could get something like this (note how the horizontal dimension is divided by 2, which assumes the user drew in Monodraw only using odd numbers in that axis):

1 ─ ─ ─ ─ ─ ─ ─ ─ 2
│ . . . . . . . . │
│ . 5 ─ ─ ─ ─ 5 . │
│ . . . . . . . . │
│ . 6 ─ ─ ─ ─ 6 . │
│ . . . . . . . . │
│ . 7 ─ ─ ─ ─ 8 . │
│ . │ . . . . │ . │
│ . │ . . . . │ . │
│ . A - - - - 9 . │
│ . . . . . . . . │
4 ─ ─ ─ ─ ─ ─ ─ ─ 3
cparnot commented 9 years ago

Actually, a better output might be so that it will always draw lines, not filled:

1 ─ ─ ─ ─ ─ ─ ─ ─ 1
4 . . . . . . . . 2
│ . 5 ─ ─ ─ ─ 5 . │
│ . . . . . . . . │
│ . 6 ─ ─ ─ ─ 6 . │
│ . . . . . . . . │
│ . 7 ─ ─ ─ ─ 7 . │
│ . A . . . . 8 . │
│ . A . . . . 8 . │
│ . 9 - - - - 9 . │
4 . . . . . . . . 2
3 ─ ─ ─ ─ ─ ─ ─ ─ 3