# -*- coding: utf-8 -*-

import click

import ckanext.syndicate.utils as utils


def get_commands():
    return [syndicate, datastore]

@click.command()
def datastore():
    print('hello')

@click.group()
def syndicate():
    pass

@syndicate.command()
def seed():
    """Fill database with syndication profiles.
    """
    utils.seed_db()


@syndicate.command()
@click.argument("id", required=False)
def sync(id):
    """Syndicate datasets to remote portals.
    """
    utils.sync_portals(id)

@@ -489,8 +489,154 @@
 als(id)%0A
+%0A%0A@syndicate.command()%0Adef init():%0A    %22%22%22Creates new syndication table.%0A    %22%22%22%0A    utils.reset_db()%0A    log.info(%22DB tables are reinitialized%22)%0A

add missing init command in cli