code: def do_init(argdict):
      '''Create the structure of a s2site.'''
      site = make_site_obj(argdict)
      try:
          site.init_structure()
          print "Initialized directory."
          if argdict['randomsite']:
              #all_tags = ['tag1','tag2','tag3','tag4']
              for i in range(1,argdict['numpages']+1):
                  #ptags = random.sample(all_tags,random.randint(1,len(all_tags)))
                  p = site.random_page()
                  p.set_published()
                  p.write()
                  print "added page ",p.slug
      except ValueError: # pragma: no cover
          print "Cannot create structure. You're already within an s2 \
  tree, or the directory is not empty or it is not writeable. f do_init(argdict):
      '''Create the structure of a s2site.'''
      site = make_site_obj(argdict)
      try:
          site.init_structure()
          print "Initialized directory."
          if argdict['randomsite']:
              #all_tags = ['tag1','tag2','tag3','tag4']
              for i in range(1,argdict['numpages']+1):
                  #ptags = random.sample(all_tags,random.randint(1,len(all_tags)))
                  p = site.random_page()
                  p.set_published()
                  p.write()
                  print "added page ",p.slug
      except ValueError: # pragma: no cover
          print "Cannot create structure. You're already within an s2 \
  tree, or the directory is not empty or it is not writeable. "
docs: Create the structure of a s2site.