<commit_before>%h1 Add scraper

%p This is where you will be able to pick a repository from your GitHub to add as a scraper

%p
  For the time being scrapers are restricted to using Ruby. They need to have a file in the root
  directory called "scraper.rb" and they should create an sqlite database in the current working
  directory called "scraperwiki.sqlite". The main data should be written into a table called "swdata".
  The code needs to live in the master branch of the repository.

-# TODO Don't show repos that we've already added

= semantic_form_for @scraper do |f|
  = f.inputs do
    = f.input :name, as: :select, collection: @repos.map{|r| r.name}, label: "GitHub Repository", include_blank: false
  = f.actions do
    = f.action :submit, label: "Add Scraper"<commit_msg>Show list of repos as radio. Fixes #51<commit_after>%h1 Add scraper

%p This is where you will be able to pick a repository from your GitHub to add as a scraper

%p
  For the time being scrapers are restricted to using Ruby. They need to have a file in the root
  directory called "scraper.rb" and they should create an sqlite database in the current working
  directory called "scraperwiki.sqlite". The main data should be written into a table called "swdata".
  The code needs to live in the master branch of the repository.

-# TODO Don't show repos that we've already added

= semantic_form_for @scraper do |f|
  = f.inputs do
    = f.input :name, as: :radio, collection: @repos.map{|r| ["<strong>#{r.name}</strong> &mdash; #{r.description}".html_safe, r.name]}, label: "GitHub Repository", include_blank: false
  = f.actions do
    = f.action :submit, label: "Add Scraper"
{'fraction_non_alphanumeric': 0.0835838845460012, 'fraction_numerical': 0.0024052916416115455, 'mean_word_length': 4.0120481927710845, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5264056', 'n_tokens_mistral': 515, 'n_tokens_neox': 497, 'n_words': 241}