{"id":22363560,"url":"https://github.com/david-palma/cli-note-manager","last_synced_at":"2025-03-26T15:18:47.315Z","repository":{"id":263003499,"uuid":"888979826","full_name":"david-palma/cli-note-manager","owner":"david-palma","description":"A lightweight and simple command-line tool for managing notes. Create, edit, view, list, and delete note files using your preferred editor. Works out of the box with minimal setup.","archived":false,"fork":false,"pushed_at":"2024-11-15T14:00:33.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T16:30:19.653Z","etag":null,"topics":["batch-script","cli","cli-notes","cli-tool","cli-utility","command-line-tool","lightweight","note-managment","productivity","productivity-tool","windows","windows-utility"],"latest_commit_sha":null,"homepage":"","language":"Batchfile","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/david-palma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-15T11:26:08.000Z","updated_at":"2024-12-30T23:29:06.000Z","dependencies_parsed_at":"2024-11-15T15:17:56.187Z","dependency_job_id":"84c5c372-1bf0-4646-8f69-210060578a73","html_url":"https://github.com/david-palma/cli-note-manager","commit_stats":null,"previous_names":["david-palma/cli-note-manager"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-palma%2Fcli-note-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-palma%2Fcli-note-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-palma%2Fcli-note-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-palma%2Fcli-note-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/david-palma","download_url":"https://codeload.github.com/david-palma/cli-note-manager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245678902,"owners_count":20654738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["batch-script","cli","cli-notes","cli-tool","cli-utility","command-line-tool","lightweight","note-managment","productivity","productivity-tool","windows","windows-utility"],"created_at":"2024-12-04T17:15:35.282Z","updated_at":"2025-03-26T15:18:47.294Z","avatar_url":"https://github.com/david-palma.png","language":"Batchfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLI Note Manager\n\nA lightweight and straightforward command-line tool for managing notes. Easily create, edit, view, list, and delete note files directly from the terminal. The script uses your preferred text editor and is simple to configure.\n\n## Features\n\n- **List Notes**: Display all notes in the configured directory, along with their size and last modification date.\n- **Create a Note**: Quickly create a new note using your preferred text editor.\n- **Edit an Existing Note**: Open and edit an existing note file.\n- **View Note Contents**: Display the contents of a specific note in the terminal.\n- **Delete a Note**: Delete a note file with confirmation.\n- **Help Command**: Display usage instructions.\n\n## Requirements\n\n- A Windows terminal (Command Prompt or compatible).\n- A text editor such as:\n  - [Micro](https://micro-editor.github.io/) (preferred if installed).\n  - Notepad (default fallback editor).\n\n## Setup Instructions\n\n### Step 1: Clone the Repository\n\nClone this repository to your local machine:\n\n```bash\ngit clone https://github.com/yourusername/CLI-note-manager.git\ncd CLI-note-manager\n```\n\n### Step 2: Configure the Script\n\n1. **Set the Notes Directory**:\n\n   - By default, the script stores notes in:\n     - `D:\\Documents\\.notes` if `D:\\` exists,\n     - `C:\\Documents\\.notes` otherwise.\n   - Ensure you have write permissions for the chosen directory. If it does not exist, it will be created automatically.\n\n2. **Configure the Text Editor**:\n\n   - The script uses the `EDITOR` variable to determine the preferred text editor.\n   - It automatically checks for `micro.exe`. If not found, it defaults to `notepad.exe`.\n\n   To use a different editor:\n\n   - Open the script and modify the `EDITOR` variable near the top:\n     ```bash\n     set \"EDITOR=path\\to\\your\\preferred\\editor.exe\"\n     ```\n   - Replace `path\\to\\your\\preferred\\editor.exe` with the full path to your editor.\n\n### Step 3: Add the Script to Your PATH\n\nTo make the script easily accessible from any terminal window, add it to your system's `PATH` environment variable:\n\n1. **Copy the script** to a directory already included in your `PATH`, or\n2. **Add the script's directory to your `PATH`** by running the following command in the terminal (replacing `C:\\path\\to\\script-directory` with the actual path to the directory containing the script):\n   ```bash\n   set PATH=%PATH%;C:\\path\\to\\script-directory\n   ```\n   Alternatively, you can permanently add the script directory to the `PATH` by updating your system's environment variables through the Control Panel.\n\n## Usage\n\nTo use the script, run the `note` command followed by an option and an optional filename.\n\n```text\nUsage: note [OPTION] [FILENAME]\n\nOptions:\n  -l, --list      List all note files (default if no option is provided).\n  -n, --new       Create a new note. If no filename is given, you will be prompted to enter one.\n  -e, --edit      Edit an existing note. If no filename is given, you will be prompted to enter one.\n  -d, --delete    Delete a note file. If no filename is given, you will be prompted to enter one.\n  -s, --show      Display the contents of a note. If no filename is given, you will be prompted to enter one.\n  -h, --help      Display help information.\n\nThe default editor is \"micro\".\nYou can change it by modifying the EDITOR variable in the script.\n```\n\n### Examples\n\nHere are some examples of how to use the script along with the expected outputs:\n\n1. **List Notes**\n\n   To list all the notes in your notes directory, use the `-l` or `--list` option:\n\n   ```text\n   note -l\n\n   List of files:\n   --------------\n   Last edit            Size    File\n   2024-11-15 10:20 AM  500 kB  mynote1.txt\n   2024-11-14 02:45 PM  1 MB    mynote2.txt\n   2024-11-10 09:30 AM  200 kB  mynote3.txt\n\n   Number of note files found: 3\n   ```\n\n   This will display all notes in the directory along with their last modified date and file size.\n\n2. **Create a New Note**\n\n   To create a new note, provide a filename (e.g., `mynote.txt`):\n\n   ```text\n   note -n mynote.txt\n   Enter the note content (type 'exit' to save and exit):\n   ```\n\n   The script will open the text editor for you to write the note. Once you are finished, save and close the editor. If you didn't provide a filename, it will prompt you for one.\n\n3. **Edit an Existing Note**\n\n   To edit a note, specify the filename of the note you want to edit:\n\n   ```text\n   note -e mynote.txt\n   ```\n\n   The script will open the text editor with the contents of `mynote.txt`. After making changes, save and close the editor.\n\n4. **Delete a Note**\n\n   To delete a note, specify the filename of the note you want to delete:\n\n   ```text\n   note -d mynote.txt\n   mynote.txt, Delete (Y/N)?\n   ```\n\n   The script will prompt for confirmation before deleting the file.\n   If you enter a filename and it doesn't exist, it will show an error like:\n\n   ```text\n   Error: File \"mynote.txt\" not found.\n   ```\n\n5. **Show the Contents of a Note**\n\n   To display the contents of a note, specify the filename:\n\n   ```text\n   note -s mynote.txt\n   --------------------------------------\n   This is the content of my note.\n   It has multiple lines of text.\n   --------------------------------------\n   ```\n\n   If you enter a filename and it doesn't exist, it will show an error like:\n\n   ```text\n   Error: File \"mynote.txt\" not found.\n   ```\n\n6. **Display Help**\n   To display the help message, use the `-h` or `--help option`:\n\n   ```\n   note -h\n   A very simple CLI-based note taking and note files manager application.\n\n   Usage: note [OPTION] [FILENAME]\n\n   Options:\n     -l, --list      List all note files (default if no option is provided).\n     -n, --new       Create a new note. If no filename is given, you will be prompted to enter one.\n     -e, --edit      Edit an existing note. If no filename is given, you will be prompted to enter one.\n     -d, --delete    Delete a note file. If no filename is given, you will be prompted to enter one.\n     -s, --show      Display the contents of a note. If no filename is given, you will be prompted to enter one.\n     -h, --help      Display help information.\n\n   The default editor is \"micro\".\n   You can change it by modifying the EDITOR variable in the script.\n   ```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-palma%2Fcli-note-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavid-palma%2Fcli-note-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-palma%2Fcli-note-manager/lists"}