import version import server/forkserver let forks = newForkServer() import options import os import posix import terminal when defined(profile): import nimprof import config/chapath import config/config import io/serversocket import local/client import types/opt import utils/twtstr import chakasu/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