Skip to main content

A CLI tool for discovering similar notes within your note collection.

Project description

SimiNotes - CLI Tool for Similar Note Retrieval

SimiNotes is a command-line interface (CLI) tool written in Python that enables users to discover similar notes within their notes collection. The tool utilizes sentence embeddings with sbert to compare a given query against a corpus of user notes.

Features

  • Embedding: Utilizes sbert to generate vector embeddings for notes.
  • Similarity Search: Finds notes similar to a given query based on embeddings.
  • Configurable: Allows users to configure directories, file extensions, and exclusion criteria.

Installation

Before using this CLI tool, ensure that you have Python and pip installed. Additionally, install the PyTorch library by following the steps below:

  1. Download and install Python and pip from the official site.

  2. Install the PyTorch library separately based on your requirements. For the CPU version, use the following command:

    pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
    

Now, install the SimiNotes CLI tool:

pip install siminotes

Configuration

Before using the CLI, configure some essential values, such as the notes directory and exclusions. SimiNotes uses a configuration file (config.txt) to set preferences. Configure the tool by creating the file in the appropriate configuration directory.

Configuration Directory

  • Linux:
~/.config/siminotesconfig/
  • macOS:
~/.siminotesconfig/
  • Windows:

For Windows, use AppData\Roaming for per-user configuration:

AppData\Roaming\Siminotes\

Alternatively, place config.txt in the home directory:

~/.siminotesconfig/

Configuration File (config.txt)

Create a config.txt file in the configuration directory. Below is an example configuration:

notes_dir = /path/to/your/notes
exclude_dir = directory1,directory2
exclude_file = file1,file2
note_extension = .md

Configuration Parameters:

  • notes_dir: Path to the directory containing your notes.

  • exclude_dir: Comma-separated directories to exclude from the search. Paths should be relative to notes_dir.

  • exclude_file: Comma-separated files to exclude from the search. Paths should be relative to notes_dir.

  • note_extension: The extension of your note files (e.g., .md).

Usage

Now let's use our cli,

Command-Line Arguments

  • Query via Text:
siminotes text "Your Query Text"
  • Query via File:
siminotes file filename

Both will result in,

Top files which are similar to given query:
Value range from -1 to 1, where going toward 1 means note is close to query

/... with score 0.43386968970298767

/... with score 0.42138463258743286

...

Troubleshooting

If you encounter any errors or problems with this tool, please open an issue in the repository.

License

This project is licensed under the MIT License.

Contributing

Feel free to contribute to SimiNotes by creating issues or submitting pull requests.

Acknowledgments

Sentence-BERT for sentence embeddings.

Future:

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

siminotes-0.1.1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

siminotes-0.1.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file siminotes-0.1.1.tar.gz.

File metadata

  • Download URL: siminotes-0.1.1.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for siminotes-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3964b23bf4b3ddaf4f0c8335382434544bf75438a1072a74107098b8cfc3d961
MD5 3279102dad27a0df08539a240447373a
BLAKE2b-256 e0dbf1e844c198a13a2d8e877e5efb33ea93bf76d8f8b74b70cb2989fe17e5fb

See more details on using hashes here.

File details

Details for the file siminotes-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: siminotes-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for siminotes-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb057a3c8e8ce2decf9638d00d8db9af2d2f31d501200516b05df2863d3fe6f9
MD5 338f402fa47b7eef4b2495dd9604aec8
BLAKE2b-256 d3ddfb1c22598a1c95dbe51bd2472eca43e9dd4bd46ea4494b82a52fa4e45f65

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