added README and LICENSE

This commit is contained in:
klein panic
2025-01-26 04:17:37 -05:00
parent 364926c8c5
commit 2e66965748
2 changed files with 107 additions and 0 deletions

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

86
README.md Normal file
View File

@@ -0,0 +1,86 @@
### README.md
# Vimwiki Markdown Utilities
A collection of Lua keybindings and shell scripts for enhancing the functionality of Vimwiki in Neovim. This project focuses on providing seamless workflows for previewing, converting, and managing Markdown files directly from Neovim.
---
## Features
1. **Markdown Preview**:
- Quickly preview your Vimwiki Markdown files using a simple keybinding.
- Leverages a custom shell script to index and render the wiki for better organization.
- Opens the preview directly in a browser.
2. **Convert Markdown to HTML**:
- Convert the current Markdown file to HTML and open it in Qutebrowser with one command.
- Automatically checks for file compatibility and script availability.
3. **Neovim Integration**:
- Preconfigured keybindings to streamline workflows.
- Error notifications for missing files or unsupported formats.
---
## Installation
1. **Clone the repository**:
```bash
git clone https://github.com/<your-username>/vimwiki-markdown-utilities.git
```
2. **Add to Neovim**:
- Include the `keybindings.lua` file in your Neovim configuration.
```lua
require('path-to-keybindings/keybindings')
```
- Alternatively, source it from your `init.lua`:
```lua
dofile('~/.config/nvim/keybindings.lua')
```
3. **Place the Shell Script**:
- Move `vimwiki-markdown-preview.sh` to `~/.config/nvim/scripts/` or update the path in `keybindings.lua`.
4. **Install Requirements**:
- Ensure you have `bash`, `qutebrowser`, and any additional dependencies needed by the shell script.
---
## Usage
### Keybindings:
- **Preview Markdown Wiki**:
- Press `<leader>mip` to render and index the Vimwiki Markdown files.
- **Convert and Open Markdown**:
- Press `<leader>mp` to convert the current Markdown file to HTML and open it in Qutebrowser.
### Script Options:
- The shell script supports:
- `--index-wiki`: Index and render the entire Vimwiki.
- `--convert <file>`: Convert a specific Markdown file to HTML.
---
## Troubleshooting
- **Script Not Found**: Ensure the path to `vimwiki-markdown-preview.sh` is correct in `keybindings.lua`.
- **Browser Not Opening**: Verify that Qutebrowser is installed and accessible from the terminal.
- **File Not Markdown**: The `Convert and Open` command only works for `.md` files.
---
## Contributions
Contributions are welcome! Feel free to submit issues or pull requests to improve functionality, add features, or fix bugs.
---
## License
This project is licensed under the MIT License. See the `LICENSE` file for more details.
---