Skip to content

A Python query tool using regex to identify and store user specified file patterns.

Notifications You must be signed in to change notification settings

CSynodinos/query-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Regex Query Tool

A Python query tool using regex to identify and store user specified file patterns.

Authors

CSynodinos

Description

This tool is capable of identifying user specified patterns in text and spreadsheet files. The file types that are currently supported are:

  • .txt
  • .ini
  • .fasta
  • .csv
  • .tsv

Example

    >>> query.py -f ["your_file"] -p ["your_pattern"]

    To see all the options available:
    >>> query.py -h

Installation

    >>> curl https://raw.githubusercontent.com/CSynodinos/query-tool

Database integration

All patterns identified can be stored into a .json file regardless of the input file type, by using the -json argument.The json file gets the same name as the input file. If the -json option is used, the database options become functional. By using the -db option, the -json file will be saved in an sqlite3 type database that will be automatically generated. If the -pg option is used with the -db option, the database is instead a postgres 4 database.

Currently, only sqlite3 and postgres 4 are supported. Appending the patterns to an existing database of the same type is not supported at the current version of the tool. The aim for next version of the tool is to support such features.

About

A Python query tool using regex to identify and store user specified file patterns.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages