#!/usr/bin/env php
<?php

require_once __DIR__ . '/htmlpretty/htmlformat.php';

list($src, $dest) = [
  empty($argv[1]) ? '' : $argv[1],
  empty($argv[2]) ? '' : $argv[2]
];

if (empty($src)) {
  echo Beautify::through(file_get_contents('php://stdin'));
  die();
}

Beautify::copy($src, $dest);
