amcerbu wrote:
Nice! Congrats! I can't wait to check it out!
Me to
Offline
blob8108 wrote:
Did you see this...?
blob8108 wrote:
MathWizz wrote:
Live updating blocks.
It should already do that... ._.
EDIT: (checks) Yeah, it does for me. What are you using...?
Odd... It didn't before. When did you add it?
Offline
roijac wrote:
@blob, did you fix the file size image bug?
"file size image bug"?
I've fixed all the bugs I do know about! I've just tested it on Windows (wow, Python for Windows is a pain) and I'm just about to upload to PyPI
Offline
Well, decompilation could still use some optimisation. And I still haven't compressed the images (although that would make it even slower...). But that's fine! It works.
And darn, uploading to PyPI is difficult!
But it is now uploaded.
Head over to the Github project page and follow the readme there
Offline
blob8108 wrote:
And I still haven't compressed the images
\
that's what i meant...
also, how do you import the compiler from WARNING: Make sure you take backups of your Scratch projects before saving anything with kurt! I can't accept responsibility for corrupting your files.a python script?
Last edited by roijac (2012-09-04 15:05:34)
Offline
roijac wrote:
blob8108 wrote:
And I still haven't compressed the images
that's what i meant...
It's not a bug; it works perfectly. It just generates slightly larger .sb files than necessary.
also, how do you import the compiler from a python script?
"from kurt.compiler import compile" (Similarly for decompile.)
See "cmd_compile" in kurt/compiler.py for the various errors you need to handle
Last edited by blob8108 (2012-09-04 15:12:42)
Offline
blob8108 wrote:
roijac wrote:
blob8108 wrote:
And I still haven't compressed the images
that's what i meant...
It's not a bug; it works perfectly. It just generates slightly larger .sb files than necessary.
it IS a bug, and it's not that slightly...
blob8108 wrote:
also, how do you import the compiler from a python script?
"from kurt.compiler import compile" (Similarly for decompile.)
See "cmd_compile" in kurt/compiler.py for the various errors you need to handle
oh, ok
bit complicated to sort out all morphs from dir(kurt)
also, ever thought of threading to speed compilation up?
should help a lot
Last edited by roijac (2012-09-04 15:26:00)
Offline
roijac wrote:
bit complicated to sort out all morphs from dir(kurt)
Yup though the only classes you should really need are Stage, Sprite, ScratchListMorph, Image, Script, Block, maybe Comment, and the two file classes. (I've cheated; these aren't all morphs. ) Oh, and Watcher-morph-thingy. I don't have the list in front of me...
ever thought of threading to speed compilation up?
should help a lot
I don't think Python threads help /that/ much, actually (because of the "global interpreter lock"?). I think you can use multiprocessing to use multiple processor cores, which might be worth it (although still very complicated to code.)
Offline
roijac wrote:
also, how do you import the compiler from a python script?
It just occured to me that perhaps you were looking for the script that parses block plugin syntax -- that's separate, the method kurt.parse_block_plugin(). It's a bit complicated, though, because you have to call some methods on the returned Script object to fix variables and such -- see how compiler.py does it.
Offline
roijac wrote:
blob8108 wrote:
roijac wrote:
that's what i meant...It's not a bug; it works perfectly. It just generates slightly larger .sb files than necessary.
it IS a bug, and it's not that slightly...
You can always just open the project in Scratch and save it again...
Offline
A download for Mac yet?
EDIT: Found the download.
Last edited by jji7skyline (2012-09-05 02:49:16)
Offline
jji7skyline wrote:
A download for Mac yet?
EDIT: Found the download.
Yeah, I tested on OS X/Ubuntu/Windows. Should all work fine
[It's easy once you have pip installed...]
Command-line only, though, I'm afraid...
Last edited by blob8108 (2012-09-05 02:54:24)
Offline
jji7skyline wrote:
A download for Mac yet? ...
Did you get it to work?
Offline
Blob, can you please write me a quick tutorial on how to do the image import thing?
EDIT: Also, what text/code editor is pictured in the screenshot on the main post? Xcode?
Last edited by Hardmath123 (2012-09-07 08:14:36)
Offline
Hardmath123 wrote:
Blob, can you please write me a quick tutorial on how to do the image import thing?
You mean importing multiple images into a project, for a stop motion or something similar? Try this:
1) Make a folder called "stopmotion files/Stage/backgrounds/"
2) Dump your images into the "backgrounds" folder (NB: they get sorted alphabetically). JPGs are preferred, as they're about a zillion times faster. Also make sure they're 480x360 or less.
3) from the directory containing "stopmotion files", run:
$ kurtc.py compile stopmotion
* you may need to make a blank "notes.txt" file inside "stopmotion files". This is a bug — I fixed it just now. I updated Github and PyPI (Try "sudo pip install --upgrade kurt")
EDIT: Also, what text/code editor is pictured in the screenshot on the main post? Xcode?
Last edited by blob8108 (2012-09-07 09:32:46)
Offline
I'm currently not on my old Mac (where I have admin privileges), so I can't install. Can I run Kurt with the folder dumped on say my desktop? Also, do I need to download and install the other libraries separately, or do you think you could include them in Kurt?
EDIT: What am I thinking? This Mac doesn't have Scratch in the first place; why am I bothering? I'll get back to this once I get to the other Mac. I've been having one of those days; this morning I took out a juice box, got the straw, and found myself shaking the straw and staring at the juice box...
Last edited by Hardmath123 (2012-09-07 09:51:14)
Offline
Hardmath123 wrote:
Can I run Kurt with the folder dumped on say my desktop? Also, do I need to download and install the other libraries separately, or do you think you could include them in Kurt?
You can do that, yes — the script's found under util/kurtc.py.
EDIT: as for the other libraries, you'll have to get those separately, I'm afraid. With the exception of htmlcolor, there's no way I can include all the right versions — especially for PIL, where you ideally need binary distributions for each platform.
I've been having one of those days; this morning I took out a juice box, got the straw, and found myself shaking the straw and staring at the juice box...
...what?!
Last edited by blob8108 (2012-09-07 10:12:25)
Offline
blob8108 wrote:
Hardmath123 wrote:
Can I run Kurt with the folder dumped on say my desktop? Also, do I need to download and install the other libraries separately, or do you think you could include them in Kurt?
You can do that, yes — the script's found under util/kurtc.py.
EDIT: as for the other libraries, you'll have to get those separately, I'm afraid. With the exception of htmlcolor, there's no way I can include all the right versions — especially for PIL, where you ideally need binary distributions for each platform.I've been having one of those days; this morning I took out a juice box, got the straw, and found myself shaking the straw and staring at the juice box...
...what?!
Yeah. Too much Scratching.
Offline
Hardmath123 wrote:
Yeah. Too much Scratching.
Really? That's... bad for you...?
Offline
blob8108 wrote:
Hardmath123 wrote:
Yeah. Too much Scratching.
Really? That's... bad for you...?
Good for me, bad for anyone around me who has to put up with the occasional lecture on lambda calculus or cellular automata... Though I have found myself getting really absent-minded recently, I have too much code/math floating through my brain.
Offline
Hardmath123 wrote:
blob8108 wrote:
Hardmath123 wrote:
Yeah. Too much Scratching.
Really? That's... bad for you...?
Good for me, bad for anyone around me who has to put up with the occasional lecture on lambda calculus or cellular automata... Though I have found myself getting really absent-minded recently, I have too much code/math floating through my brain.
But lambda calculus and cellular automata are awesome...
I get that sometimes — coding problems can obsess me slightly and distract me from life...
Last edited by blob8108 (2012-09-07 13:49:53)
Offline
blob8108 wrote:
Hardmath123 wrote:
blob8108 wrote:
Really? That's... bad for you...?Good for me, bad for anyone around me who has to put up with the occasional lecture on lambda calculus or cellular automata... Though I have found myself getting really absent-minded recently, I have too much code/math floating through my brain.
But lambda calculus and cellular automata are awesome...
Not according to anyone in my school.
I get that sometimes — coding problems can obsess me slightly and distract me from life...
Explaining my situation with the juice box.
[/offtopic]
Offline
roijac wrote:
is there any method to get PIL object from an image?
kurt Image.get_image() -> Return a PIL.Image.Image object
Last edited by blob8108 (2012-09-14 16:38:12)
Offline