<commit_before>/**
 * @file
 *
 * @brief Source for directoryvalue plugin
 *
 * @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
 *
 */

#include "directoryvalue.hpp"
#include "log.hpp"

#include <kdbhelper.h>

using std::exception;
using std::range_error;

using elektra::DirectoryValueDelegate;

using ckdb::keyNew;
using ckdb::Plugin;

namespace
{

/**
 * @brief This function returns a key set containing the plugin contract.
 *
 * @return A key set specifying the capabilities of the plugin
 */
kdb::KeySet getContract ()
{
	return kdb::KeySet{ 30,
			    keyNew ("system/elektra/modules/directoryvalue", KEY_VALUE, "directoryvalue plugin waits for your orders",
				    KEY_END),
			    keyNew ("system/elektra/modules/directoryvalue/exports", KEY_END),
			    keyNew ("system/elektra/modules/directoryvalue/exports/open", KEY_FUNC, elektraDirectoryValueOpen, KEY_END),
			    keyNew ("system/elektra/modules/directoryvalue/exports/close", KEY_FUNC, elektraDirectoryValueClose, KEY_END),
			    keyNew ("system/elektra/modules/directoryvalue/exports/get", KEY_FUNC, elektraDirectoryValueGet, KEY_END),<commit_msg>Directory Value: Remove unused import<commit_after>/**
 * @file
 *
 * @brief Source for directoryvalue plugin
 *
 * @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
 *
 */

#include "directoryvalue.hpp"
#include "log.hpp"

using std::exception;
using std::range_error;

using elektra::DirectoryValueDelegate;

using ckdb::keyNew;
using ckdb::Plugin;

namespace
{

/**
 * @brief This function returns a key set containing the plugin contract.
 *
 * @return A key set specifying the capabilities of the plugin
 */
kdb::KeySet getContract ()
{
	return kdb::KeySet{ 30,
			    keyNew ("system/elektra/modules/directoryvalue", KEY_VALUE, "directoryvalue plugin waits for your orders",
				    KEY_END),
			    keyNew ("system/elektra/modules/directoryvalue/exports", KEY_END),
			    keyNew ("system/elektra/modules/directoryvalue/exports/open", KEY_FUNC, elektraDirectoryValueOpen, KEY_END),
			    keyNew ("system/elektra/modules/directoryvalue/exports/close", KEY_FUNC, elektraDirectoryValueClose, KEY_END),
			    keyNew ("system/elektra/modules/directoryvalue/exports/get", KEY_FUNC, elektraDirectoryValueGet, KEY_END),
{'fraction_non_alphanumeric': 0.11710526315789474, 'fraction_numerical': 0.0017543859649122807, 'mean_word_length': 4.804071246819339, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '4814743', 'n_tokens_mistral': 741, 'n_tokens_neox': 694, 'n_words': 171}