<commit_before>require "pry"
require "json"
require "mp3info"
require "sinatra"

require 'jukeberx/version'
require 'jukeberx/song'
require 'jukeberx/searcher'

MUSIC_DIR = '/Users/brit/Music/downloads'

module Jukeberx
end

searcher = Jukeberx::Searcher.new(MUSIC_DIR)
searcher.get_mp3s

binding.pry<commit_msg>Start on a basic server.<commit_after>require "pry"
require "json"
require "mp3info"
require "sinatra/base"

require 'jukeberx/version'
require 'jukeberx/song'
require 'jukeberx/searcher'

MUSIC_DIR = '/Users/brit/Music/downloads'

module Jukeberx
  class App < Sinatra::Base
    set :library, Jukeberx::Searcher.new(MUSIC_DIR)
    enable :logging

    get '/' do
      "Do you know how to use the API? Try these routes!
            '/artists',
            '/albums',
            '/titles'"
    end

    get '/artists' do
      settings.library.list_artists.to_json
    end

    get '/albums' do
      settings.library.list_albums.to_json
    end

    get '/titles' do
      settings.library.list_titles.to_json
    end

    post '/play' do
      
    end

    run! if app_file == $0
  end
end

{'fraction_non_alphanumeric': 0.10669077757685352, 'fraction_numerical': 0.003616636528028933, 'mean_word_length': 3.0254545454545454, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '456390', 'n_tokens_mistral': 412, 'n_tokens_neox': 409, 'n_words': 94}