/sources/README.md

https://github.com/shivylp/radium · Markdown · 76 lines · 43 code · 33 blank · 0 comment · 0 complexity · f08f8a7752c786861e9a15179c866c2e MD5 · raw file

  1. # Sources
  2. ## 1. CheatSh
  3. `cheatsh.CheatSh` implements `radium.Source` using [cheat.sh](https://cheat.sh) as the source of information.
  4. ### Examples:
  5. ```bash
  6. radium query "append file in go"
  7. radium query "append file" -a language:go
  8. radium query "open socket in java" -a nocolor
  9. ```
  10. ### Attributes:
  11. * `nocolor` - Specifying this will force cheat.sh to send non-colored snippets (appends `?T` query param)
  12. * `language` - Programming language (recommended to use `append file in go` format instead of this tag)
  13. ## 2. Tldr
  14. `sources.TLDR` implements `radium.Source` using [tldr](https://github.com/tldr-pages/tldr).
  15. ### Examples:
  16. ```bash
  17. radium query "ls" --sources "tldr"
  18. radium query "dir" --sources "tldr" -a platform:windows
  19. ```
  20. ### Attributes:
  21. * `platform` - Specifying this will limit the lookup scope to platform specific directories in `tldr`
  22. ## 3. Wikipedia
  23. `wikipedia.Wikipedia` implements `radium.Source` using [Wikipedia](https://wikipedia.org).
  24. ### Examples:
  25. ```bash
  26. radium query "ls" --sources "wiki"
  27. radium query "hindi" --sources "wikipedia" -a language:hi
  28. ```
  29. ### Attributes:
  30. * `language` - Return results in specified language. (e.g., `-a language:hi` will look up in `https://hi.wikipedia.org/wiki`)
  31. ## 4. DuckDuckGo
  32. `duckduckgo.DuckDuckGo` implements `radium.Source` using [DuckDuckGo Instant Answers API](https://api.duckduckgo.com).
  33. ### Examples:
  34. ```bash
  35. radium query "apple inc" --sources "ddg"
  36. radium query "spacex" --sources "duckduckdgo"
  37. ```
  38. ## 5. LearnXInYMinutes
  39. `sources.LearnXInY` implements `radium.Source` using [learnxinyminutes](http://github.com/adambard/learnxinyminutes-docs).
  40. ### Examples:
  41. ```bash
  42. radium query "dart" --sources "lxy"
  43. ```