Package: keycollator
┬┌─┌─┐┬┬┌─┐┌─┐┬┬┌─┐┌┬┐┌─┐┬─┐
├┴┐├┤└┬┘│││││├─┤│││├┬┘
┴┴└─┘┴└─┘└─┘┴─┘┴─┘┴┴┴└─┘┴└─Compares text in a file to reference/glossary/key-items/dictionary.[1][2]🧱 Built byDavid Rushfueled by ☕️ ℹ️infokeycollator #.#.# Pypi Project Description👇 Table of ContentsStructureFeaturesInstallationInstall fromPypiusing pip3DocumentationSupported File FormatsUsageImportkeycollatorinto Python ProjectsRequirementsCLITurn onverboseoutputApplyfuzzy matchingSet thekey fileSet thetext fileSpecify theoutput fileSetlimit resultsfor console andoutput fileSetupper bound limitTurn onlogging:Create alog fileExample OutputTodoProject Resource AcknowledgementsDeployment FeaturesReleasesPypi VersionsLicenseCitationAdditional Information🗂️ Structure.
│
├──assets
│└──images
│└──coverage.svg
│
├──docs
│├──cli.md
│└──index.md
│
├──src
│├──__init__.py
│├──cli.py
│├──keycollator.py
│├──test_keycollator.py
│├──extractonator.py
│├──requirements.txt
│└──data
│├──(placeholder)│└──(placeholder)│
├──tests
│└──test_keycollator
│├──__init__.py
│└──test_keycollator.py
│
├──COD_OF_CONDUCT.md
├──CONTRIBUTING.md
├──LICENSE
├──make-venv.sh
├──Makefile
├──pyproject.toml
├──README.README
├──README.rst
├──setup.cfg
└──setup.py🚀 FeaturesExtract text from file to dictionaryExtract keys from file to dictionaryFind matches of keys in text fileApply fuzzy matching🧰 Installation🖥️ Install fromPypiusing pip3📦https://pypi.org/project/keycollator/pip3installkeycollator📄 DocumentationOfficial documentation can be found here:https://github.com/davidprush/keycollator/tree/main/docs💪 Supported File FormatsTXT/CSV files (Mac/Linux/Win)Plans to add PDF and JSON📐 Usage🖥️ Importkeycollatorinto Python Projectsfrom keycollator.customlogger import CustomLogger as cl
from keycollator.proceduretimer import ProcedureTimer as pt

clobj = cl([message=str], [filemode='a'|'w'|'r'], [level='info'|'success'|'warning'|'error'],
        [filename=str], [dtformat='locale'|'standar'|'timeonly'|'compressed'|'long'|'micro'])
        **locale='%c', default='%d/%m/%Y %H:%M:%S',
        timeonly='%H:%M:%S', compressed='%d%m%Y%H%M%S',
        long='%A %B %d, %Y, [%I:%M:%S %p]', micro='%H:%M:%S:%f'

ptobj = pt([str])
        *where str is whatever message you want saved for the timer🖥️ Requirementsclick >= 8.0.2
