Extension Twitter


Extension Basics

Title
Twitter
Name
ckanext-twitter
Type
Public extension
Description
CKAN extension that posts tweets when datasets are created or updated, using Jinja2 templates for tweet generation. Deprecated and archived due to Twitter/X API changes in 2023.
CKAN versions
Download-Url (zip)
Last commit
a year ago (2024-05-14 10:45:29)
Url to repo
Category
Specialized Tools


Background Infos

Description (long)
Show details

ckanext-twitter

DEPRECATED. Due to the API changes Twitter/X introduced in 2023, this extension no longer works and will not be fixed. There will not be any further releases, new features, or bugfixes.

Status: ARCHIVED (May 14, 2024)

A CKAN extension that enables users to post a tweet every time a dataset is created or updated. Developed by the Natural History Museum, London.

Features

  • Automatic tweet posting when datasets are created or updated
  • Uses the after_update hook to trigger tweets
  • Jinja2 template-based tweet generation with tokens from package dictionary
  • Configurable tweet templates for new and updated datasets
  • Debug mode for testing without posting
  • Cooldown period between tweets (configurable)
  • Option to disable edit notifications

Requirements

  • CKAN 2.9
  • Python 3.6, 3.7, 3.8
  • oauth2==1.9.0.post1
  • ckantools>=0.3.0

Installation

Install the extension:

pip install ckanext-twitter

Add twitter to your CKAN plugins:

ckan.plugins = twitter

Configuration

# REQUIRED - Twitter API credentials
ckanext.twitter.consumer_key = <your Twitter consumer key>
ckanext.twitter.consumer_secret = <your Twitter consumer secret>
ckanext.twitter.token_key = <your Twitter token key>
ckanext.twitter.token_secret = <your Twitter token secret>

# Tweet templates (Jinja2)
ckanext.twitter.new = <template for new datasets>
ckanext.twitter.updated = <template for updated datasets>

# Other options
ckanext.twitter.debug = True/False (default: False)
ckanext.twitter.hours_between_tweets = <integer> (default: 24)
ckanext.twitter.disable_edit = True/False (default: False)

License

GPL-3.0

Version
2.2.9
Version release date
2024-05-14
Contact name
Natural History Museum
Contakt email
Contact Url
(not set)


Installation Guide

Configuration hints

DEPRECATED - no longer works due to Twitter/X API changes in 2023. Archived repository. Requires Twitter API credentials (consumer key/secret, token key/secret).

Plugins to configure (ckan.ini)
twitter
CKAN Settings (ckan.ini)
# ckanext.twitter.consumer_key =
# ckanext.twitter.consumer_secret =
# ckanext.twitter.token_key =
# ckanext.twitter.token_secret =
# ckanext.twitter.debug = False
# ckanext.twitter.hours_between_tweets = 24
# ckanext.twitter.disable_edit = False
DB migration to be executed
(not set)
<< back to Extensions