botwiki / botwiki.org

Tutorials, articles, datasets and other resources for creating useful, interesting, artistic and friendly online bots.
http://botwiki.org
Other
83 stars 29 forks source link

Minor updates to botshotter.py #40

Closed stefanbohacek closed 8 years ago

stefanbohacek commented 8 years ago

@hugovk A few notes on the awesome script that you made -- mostly small stuff, let me know if you'd prefer me to take care of this myself.

hugovk commented 8 years ago

Yes, that stuff should be fine.

How do you normally run pngcrush? Can you give an example command?

stefanbohacek commented 8 years ago

I believe this will answer your question: https://github.com/botwiki/botwiki.org/issues/6 :-)

The reason for closing this was actually a bit misguided. I thought it would require keeping source images and saving optimized images separately, which is how I normally keep things (just in case, I suppose). It would make sense to just overwrite the screenshots in our case, so I think I'll look into reopening that issue.

Either way, I usually just use common/default values.

hugovk commented 8 years ago

Whilst looking at tags, should we change the case at all?

Does it matter if their order is changed when deduping? Do we want a specific order?

stefanbohacek commented 8 years ago

How about doing something like this (pseudocode):

switch (bot.type):
  case 'twitterbot':
    tags = ['twitter', 'twitterbot']
  break
// etc for other networks, then later
tags += user_submitted_tags 
          + (bot.is_opensource ? ['open source', 'opensource'] : ) 
          + author_twittername
// finally
tags.dedupe

I don't think the tag order particularly matters, but I would rather keep the order, which has been something like what the code above would produce.

This actually reminds me, we need to ask about the language for open source bots!

Oh and I'd definitely use lowercase. Thank you!

stefanbohacek commented 8 years ago

I added a question "If the bot is open source, what language was used to write it? (Or just leave blank.)".

hugovk commented 8 years ago

Did the new question shift the Added column one to the right? If so, I need to update for that too :)

hugovk commented 8 years ago

All but the pngcrush/Trimage addressed in #41.

It doesn't looks like Trimage has any Windows binaries, but pngcrush is more platform-independent.

Default options don't trim much:


GenerateACat.botshotter.png: generateacat botshotter


GenerateACat.trimage.png: generateacat trimage


GenerateACat.pngcrush.png: generateacat pngcrush

stefanbohacek commented 8 years ago

@hugovk Hmm, it looks like adding a new question adds a new column at the end, but before any manually added columns.

I just added a test submission, feel free to check it out and delete when done.

hugovk commented 8 years ago

Hmm, it looks like adding a new question adds a new column at the end, but before any manually added columns.

We'll have to remember that in future.

I just added a test submission, feel free to check it out and delete when done.

Test submission seemed to be processed okay. Deleted.

hugovk commented 8 years ago

The Trimage shows it using OptiPNG, I'll look into that. https://github.com/Kilian/Trimage/blob/master/src/trimage/trimage.py#L435

stefanbohacek commented 8 years ago

@hugovk Awesome, thank you!