import version import server/forkserver let forks = newForkServer() import std/options import std/os import config/config import io/serversocket import js/javascript import local/client import local/term import utils/strwidth import utils/twtstr import chagashi/charset proc main() = let params = commandLineParams() proc version(long: static bool = false): string = result = "Chawan browser v0.1 " when defined(debug): result &= "(debug)" else: result &= "(release)" proc help(i: int) = let s = version() & """ Usage: cha [options] [URL(s) or file(s)...] Options: -- Interpret all following arguments as URLs -c, --css Pass stylesheet (e.g. -c 'a{color: blue}') -d, --dump Print page to stdout -h, --help Print this usage message -o, --opt Pass config options (e.g. -o 'page.q="quit()"') -r, --run