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

Generated from submissions #34

Merged
merged 5 commits into from
Oct 15, 2015
Merged

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Oct 14, 2015

I've made a script to process Twitter bots (and only Twitter bots for now) from the submissions form, and create .md files and images.

It doesn't update the spreadsheet, just reads from it for now.

How does this look?

@stefanbohacek
Copy link
Member

The script is really amazing! A few notes:

  • The folder name/path for Twitter bots is twitterbots. This is a bit inconsistent with some other networks, for example we have redditbots, but then also youtube-bots or snapchat-bots. Honestly, I don't really know if we need to be consistent here, for example: https://en.wikipedia.org/wiki/Twitterbot -- this mentions both "Twitterbots" and "Twitter bots" or "twitter bots". I just kind of went with whatever felt "natural" for each network.
  • Can you remove leading white space from the tags?
  • For Twitterbots (Twitter bots?), can we include @ before the bot's name?

@stefanbohacek
Copy link
Member

Oh, one more thing, can the script insert true into a column titled Added?

This way the script can only run through bots that are not marked as added, but we can keep the data instead of automatically deleting anything. So we'll have a backup, justst in case something goes wrong.

@stefanbohacek
Copy link
Member

I don't know why it didn't occur to me right away, but maybe we can just show a dropdown, on the submit form, asking the user which network the bot operates on? That would remove a lot of the need for parsing.

@hugovk
Copy link
Contributor Author

hugovk commented Oct 15, 2015

Yes to all those. I'll update the PR, and also make another one with the scripts.

A dropdown makes sense. Of course there's always the possibility someone's made a somethingelsebot, but I suppose an "Other" option can deal with that. Can you update the form?

@hugovk
Copy link
Contributor Author

hugovk commented Oct 15, 2015

  • Can you remove leading white space from the tags?

Right now tags is just from the column D with no processing. For example:

art, nature, fiction, inspiration, inspiring, escapismtinyworlds

Do you want to remove all spaces (eg tags.replace(" "), ""), or just after commas (eg tags.replace(", "), ",").

The former would also remove spaces from inside tags (eg fish and chips -> fishandchips).

@hugovk
Copy link
Contributor Author

hugovk commented Oct 15, 2015

PR updated.

  • Remove leading white space from the tags
    • Removes all spaces, but should we keep spaces in tags?
    • Should we also add the creator name to the tags?
  • For Twitterbots, include @ before the bot's name
  • insert true into a column titled Added

I also added the Python scripts in this PR too. Seems simpler that way, as they go hand-in-hand with this generated content.

Private credentials are needed in botsheeter.json, you can make your own by following this but I can probably share mine privately.

TODO

  • Show a dropdown, on the submit form, asking the user which network the bot operates on

@stefanbohacek
Copy link
Member

Awesome job!

Hm, it's a bit funny about the spaces in the actual tags. See this for something really embarassing.

Basically, we need to really sort out the search/tagging, because right now it matches pretty strictly and as a pretty bad short term solution I started doing something like this with tags:

#opensource #open source #node.js #nodejs #node

Yep.

So I'm going to say let's leave the spaces in the actual tags, because a long term solution is for those to not matter.

Note: I also added the dropdown to the submission form.

stefanbohacek added a commit that referenced this pull request Oct 15, 2015
Generated from submissions
@stefanbohacek stefanbohacek merged commit c8e4798 into botwiki:master Oct 15, 2015
@hugovk hugovk deleted the generated branch October 15, 2015 13:19
@hugovk
Copy link
Contributor Author

hugovk commented Oct 15, 2015

OK PR coming up to retain spaces.

PS run like python other/botsheeter.py -h from the root of the repo.

@stefanbohacek
Copy link
Member

👍

@hugovk
Copy link
Contributor Author

hugovk commented Oct 15, 2015

Oh, one more thing, can the script insert true into a column titled Added?

This way the script can only run through bots that are not marked as added, but we can keep the data instead of automatically deleting anything. So we'll have a backup, just in case something goes wrong

Just realised I only set the script to insert true in the column, and doesn't check the value. Right now it only creates a new .md if no .md file already exists, and only takes a new screenshot if no .png already exists.

I'll add the extra check so if a bot is marked as added, it won't be processed. I'll leave the file-exists checks too.

@stefanbohacek
Copy link
Member

The file existence check is very nice!

stefanbohacek added a commit that referenced this pull request Mar 4, 2016
Generated from submissions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants