def publish_to_ckan():
    global ckan_client
    
    # Initialize the CKAN client  
    ckan_client = ckanclient.CkanClient(base_location=args.ckan_api,api_key=args.ckan_api_key)
    
    # Create the name of the dataset on the CKAN instance
    dataset_id = args.ckan_dataset_name_prefix + args.dataset_name
    
    # Get the dataset from CKAN
    dataset_entity = get_remote_dataset(dataset_id)
    
    # Check to see if the dataset exists on CKAN or not
    if dataset_entity is None:

        # Create a new dataset
        create_dataset(dataset_id)
        
    else:
        
        # Update an existing dataset
        update_dataset(dataset_entity)

    # Update the dataset version on the CKAN repository (causes the last modified date to be updated)
    if args.increment != 'none':
        update_dataset_version()
Load data that we'll learn from
dataset/ETHPy150Open opencolorado/OpenColorado-Tools-and-Utilities/Scripts/ArcGIS/10.0/Python/PublishOpenDataset.py/publish_to_ckan--crossover with--dataset/ETHPy150Open ianozsvald/learning_text_transformer/learning_text_transformer/learner3.py/load_examples