{"id":25188592,"url":"https://github.com/kleinpanic/bash-markdown-previewer","last_synced_at":"2025-06-10T13:05:30.962Z","repository":{"id":274284988,"uuid":"922458647","full_name":"kleinpanic/bash-markdown-previewer","owner":"kleinpanic","description":"Supercharge your Vimwiki setup with intuitive keybindings and scripts for Markdown previews, HTML conversion, and seamless browser integration. Streamline your productivity directly from Neovim!","archived":false,"fork":false,"pushed_at":"2025-01-26T09:57:22.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T10:14:22.319Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"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/kleinpanic.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":"2025-01-26T09:11:00.000Z","updated_at":"2025-01-26T09:57:26.000Z","dependencies_parsed_at":"2025-01-26T10:22:11.173Z","dependency_job_id":"8ae533d5-c847-4cce-b76d-f18cebfce7c9","html_url":"https://github.com/kleinpanic/bash-markdown-previewer","commit_stats":null,"previous_names":["kleinpanic/bash-markdown-previewer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleinpanic%2Fbash-markdown-previewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleinpanic%2Fbash-markdown-previewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleinpanic%2Fbash-markdown-previewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleinpanic%2Fbash-markdown-previewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kleinpanic","download_url":"https://codeload.github.com/kleinpanic/bash-markdown-previewer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kleinpanic%2Fbash-markdown-previewer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259081015,"owners_count":22802400,"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":[],"created_at":"2025-02-09T20:29:14.764Z","updated_at":"2025-06-10T13:05:30.939Z","avatar_url":"https://github.com/kleinpanic.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vimwiki Markdown Utilities\n\nA powerful set of utilities for enhancing the Vimwiki experience in Neovim. This project combines Lua keybindings with a custom shell script to provide seamless Markdown preview, conversion to HTML, and browser integration. Designed for developers and note-takers who rely on Vimwiki and Markdown for their workflows.\n\n---\n\n## Features\n\n### 1. Markdown Preview\n- Preview your entire Vimwiki in Markdown format.\n- Automatically indexes and renders the wiki files.\n- Opens the preview in your default web browser.\n\n### 2. Convert Markdown to HTML\n- Convert the current Markdown file into an HTML document.\n- Moves the HTML file to a designated location and opens it in Qutebrowser.\n- Ensures compatibility by checking file existence and format.\n\n### 3. Neovim Integration\n- Custom Lua keybindings for quick access to preview and conversion features.\n- Built-in error handling to notify you of issues (e.g., missing files or unsupported formats).\n\n---\n\n## Installation\n\n### 1. Clone the Repository\n```bash\ngit clone https://github.com/kleinpanic/vimwiki-markdown-utilities.git\n```\n\n### 2. Configure Neovim\n- Include `keybindings.lua` in your Neovim configuration:\n  ```lua\n  require('path-to-keybindings/keybindings')\n  ```\n- Alternatively, source it directly in your `init.lua`:\n  ```lua\n  dofile('~/.config/nvim/keybindings.lua')\n  ```\n\n### 3. Place the Shell Script\n- Move `vimwiki-markdown-preview.sh` to your Neovim scripts directory:\n  ```bash\n  mkdir -p ~/.config/nvim/scripts/\n  cp vimwiki-markdown-preview.sh ~/.config/nvim/scripts/\n  ```\n- Ensure the path in `keybindings.lua` matches the script location.\n\n### 4. Install Dependencies\nMake sure the following are installed and accessible from your system:\n- `bash`\n- `pandoc` (for Markdown-to-HTML conversion)\n- `qutebrowser` (or modify the script for your preferred browser)\n- `sed`\n- `find`\n- `rsync`\n- `grep`\n- `mkdir`\n- `basenme`\n- `diff`\n\n---\n\n## Usage\n\n### Keybindings:\n\n#### Preview Markdown Wiki\n- **Keybinding**: `\u003cleader\u003emip`\n- **Description**: Renders and indexes your Vimwiki Markdown files, then opens them in a web browser.\n\n#### Convert and Open Markdown\n- **Keybinding**: `\u003cleader\u003emp`\n- **Description**: Converts the current Markdown file to HTML and opens it in Qutebrowser.\n\n### Script Functionality\n\nThe `vimwiki-markdown-preview.sh` script performs the following:\n\n#### `--index-wiki`\n- Generates an index of your Vimwiki files.\n- Prepares a single HTML file for all wikis in your configuration.\n\n#### `--convert \u003cfile\u003e`\n- Converts a specified Markdown file to HTML using `pandoc`.\n- Moves the resulting HTML file to `~/.config/nvim/scripts/vimwiki_html/`.\n- Opens the HTML file in Qutebrowser.\n\n#### Example Usage:\n```bash\nbash vimwiki-markdown-preview.sh --index-wiki\nbash vimwiki-markdown-preview.sh --convert ~/vimwiki/notes.md\n```\n\n---\n\n## Troubleshooting\n\n1. **Script Not Found**:\n   - Ensure the `vimwiki-markdown-preview.sh` path in `keybindings.lua` matches its actual location.\n\n2. **File Not Markdown**:\n   - The \"Convert and Open\" command only works for `.md` files. Check the file format before running the command.\n\n3. **Browser Not Opening**:\n   - Verify that `qutebrowser` is installed and accessible. Alternatively, modify the script to use a different browser.\n\n4. **Missing Dependencies**:\n   - Install `pandoc` if HTML conversion fails:\n     ```bash\n     sudo apt install pandoc\n     ```\n\n---\n\n## Contribution\n\nContributions are welcome! If you find bugs, want to suggest features, or improve the code, feel free to open an issue or submit a pull request.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkleinpanic%2Fbash-markdown-previewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkleinpanic%2Fbash-markdown-previewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkleinpanic%2Fbash-markdown-previewer/lists"}