semvec/pypi-packages huggingface dataset:
chatlogger-db 0.1.6
This is a simple Tree based database to store chats logs for a large language model. to save ollama or any other llm app chat history

# chatlogger

chatlogger is a simple Tree based database to store chats logs for a large language model. to save ollama or any other llm app chat history

Install Using
`pip install chatlogger-db`


DEMO
```python
from chatlogger-db import DataBase, Message, Chat, RESPONSE, PROMPT
if __name__ == '__main__':
    db = DataBase()
    # db.load(r"dataset.bin")
    # db.save(r"main.bin")
    # print(db)
    # chat = db[2]
    idx = db.new_chat()
    chat = db[idx]
    print(chat)
    chat.new_message("Hello", "World!")
    chat.regenerate_last("hey")
    chat.edit_last("ss", "you!")
    chat.edit_last("i", "you!")
    chat.new_message("Hello", "World!")
    chat.new_message("Hello", "World!")
    chat.edit_last("i", "you!")
    chat.prev_prompt_last()
    chat.regenerate_last("hey2")
    chat.next_prompt_last()
    chat.prev_prompt_last()
    chat.edit(3, "asd", "res")
    chat.regenerate(2, "res2")
    chat.modify(2, "ajasd")
    chat.regenerate(2, "res2")
    chat.prev(2)
    chat.prev(2)
    chat.prev(1)
    chat.set_next_idx(0, 2)
    print(repr(chat))
    print(chat.curr_neighbours(1))
    print(chat.__len__())
    print(chat[0])
    print(chat[1])
```
forensic-doctor 1.0.0
A forensic tool for recovering deleted files from disk images.

# Forensic Doctor 1.0.0

Forensic Doctor is a Python package designed for forensic analysis to recover deleted files from disk images, supporting a wide range of file types and sizes.

## Installation

To install Forensic Doctor, use pip:

```bash
pip install forensic-doctor
```

## Usage

### Command Line

#### Recover and save to a specified path

```bash
forensic-doctor --recover--path /path/to/disk_image.E01 /path/to/folder/
```

#### Recover and save to a mentioned folder

```bash
forensic-doctor --recover--path /path/to/disk_image.E01 /path/to/folder/ --output /path/to/folder1/
```

#### Recover a mentioned file only

```bash
forensic-doctor --recover--file /path/to/disk_image.E01 /path/to/folder/image.png
```

#### Recover a mentioned file and move it to the specified path

```bash
forensic-doctor --recover--file /path/to/disk_image.E01 /path/to/folder/image.png --output /path/to/output_file/
```

### Import as a Module

```python
from forensic_doctor import recover_files, recover_file

# Example 1: Recover all files in a directory within the disk image
recovered_files = recover_files("/path/to/disk_image.E01", "/path/to/output_dir")
if recovered_files:
    for file in recovered_files:
        print(f"Recovered: {file}")
else:
    print("No files recovered.")

# Example 2: Recover a specific file from the disk image
recovered_file = recover_file("/path/to/disk_image.E01", "/path/to/image.png", "/path/to/output_file")
if recovered_file:
    print(f"Recovered: {recovered_file}")
else:
    print("File not recovered.")

# Example 3: Recover files and handle errors
try:
    recovered_files = recover_files("/path/to/disk_image.E01", "/path/to/output_dir")
    for file in recovered_files:
        print(f"Recovered: {file}")
except Exception as e:
    print(f"Error occurred: {e}")

# Example 4: Recover specific file and check file existence
recovered_file = recover_file("/path/to/disk_image.E01", "/path/to/image.png", "/path/to/output_file")
if recovered_file:
    print(f"Recovered: {recovered_file}")
    if os.path.exists(recovered_file):
        print("File exists.")
    else:
        print("File recovered but not found.")
else:
    print("File not recovered.")

# Example 5: Handle large files recovery
large_file_path = "/path/to/large_file.iso"
output_directory = "/path/to/output_dir"
recovered_files = recover_files(large_file_path, output_directory)
if recovered_files:
    print(f"Recovered {len(recovered_files)} files.")
else:
    print("No files recovered.")
```

### Features

- Supports recovery of all file types: images, videos, documents, etc.
- Handles large and small files efficiently.
- Command-line interface for quick and easy usage.

### License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Thanks Note

Thank you for using Forensic Doctor! If you have any questions or need further assistance, feel free to reach out. Your feedback is valuable in improving this tool.