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 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. # remark-stringify
  2. [![Build][build-badge]][build]
  3. [![Coverage][coverage-badge]][coverage]
  4. [![Downloads][downloads-badge]][downloads]
  5. [![Size][size-badge]][size]
  6. [![Chat][chat-badge]][chat]
  7. [![Sponsors][sponsors-badge]][collective]
  8. [![Backers][backers-badge]][collective]
  9. [Compiler][] for [**unified**][unified].
  10. Serializes [**mdast**][mdast] syntax trees to Markdown.
  11. Used in the [**remark** processor][remark] but can be used on its own as well.
  12. Can be [extended][extend] to change how Markdown is serialized.
  13. ## Install
  14. [npm][]:
  15. ```sh
  16. npm install remark-stringify
  17. ```
  18. ## Use
  19. ```js
  20. var unified = require('unified')
  21. var createStream = require('unified-stream')
  22. var html = require('rehype-parse')
  23. var rehype2remark = require('rehype-remark')
  24. var stringify = require('remark-stringify')
  25. var processor = unified().use(html).use(rehype2remark).use(stringify, {
  26. bullet: '*',
  27. fence: '~',
  28. fences: true,
  29. incrementListMarker: false
  30. })
  31. process.stdin.pipe(createStream(processor)).pipe(process.stdout)
  32. ```
  33. [See **unified** for more examples »][unified]
  34. ## API
  35. [See **unified** for API docs »][unified]
  36. ### `processor().use(stringify[, options])`
  37. Configure the `processor` to serialize [**mdast**][mdast] syntax trees to
  38. Markdown.
  39. ###### `options`
  40. Options can be passed directly, or passed later through
  41. [`processor.data()`][data].
  42. All the formatting options of [`mdast-util-to-markdown`][to-markdown-options]
  43. are supported and will be passed through.
  44. ## Extending the compiler
  45. See [`mdast-util-to-markdown`][to-markdown].
  46. Then create a wrapper plugin such as [`remark-gfm`][remark-gfm].
  47. ## Security
  48. `remark-stringify` will do its best to serialize markdown to match the syntax
  49. tree, but there are several cases where that is impossible.
  50. It’ll do its best, but complete roundtripping is impossible given that any
  51. value could be injected into the tree.
  52. As Markdown is sometimes used for HTML, and improper use of HTML can open you up
  53. to a [cross-site scripting (XSS)][xss] attack, use of `remark-stringify` and
  54. parsing it again later can potentially be unsafe.
  55. When parsing Markdown afterwards, use remark in combination with the
  56. [**rehype**][rehype] ecosystem, and use [`rehype-sanitize`][sanitize] to make
  57. the tree safe.
  58. Use of remark plugins could also open you up to other attacks.
  59. Carefully assess each plugin and the risks involved in using them.
  60. ## Contribute
  61. See [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways
  62. to get started.
  63. See [`support.md`][support] for ways to get help.
  64. Ideas for new plugins and tools can be posted in [`remarkjs/ideas`][ideas].
  65. A curated list of awesome remark resources can be found in [**awesome
  66. remark**][awesome].
  67. This project has a [code of conduct][coc].
  68. By interacting with this repository, organization, or community you agree to
  69. abide by its terms.
  70. ## Sponsor
  71. Support this effort and give back by sponsoring on [OpenCollective][collective]!
  72. <!--lint ignore no-html-->
  73. <table>
  74. <tr valign="middle">
  75. <td width="20%" align="center" colspan="2">
  76. <a href="https://www.gatsbyjs.org">Gatsby</a> 🥇<br><br>
  77. <a href="https://www.gatsbyjs.org"><img src="https://avatars1.githubusercontent.com/u/12551863?s=256&v=4" width="128"></a>
  78. </td>
  79. <td width="20%" align="center" colspan="2">
  80. <a href="https://vercel.com">Vercel</a> 🥇<br><br>
  81. <a href="https://vercel.com"><img src="https://avatars1.githubusercontent.com/u/14985020?s=256&v=4" width="128"></a>
  82. </td>
  83. <td width="20%" align="center" colspan="2">
  84. <a href="https://www.netlify.com">Netlify</a><br><br>
  85. <!--OC has a sharper image-->
  86. <a href="https://www.netlify.com"><img src="https://images.opencollective.com/netlify/4087de2/logo/256.png" width="128"></a>
  87. </td>
  88. <td width="10%" align="center">
  89. <a href="https://www.holloway.com">Holloway</a><br><br>
  90. <a href="https://www.holloway.com"><img src="https://avatars1.githubusercontent.com/u/35904294?s=128&v=4" width="64"></a>
  91. </td>
  92. <td width="10%" align="center">
  93. <a href="https://themeisle.com">ThemeIsle</a><br><br>
  94. <a href="https://themeisle.com"><img src="https://avatars1.githubusercontent.com/u/58979018?s=128&v=4" width="64"></a>
  95. </td>
  96. <td width="10%" align="center">
  97. <a href="https://boosthub.io">Boost Hub</a><br><br>
  98. <a href="https://boosthub.io"><img src="https://images.opencollective.com/boosthub/6318083/logo/128.png" width="64"></a>
  99. </td>
  100. <td width="10%" align="center">
  101. <a href="https://expo.io">Expo</a><br><br>
  102. <a href="https://expo.io"><img src="https://avatars1.githubusercontent.com/u/12504344?s=128&v=4" width="64"></a>
  103. </td>
  104. </tr>
  105. <tr valign="middle">
  106. <td width="100%" align="center" colspan="10">
  107. <br>
  108. <a href="https://opencollective.com/unified"><strong>You?</strong></a>
  109. <br><br>
  110. </td>
  111. </tr>
  112. </table>
  113. ## License
  114. [MIT][license] © [Titus Wormer][author]
  115. <!-- Definitions -->
  116. [build-badge]: https://github.com/remarkjs/remark/workflows/main/badge.svg
  117. [build]: https://github.com/remarkjs/remark/actions
  118. [coverage-badge]: https://img.shields.io/codecov/c/github/remarkjs/remark.svg
  119. [coverage]: https://codecov.io/github/remarkjs/remark
  120. [downloads-badge]: https://img.shields.io/npm/dm/remark-stringify.svg
  121. [downloads]: https://www.npmjs.com/package/remark-stringify
  122. [size-badge]: https://img.shields.io/bundlephobia/minzip/remark-stringify.svg
  123. [size]: https://bundlephobia.com/result?p=remark-stringify
  124. [sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
  125. [backers-badge]: https://opencollective.com/unified/backers/badge.svg
  126. [collective]: https://opencollective.com/unified
  127. [chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
  128. [chat]: https://github.com/remarkjs/remark/discussions
  129. [health]: https://github.com/remarkjs/.github
  130. [contributing]: https://github.com/remarkjs/.github/blob/HEAD/contributing.md
  131. [support]: https://github.com/remarkjs/.github/blob/HEAD/support.md
  132. [coc]: https://github.com/remarkjs/.github/blob/HEAD/code-of-conduct.md
  133. [ideas]: https://github.com/remarkjs/ideas
  134. [awesome]: https://github.com/remarkjs/awesome-remark
  135. [license]: https://github.com/remarkjs/remark/blob/main/license
  136. [author]: https://wooorm.com
  137. [npm]: https://docs.npmjs.com/cli/install
  138. [unified]: https://github.com/unifiedjs/unified
  139. [data]: https://github.com/unifiedjs/unified#processordatakey-value
  140. [remark]: https://github.com/remarkjs/remark/tree/main/packages/remark
  141. [compiler]: https://github.com/unifiedjs/unified#processorcompiler
  142. [mdast]: https://github.com/syntax-tree/mdast
  143. [xss]: https://en.wikipedia.org/wiki/Cross-site_scripting
  144. [rehype]: https://github.com/rehypejs/rehype
  145. [sanitize]: https://github.com/rehypejs/rehype-sanitize
  146. [to-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown
  147. [to-markdown-options]: https://github.com/syntax-tree/mdast-util-to-markdown#formatting-options
  148. [extend]: #extending-the-compiler
  149. [remark-gfm]: https://github.com/remarkjs/remark-gfm