docs: def read_datanommer_entries_from_filedump():
      """ Read in all datanommer entries from a file created with:
  
        $ datanommer-dump > myfile.json
      """
  
      # TODO -- un-hardcode this filename when I need to run this next time.
      #filename = "../myfile.json"
      filename = "../datanommer-dump-2012-11-22.json"
      print("Reading %s" % filename)
      progress = progressbar.ProgressBar(widgets=[
          progressbar.widgets.Percentage(),
          progressbar.widgets.Bar(),
          progressbar.widgets.ETA(),
      ])
  
      def _entries():
          failed = 0
          with open(filename, 'r') as f:
              raw = f.read()
              lines = raw.split('\n}\n')
              for line in progress(lines):
                  try:
                      yield json.loads(line + "\n}")
                  except:
                      failed += 1
          print(" * Failed to parse %i json objects" % failed)
  
      def comp(a, b):
          return cmp(a['timestamp'], b['timestamp'])
  
      result = sorted(list(_entries()), cmp=comp)
      print(" * Read and sorted %i messages" % len(result))
      print()
      return result