{"id":18434335,"url":"https://github.com/elementbound/mdview","last_synced_at":"2025-04-14T08:22:57.524Z","repository":{"id":35149600,"uuid":"213070330","full_name":"elementbound/mdview","owner":"elementbound","description":"View markdown files from your terminal!","archived":false,"fork":false,"pushed_at":"2024-03-28T22:14:40.000Z","size":991,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T10:14:32.921Z","etag":null,"topics":["cli","cli-app","express","express-js","expressjs","markdown","markdown-viewer","node","node-js","nodejs","nodejs-server","terminal"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elementbound.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-10-05T20:57:19.000Z","updated_at":"2023-03-18T18:44:12.000Z","dependencies_parsed_at":"2024-01-15T21:19:30.407Z","dependency_job_id":"425efa4e-1d43-45ed-bcc0-d092035f243e","html_url":"https://github.com/elementbound/mdview","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"234bc27ce772e694751231c92fa8cff952d93921"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementbound%2Fmdview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementbound%2Fmdview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementbound%2Fmdview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementbound%2Fmdview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elementbound","download_url":"https://codeload.github.com/elementbound/mdview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248844225,"owners_count":21170534,"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":["cli","cli-app","express","express-js","expressjs","markdown","markdown-viewer","node","node-js","nodejs","nodejs-server","terminal"],"created_at":"2024-11-06T06:03:11.410Z","updated_at":"2025-04-14T08:22:57.474Z","avatar_url":"https://github.com/elementbound.png","language":"JavaScript","readme":"# mdview #\n\nView Markdown files in your terminal!\n\n![mdview](assets/mdview.gif)\n\n## Features ##\n\n* Open Markdown files in your terminal\n* Follow links between the files\n* Unknown files are presented as-is\n* Render images as ASCII grayscales\n* Configure via environment variables\n\n## Requirements ##\n\n* [node.js](https://nodejs.org/en/download/)\n* A text-mode browser, such as:\n  * [lynx](https://lynx.browser.org/)\n  * [w3m](http://w3m.sourceforge.net/)\n  * [links2](http://manpages.ubuntu.com/manpages/disco/en/man1/links2.1.html)\n  * [elinks](http://elinks.or.cz/)\n* [imagemagick](https://imagemagick.org/)\n  * Only needed for image rendering, can be turned off. See [configuration](.env.defaults)\n\n## Install ##\n\nInstall `lynx` and `imagemagick` with your package manager of choice. For example: \n\n```sh\nsudo apt install lynx imagemagick\n```\n\nInstall `mdview` using `npm`:\n\n```sh\nnpm install -g @elementbound/mdview\n```\n\n## Usage ##\n\nOpen any markdown file with `mdview`:\n\n```sh\nmdview README.md\n```\n\n## Documentation ##\n\nThis package provides two components - `mdview` and `mdserve`.\n\n`mdserve` is a HTTP server that renders markdown documents as HTML. It includes image conversion logic as well, so images show up in some way. \n\n`mdview` launches `mdserve` when needed, and opens the given document in the configured browser ( default is `lynx` ).\n\n### Command line flags ###\n\n| Flag | Description                     |\n| ---- | ------------------------------- |\n| `-q` | Don't output anything to STDOUT |\n\n### Endpoints ###\n\n| URL              | Description                          |\n| ---------------- | ------------------------------------ |\n| `/render/{path}` | Render the file under `path` as HTML |\n| `/ping`          | Returns `pong` if the server is up   |\n| `/pid`           | Returns the server's process ID      |\n\n\u003e NOTE: The server only accepts requests from the local machine.\n\n### Tips and tricks ###\n\n#### Periodically refreshing file ###\n\nYou can combine `mdview`'s *quiet* flag, your browser's *dump* flag, and the `watch` command:\n\n```sh\nwatch -n 0.5 'MDVIEW_BROWSER=\"lynx -dump\" mdview -q /path/to/file'\n```\n\nIf you have a version of `watch` that supports it, you can use `elinks` for colored output:\n\n```sh\nwatch -n 0.5 --color 'MDVIEW_BROWSER=\"elinks -dump -dump-color-mode 1\" mdview -q /path/to/file'\n```\n\nHere it is in action:\n\n![Periodical refreshing](assets/mdview-refresh.gif)\n\n## Configuration ##\n\nThe server can be configured via environment variables. Which also means that you can plop your variables in your `.bashrc` or similar.\n\nFor reference, see [`.env.defaults`](.env.defaults)\n\n## Issues ##\n\nIf you have any issues or feedback, please feel free to let me know by opening an [issue on Github](https://github.com/elementbound/mdview/issues).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felementbound%2Fmdview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felementbound%2Fmdview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felementbound%2Fmdview/lists"}