Skip to main content

A command-line tool to clean up corpora.

Project description

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:

Examples:

    demeuk -i inputfile.tmp -o outputfile.dict -l demeuk.log
    demeuk -i inputfile -o outputfile -j 24 -l demeuk.log
    demeuk -i inputfile.tmp -o outputfile.dict -l demeuk.log --leak
    demeuk -i inputfile -o outputfile -j all -l demeuk.log --leak-full
    demeuk -i inputdir/*.txt -o outputfile.dict -l demeuk.log

Demeuk also works with pipes:

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

Development

To make changes to demeuk, you need to run it from the source Python files.

git clone https://github.com/NetherlandsForensicInstitute/demeuk.git
cd demeuk
pipx install ./ --python /usr/bin/python3.14

Now you can run demeuk as in the examples. Note that the shortcut demeuk only updates after you run pipx upgrade demeuk.

You can install demeuk through PDM with pdm install -p ./, this circumvents this issue although you have to run demeuk with pdm run demeuk.

Docs

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

demeuk-5.0.0.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

demeuk-5.0.0-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

File details

Details for the file demeuk-5.0.0.tar.gz.

File metadata

  • Download URL: demeuk-5.0.0.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.28.0 CPython/3.14.6 Linux/6.17.0-1018-azure

File hashes

Hashes for demeuk-5.0.0.tar.gz
Algorithm Hash digest
SHA256 f389e4d1bb376c08350651aeacb54f8c412120a73341d7a4e0727f8ed37343d6
MD5 d13dd7587721a81e6dfadf33fe8c15a3
BLAKE2b-256 b798aa0e2aa88c13767fe45bb115136a3436a71d84cc88c303d64a1572fc27ac

See more details on using hashes here.

File details

Details for the file demeuk-5.0.0-py3-none-any.whl.

File metadata

  • Download URL: demeuk-5.0.0-py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.28.0 CPython/3.14.6 Linux/6.17.0-1018-azure

File hashes

Hashes for demeuk-5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3db6176966392960dc275ffce6b9a20d75e75a75cb089943dbead38c4ca5a8b8
MD5 168068f500be36d96db6fcbfbe3f1f0c
BLAKE2b-256 9080c06033f64da3da02a1e9cca37aca5d5cb6fb8ef415044bb0cd570cd132da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page