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.markdown 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # archy
  2. Render nested hierarchies `npm ls` style with unicode pipes.
  3. [![browser support](http://ci.testling.com/substack/node-archy.png)](http://ci.testling.com/substack/node-archy)
  4. [![build status](https://secure.travis-ci.org/substack/node-archy.png)](http://travis-ci.org/substack/node-archy)
  5. # example
  6. ``` js
  7. var archy = require('archy');
  8. var s = archy({
  9. label : 'beep',
  10. nodes : [
  11. 'ity',
  12. {
  13. label : 'boop',
  14. nodes : [
  15. {
  16. label : 'o_O',
  17. nodes : [
  18. {
  19. label : 'oh',
  20. nodes : [ 'hello', 'puny' ]
  21. },
  22. 'human'
  23. ]
  24. },
  25. 'party\ntime!'
  26. ]
  27. }
  28. ]
  29. });
  30. console.log(s);
  31. ```
  32. output
  33. ```
  34. beep
  35. ├── ity
  36. └─┬ boop
  37. ├─┬ o_O
  38. │ ├─┬ oh
  39. │ │ ├── hello
  40. │ │ └── puny
  41. │ └── human
  42. └── party
  43. time!
  44. ```
  45. # methods
  46. var archy = require('archy')
  47. ## archy(obj, prefix='', opts={})
  48. Return a string representation of `obj` with unicode pipe characters like how
  49. `npm ls` looks.
  50. `obj` should be a tree of nested objects with `'label'` and `'nodes'` fields.
  51. `'label'` is a string of text to display at a node level and `'nodes'` is an
  52. array of the descendents of the current node.
  53. If a node is a string, that string will be used as the `'label'` and an empty
  54. array of `'nodes'` will be used.
  55. `prefix` gets prepended to all the lines and is used by the algorithm to
  56. recursively update.
  57. If `'label'` has newlines they will be indented at the present indentation level
  58. with the current prefix.
  59. To disable unicode results in favor of all-ansi output set `opts.unicode` to
  60. `false`.
  61. # install
  62. With [npm](http://npmjs.org) do:
  63. ```
  64. npm install archy
  65. ```
  66. # license
  67. MIT