# Path: pagekite/compat.py
# def ts_to_iso(ts=None):
#   return datetime.datetime.utcfromtimestamp(ts).isoformat()


import os
import re
import time
  import sys
from .common import *
from .compat import ts_to_iso
  return ("""\
>>> Welcome to pagekite.py v%s!

%s
    To sign up with PageKite.net or get advanced instructions:
    $ pagekite.py --signup
    $ pagekite.py --help

    If you request a kite which does not exist in your configuration file,
    the program will offer to help you sign up with https://pagekite.net/
    and create it.  Pick a name, any name!\
""") % (APPVER, clean_text(MAN_EXAMPLES))


def DOC():
  doc = ''
  for h, section, text in MANUAL_TOC:
    doc += '%s\n\n%s\n' % (h == 'SH' and section.upper() or '  '+section,
                           clean_text(text))
  return doc


def MAN(pname=None):
  lastchange = float(os.environ.get('SOURCE_DATE_EPOCH',
                                    os.path.getmtime(sys.argv[0])))
  man = ("""\
.\\" This man page is autogenerated from the pagekite.py built-in manual.
.TH PAGEKITE "1" "%s" "https://pagekite.net/" "Awesome Commands"
.nh
.ad l

# Path: pagekite/compat.py
# def ts_to_iso(ts=None):
#   return datetime.datetime.utcfromtimestamp(ts).isoformat()


# Path: pagekite/manual.py
import os
import re
import time
  import sys
from .common import *
from .compat import ts_to_iso

  return ("""\
>>> Welcome to pagekite.py v%s!

%s
    To sign up with PageKite.net or get advanced instructions:
    $ pagekite.py --signup
    $ pagekite.py --help

    If you request a kite which does not exist in your configuration file,
    the program will offer to help you sign up with https://pagekite.net/
    and create it.  Pick a name, any name!\
""") % (APPVER, clean_text(MAN_EXAMPLES))


def DOC():
  doc = ''
  for h, section, text in MANUAL_TOC:
    doc += '%s\n\n%s\n' % (h == 'SH' and section.upper() or '  '+section,
                           clean_text(text))
  return doc


def MAN(pname=None):
  lastchange = float(os.environ.get('SOURCE_DATE_EPOCH',
                                    os.path.getmtime(sys.argv[0])))
  man = ("""\
.\\" This man page is autogenerated from the pagekite.py built-in manual.
.TH PAGEKITE "1" "%s" "https://pagekite.net/" "Awesome Commands"
.nh
.ad l

""") % ts_to_iso(lastchange).split('T')[0]