Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.md 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # terminal-link [![Build Status](https://travis-ci.org/sindresorhus/terminal-link.svg?branch=master)](https://travis-ci.org/sindresorhus/terminal-link)
  2. > Create clickable links in the terminal
  3. <img src="screenshot.gif" width="301" height="148">
  4. ## Install
  5. ```
  6. $ npm install terminal-link
  7. ```
  8. ## Usage
  9. ```js
  10. const terminalLink = require('terminal-link');
  11. const link = terminalLink('My Website', 'https://sindresorhus.com');
  12. console.log(link);
  13. ```
  14. ## API
  15. ### terminalLink(text, url, options?)
  16. Create a link for use in stdout.
  17. [Supported terminals.](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda)
  18. For unsupported terminals, the link will be printed in parens after the text: `My website (https://sindresorhus.com)`.
  19. #### text
  20. Type: `string`
  21. Text to linkify.
  22. #### url
  23. Type: `string`
  24. URL to link to.
  25. #### options
  26. Type: `object`
  27. ##### fallback
  28. Type: `Function | boolean`
  29. Override the default fallback. The function receives the `text` and `url` as parameters and is expected to return a string.
  30. If set to `false`, the fallback will be disabled when a terminal is unsupported.
  31. ### terminalLink.isSupported
  32. Type: `boolean`
  33. Check whether the terminal's stdout supports links.
  34. Prefer just using the default fallback or the `fallback` option whenever possible.
  35. ### terminalLink.stderr(text, url, options?)
  36. Create a link for use in stdout.
  37. Same arguments as `terminalLink()`.
  38. ### terminalLink.stderr.isSupported
  39. Type: `boolean`
  40. Check whether the terminal's stderr supports links.
  41. Prefer just using the default fallback or the `fallback` option whenever possible.
  42. ## Related
  43. - [terminal-link-cli](https://github.com/sindresorhus/terminal-link-cli) - CLI for this module
  44. - [ink-link](https://github.com/sindresorhus/ink-link) - Link component for Ink
  45. - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right