Skip to main content

Demeuk

Documentation Status Tests

Demeuk is a simple tool to clean up corpora (like dictionaries) or any dataset containing plain text strings. Example use cases are: cleaning up language dictionaries, password sets (like for example RockYou) or any file / stdin containing plain text strings.

In those corpora you'll find encoding mistakes that have been made, or you want to remove some parts of a line. Instead of creating a huge bash oneliner you can use demeuk to do all your cleaning.

Example usages:

  • Cutting
  • Length checking
  • Encoding fixing

Demeuk is written in Python3, this means of course that it is slower than for example cut. However, Demeuk is written multithreaded and thus can use all your cores. Besides this Demeuk can easily be extended to match your needs.

This application is part of the CERBERUS project that has received funding from the European Union's Internal Security Fund - Police under grant agreement No. 82201

Please read the docs for more information.

Quick start

Demeuk supports Python versions 3.12 and up. The recommended way to install demeuk is to use pipx.

pipx install demeuk --python /usr/bin/python3.14

Now you can invoke demeuk directly from the command-line from any directory:

demeuk --version
demeuk --help
demeuk -i rockyou.txt -o rockyou-demuked.txt --leak-full

Since demeuk version 5, the order of arguments is the order of which they are executed. Want to first split based on spaces and then do a length check?

demeuk -i inputfile -o outputfile --add-split --check-max-length 12

demeuk also supports masks as input:

demeuk -i inputdir/*.txt -o outputfile --check-max-length 12

Demeuk follows conventions of other text-processing shell tools: it can take input from stdin, and demeuk outputs its results to stdout, with logs being written to stderr.

    cat wordlist | demeuk --leak-full --debug > list.out 2> list.log

More information available in the docs: http://demeuk.rtfd.io/

Alternative install method

Alternatively you can install demeuk in a venv as usual, in which case the demeuk command becomes available while the venv is active.

virtualenv venv
source venv/bin/activate
pip install demeuk

Development

To make changes to demeuk, you need to install the source code:

git clone https://github.com/NetherlandsForensicInstitute/demeuk.git
cd demeuk
pdm install -p ./

Check the version:

demeuk -version

Usage:

demeuk --help

Running tests

pdm install -G test
pdm run test

Docs

The docs are available at: http://demeuk.rtfd.io/

To build the documentation locally with PDM:

pdm install -G docs
pdm run make -C docs html

The generated site is in docs/_build/html/. On Windows, run pdm run docs\make.bat html instead of make.

Metadata

Release files for demeuk 5.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for demeuk 5.0.1
File Size Uploaded Provenance Actions
demeuk-5.0.1.tar.gz 40.3 kB Without provenance Details for demeuk-5.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for demeuk 5.0.1
File Interpreter ABI Platform Actions
demeuk-5.0.1-py3-none-any.whl Python 3 none any Details for demeuk-5.0.1-py3-none-any.whl

Total release size: 84.4 kB

Release files / demeuk-5.0.1.tar.gz

Download URL demeuk-5.0.1.tar.gz
Size 40.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bb0c72c3cc0034c12ef17bc77bedabb9a6570bccc57d9ee8e2cdd658dd2b33f6
BLAKE2b-256 checksum
How to use checksums
9bfe67807eecf3d6983c4b1e997570bd561f948e5f721807200396be420dcdae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.29.7 CPython/3.15.2 Linux/7.0.0-1019-azure

Release files / demeuk-5.0.1-py3-none-any.whl

Download URL demeuk-5.0.1-py3-none-any.whl
Size 44.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1da29e0103915eff045229028273c8fb5e66410e27cbb96616431b17c2889df0
BLAKE2b-256 checksum
How to use checksums
2619b3b22757ae65faaa1fbffbc7751aaaffd42d6cc897656ac55919a1360267
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.29.7 CPython/3.15.2 Linux/7.0.0-1019-azure

Security for demeuk 5.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page