#!/usr/bin/ruby

require "engine.rb"
require "environment.rb"

# Consider a front-component approach here that does request/response handling,
# with a way to map URIs onto specific application functions.

# Application functions would be handled by "responder" objects that generate
# responses, including the response headers (see hack in Environment class).
env = Environment.new
printer = HttpPrinter.new(env)

criteria = Criteria.new(env.get_query_path)
weblog = Weblog.new(criteria)
printer.write(weblog.generate_content)
print printer.content