datetime >= 4.7
fuzzywuzzy >= 0.18.0
halo >= 0.0.31
nltk >= 3.7
pytest >= 7.1.3
python-Levenshtein >= 0.12.2
termtables >= 0.2.4
joblib >= 1.2.0🖥️ CLIkeycollator uses theCLIto change default parameters and functionsUsage:keycollator.py[OPTIONS]COMMAND[ARGS]...==================================================================keycollatorisanappthatfindsoccurancesofkeysinatextfile==================================================================Options:-t,--text-filePATHPath/filenameofthetexttobesearchedforagainstitemsinthekeyfile-k,--key-filePATHPath/filenameofthekeyfilecontainingadictionary,keyitems,glossary,orreferencelistusedtosearchthetextfile-r,--result-filePATHPath/filenameoftheoutputfilethatwillcontaintheresults(CSVorTXT)--limit-resultTEXTLimitthenumberofresults--abreviate-result-itemsINTEGERLimitthetextlengthoftheresults(default=32)--fuzzy-match-ratioINTEGERRANGESettheleveloffuzzymatching(default=99)tovalidatematchesusingapproximations/editdistances,usesacceptanceratioswithintegervaluesfrom0to99,where99isnearlyidenticaland0isnotsimilar[0<=x<=99]--ubound-limitINTEGERRANGEIgnoresitemsfromtheresultswithmatchesgreaterthantheupperboundary(upper-limit);reduceeroneousmatches[1<=x<=99999]--lbound-limitINTEGERRANGEIgnoresitemsfromtheresultswithmatcheslessthanthelowerboundary(lower-limit);reduceeroneousmatches[0<=x<=99999]-v,--verboseTurnonverbose-l,--loggingTurnonlogging-L,--log-filePATHPath/filenametobeusedforthelogfile--helpShowthismessageandexit.🖥️ Turn onverboseoutputcurrently provides only one level for verbose, future versions will implement multiple levels (DEBUG, INFO, WARN, etc.)keycollator--verbose🖥️ Applyfuzzy matchingfuzzy matchinguses approximate matches (edit distances) whereby 0 is the least strict and accepts nearly anything as a match and more strictly 99 accepts only nearly identical matches; by default the app uses level 99 only if regular matching finds no matcheskeycollator--fuzzy-matching=[0-99]🖥️ Set thekey fileeach line of text represents a key which will be used to match with items in thetext filekeycollator--key-file="/path/to/key/file/keys.txt"🖥️ Set thetext filetext file whereby each line represents an item that will be compared with the items in thekeys filekeycollator--text-file="/path/to/key/file/text.txt"🖥️ Specify theoutput filecurrently uses CSV but will add additional file formats in future releases (PDF/JSON/DOCX)keycollator--output-file="/path/to/results/result.csv"🖥️ Setlimit resultsfor console andoutput fileLimit the number of resultskeycollator--limit-results=30🖥️ Setupper bound limitrejects items with matches over the integer value set, helps with eroneous matches when using fuzzy matchingkeycollator--ubound-limit🖥️ Turn onlogging:turn onloggingwhereby if nolog fileis supplied by user it will create one using the defaultlog.logkeycollator--set-logging🖥️ Create alog fileset the name of thelog fileto be used byloggingkeycollator--log-file="/path/to/log/file/log.log"Example Outputpython3src/keycollator.py--set-logging--limit-results=30✔Extractedtext.txtitems.[[0.16]seconds]✔Extractedkeys.txtitems.[[0.25]seconds]✔Matchedkeys.txtitemstotext.txtitems.[[76.45]seconds]✔results.csvComplete.[[76.52]seconds]╭─────┬───────────────┬───────╮
│No.│Key│Count│
├─────┼───────────────┼───────┤
│1│manage│73│
├─────┼───────────────┼───────┤
│2│develop│62│
├─────┼───────────────┼───────┤
│3│report│58│
├─────┼───────────────┼───────┤
│4│support│46│
├─────┼───────────────┼───────┤
│5│process│43│
├─────┼───────────────┼───────┤
│6│analysis│36│
├─────┼───────────────┼───────┤
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
├─────┼───────────────┼───────┤
│28│dashboards│11│
├─────┼───────────────┼───────┤
│29│sales│10│
├─────┼───────────────┼───────┤
│30│create│10│
╰─────┴───────────────┴───────╯
╭─────────────┬────────╮
│Statistic│Total│
├─────────────┼────────┤
│Keys│701│
├─────────────┼────────┤
│Text│695│
├─────────────┼────────┤
│Matches│1207│
├─────────────┼────────┤
│Comparisons│376855│
├─────────────┼────────┤
│Logs│0│
├─────────────┼────────┤
│Runtime│76.60│
╰─────────────┴────────╯🎯 Todo 📌❌Fixpylinterrors❌Refactorcodeandremoveredunancies❌Fixpylinterrors❌Addpropererrorhandling❌AddCHANGELOG.md❌CreatemethodtoKeyKrawlertoselectand_createmissingfiles_❌UpdateCODE_OF_CONDUCT.md❌UpdateCONTRIBUTING.md❌Github:issueandprtemplates❌WorkflowAutomation❌MakefileUsage❌Dockerfile❌@dependabotconfiguration❌ReleaseDrafter(release-drafter.yml)👔 Project Resource AcknowledgementsCreating a Python Packagejaviertejero💼 Deployment FeaturesFeatureNotesGithubissue and pr templatesWorkflowsAutomate your workflow from idea to productionMakefile-usageMakefile UsageDockerfileDocker Library: Python@dependabotConfiguring Dependabot version updatesRelease Drafterrelease-drafter.yml📈 ReleasesReleaseVersionStatusCurrent:0.0.5Working📦 Pypi VersionsVersionNotes0.0.1Initial prototype0.0.2Bug fixes0.0.4Fixed functions/methods0.0.5Fixed functions/methods🛡 LicenseThis project is licensed under the terms of theMITlicense. SeeLICENSEfor more details.📄 Citation@misc{keycollator,author={David Rush},title={Compares text in a file to reference/glossary/key-items/dictionary file.},year={2022},publisher={Rush Solutions, LLC},journal={GitHub repository},howpublished={\url{https://github.com/davidprush/keycollator}}}Additional InformationThe latest version of this document can be foundhere; if you are viewing it there (via HTTPS), you can download the Markdown/reStructuredText sourcehere.You can contact the author viae-mail.