Skip to content

Commit

Permalink
#8 Adds documentation regarding usage of ListDisplayFilter, ObjectDis…
Browse files Browse the repository at this point in the history
…playFilter, SQLDisplayFilter
  • Loading branch information
bytebutcher committed Jul 7, 2023
1 parent 340ee5c commit 9829711
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
</div>
<br>

A Wireshark-like display filter various data formats, including Python dictionaries, lists, objects, and SQL databases.
**Python Display Filter Query Language (PyDFQL)** offers an intuitive and powerful query language,
similar to Wireshark's display filter, for working with various data structures and formats,
including Python dictionaries, lists, objects, and SQL databases.

## Table of Contents
1. [Quick Start](#quick-start)
Expand Down Expand Up @@ -61,7 +63,7 @@ actors = [
df = ObjectDisplayFilter(actors)
```

Note, that ```pydfql``` supports various other data sources like
Note, that PyDFQL supports various other data sources like
<a href="https://github.com/bytebutcher/pydfql/blob/main/docs/USER_GUIDE.md#32-dictdisplayfilter">Python dictionaries</a>,
<a href="https://github.com/bytebutcher/pydfql/blob/main/docs/USER_GUIDE.md#33-listdisplayfilter">lists</a> and
<a href="https://github.com/bytebutcher/pydfql/blob/main/docs/USER_GUIDE.md#34-sqldisplayfilter">SQL databases</a>.
Expand Down Expand Up @@ -108,9 +110,11 @@ For a detailed description of the individual features check out the

## Examples

For detailed examples of how the display filter can be utilized, please refer to the following:
PyDFQL can be applied in many contexts due to its flexible design.
It is well-suited for working with various data formats and can be easily integrated into your data analysis
workflow. Here are some examples where PyDFQL can be particularly useful:

* [CSV Display Filter](https://github.com/bytebutcher/pydfql/blob/main/docs/USER_GUIDE.md#51-csv-display-filter)
* [CSV Display Filter](https://github.com/bytebutcher/pydfql/blob/main/docs/USER_GUIDE.md#51-csv-display-filter)
* [JSON Display Filter](https://github.com/bytebutcher/pydfql/blob/main/docs/USER_GUIDE.md#52-json-display-filter)
* [Nmap Display Filter](https://github.com/bytebutcher/pydfql/blob/main/docs/USER_GUIDE.md#53-nmap-display-filter)
* [SQLite Display Filter](https://github.com/bytebutcher/pydfql/blob/main/docs/USER_GUIDE.md#54-sqlite-display-filter)
Expand Down
34 changes: 19 additions & 15 deletions docs/USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@

## 1. Introduction

The Python Display Filter Query Language allows filtering data using a Wireshark-like
query language. It provides a flexible and efficient way to extract specific information from various data
formats, including dictionaries, objects, lists, and SQL databases.
**Python Display Filter Query Language (PyDFQL)** offers an intuitive and powerful query language,
similar to Wireshark's display filter, for working with various data structures and formats, including Python
dictionaries, lists, objects, and SQL databases.

In this user guide, we will explore the installation process, provide an overview of how to work with various data
formats, give a detailed explanation of the query language, and provide practical examples to demonstrate real-world
usage.
This user guide is designed to take you on a comprehensive journey of PyDFQL, starting from the installation process,
and then diving into its application across diverse data formats. It will provide you with a detailed explanation of
the query language syntax, and demonstrate its power and flexibility through a series of practical examples.

By the end of this guide, you will have a comprehensive understanding of the
Python Display Filter Query Language and be equipped to effectively filter and extract the data you need
from diverse sources.
By the end of this guide, you will gain an in-depth understanding of PyDFQL. You will be equipped with the skills
necessary to effectively filter, analyse, and extract valuable insights from complex and varied data sources,
enhancing your data manipulation and analysis workflows.

## 2. Installation

To install ```pydfql``, you can use the pip package manager.
To install PyDFQL, you can use the pip package manager.
Open your terminal or command prompt and run the following command:
```commandline
pip3 install pydfql
Expand Down Expand Up @@ -409,11 +409,12 @@ The display filter language has a number of functions to convert fields:
## 5. Examples

In this section, we will walk through various examples to demonstrate the practical usage of the
```pydfql```.
PyDFQL.

### 5.1 CSV Display Filter

This example shows how to use the display filter to query CSV-files:
Use PyDFQL to filter and manipulate data in CSV files. You can apply complex filtering rules that go beyond the typical
capabilities of most CSV parsers:
```commandline
python3 examples/csv_display_filter.py data/example.csv
# Enter ?help for a list of commands.
Expand Down Expand Up @@ -441,7 +442,8 @@ See <a href="https://github.com/bytebutcher/pydfql/raw/main/examples/csv_display

### 5.2 JSON Display Filter

This example shows how to use the display filter to query JSON files:
JSON data can be deeply nested and complex to work with.
PyDFQL allows you to filter and extract relevant information from such structures easily:
```commandline
python3 examples/json_display_filter.py data/example.json
# Enter ?help for a list of commands.
Expand All @@ -465,7 +467,8 @@ See <a href="https://github.com/bytebutcher/pydfql/raw/main/examples/json_displa

### 5.3 Nmap Display Filter

This example shows how to use a display filter to query Nmap XML files:
If you are dealing with network analysis and use tools like Nmap, PyDFQL can help filter and analyse the scan
results:
```commandline
python3 examples/nmap_display_filter.py data/nmap_example.xml
# Enter ?help for a list of commands.
Expand Down Expand Up @@ -507,7 +510,8 @@ See <a href="https://github.com/bytebutcher/pydfql/raw/main/examples/nmap_displa

### 5.4 SQLite Display Filter

This example shows how to use the display filter to query a SQLite database:
For SQLite databases, PyDFQL can be used as an advanced filter mechanism.
This is especially useful for data exploration, allowing you to filter records without writing complex SQL queries:
```commandline
python3 examples/sqlite_display_filter.py data/example.sqlite
# Enter ?help for a list of commands.
Expand Down

0 comments on commit 9829711

Please sign in to comment.