<commit_before>var voluble_plugin_base = require('../plugin_base.js')
var manifest = require('./manifest.json')

var ExamplePlugin = {
    name: manifest.plugin_name,
    description: manifest.plugin_description,

    /* This bit isn't right - the plugin will actually need to query the DB
    with the table name '`manifest.plugin_uid`_data'
    */
    api_key: manifest.data_fields.custom['api_key'],
    api_secret: manifest.data_fields.custom['api_key'],

    /* Implement the functions required by `plugin_base`:
    init, get_message_status, send_message, shutdown
    */

    init: function(){
    },

    shutdown: function(){
    },
    
    send_message: function (message) {
    }
}

var createExamplePlugin = function (api_key, api_secret) {
    let ex_plug = Object.assign(Object.create(voluble_plugin_base.voluble_plugin), ExamplePlugin)

    ex_plug.api_key = api_key
    ex_plug.api_secret = api_secret

    return ex_plug
}

module.exports = {createExamplePlugin};
<commit_msg>rename CreateExamplePlugin to CreatePlugin - this should be the universal entry point for loaded plugins<commit_after>var voluble_plugin_base = require('../plugin_base.js')
var manifest = require('./manifest.json')

var ExamplePlugin = {
    name: manifest.plugin_name,
    description: manifest.plugin_description,

    /* This bit isn't right - the plugin will actually need to query the DB
    with the table name '`manifest.plugin_uid`_data'
    */
    api_key: manifest.data_fields.custom['api_key'],
    api_secret: manifest.data_fields.custom['api_key'],

    /* Implement the functions required by `plugin_base`:
    init, get_message_status, send_message, shutdown
    */

    init: function(){
    },

    shutdown: function(){
    },
    
    send_message: function (message) {
    }
}

var createPlugin = function () {
    let ex_plug = Object.assign(Object.create(voluble_plugin_base.voluble_plugin), ExamplePlugin)

    return ex_plug
}

module.exports = {createPlugin};

{'fraction_non_alphanumeric': 0.10611419909044972, 'fraction_numerical': 0.0, 'mean_word_length': 3.782608695652174, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2999615', 'n_tokens_mistral': 605, 'n_tokens_neox': 580, 'n_words': 143}