diff --git a/bin/ebooks b/bin/ebooks index 7fccb4d..5afae92 100755 --- a/bin/ebooks +++ b/bin/ebooks @@ -113,12 +113,23 @@ STR Archive.new(username, outpath).sync end - def self.tweet(modelpath, username) + def self.tweet(modelpath, botname) + usage = < [old_corpus_path2] [...] + +Takes an old-style corpus of plain tweet text and converts it to json. +STR + + if modelpath.nil? || botname.nil? + log usage + exit + end + load File.join(APP_PATH, 'bots.rb') model = Model.load(modelpath) statement = model.make_statement - log "@#{username}: #{statement}" - bot = Bot.get(username) + log "@#{botname}: #{statement}" + bot = Bot.get(botname) bot.configure bot.tweet(statement) end @@ -162,15 +173,16 @@ STR end def self.command(args) - usage = """Usage: + usage = < ebooks consume [corpus_path2] [...] ebooks gen [input] ebooks score ebooks archive <@user> - ebooks tweet <@bot> + ebooks tweet ebooks jsonify [old_corpus_path2] [...] -""" +STR if args.length == 0 log usage