x2c 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (359) hide show
  1. data/README +103 -0
  2. data/x2c/config.rb +59 -0
  3. data/x2c/core/args.rb +36 -0
  4. data/x2c/core/client.rb +61 -0
  5. data/x2c/core/collection.rb +136 -0
  6. data/x2c/core/configure.rb +43 -0
  7. data/x2c/core/meta.rb +77 -0
  8. data/x2c/core/prompt.rb +59 -0
  9. data/x2c/core/resulteval.rb +133 -0
  10. data/x2c/doc.rb +243 -0
  11. data/x2c/doc/Array/cdesc-Array.yaml +21 -0
  12. data/x2c/doc/Array/format-i.yaml +10 -0
  13. data/x2c/doc/Array/inspect-i.yaml +10 -0
  14. data/x2c/doc/Array/to_s-i.yaml +10 -0
  15. data/x2c/doc/Fixnum/cdesc-Fixnum.yaml +20 -0
  16. data/x2c/doc/Fixnum/hour-i.yaml +12 -0
  17. data/x2c/doc/Fixnum/min-i.yaml +12 -0
  18. data/x2c/doc/Fixnum/sec-i.yaml +12 -0
  19. data/x2c/doc/Hash/cdesc-Hash.yaml +21 -0
  20. data/x2c/doc/Hash/format-i.yaml +10 -0
  21. data/x2c/doc/Hash/inspect-i.yaml +10 -0
  22. data/x2c/doc/Hash/to_s-i.yaml +10 -0
  23. data/x2c/doc/Help/cdesc-Help.yaml +30 -0
  24. data/x2c/doc/Help/help-c.yaml +10 -0
  25. data/x2c/doc/Help/help_hacks-c.yaml +10 -0
  26. data/x2c/doc/Help/ignore-c.yaml +10 -0
  27. data/x2c/doc/Help/irb_help-c.yaml +10 -0
  28. data/x2c/doc/Help/match%3f-c.yaml +10 -0
  29. data/x2c/doc/Help/trace_help-c.yaml +10 -0
  30. data/x2c/doc/IRB/ExtendCommandBundle/cdesc-ExtendCommandBundle.yaml +15 -0
  31. data/x2c/doc/IRB/Prompt/%5b%5d-i.yaml +10 -0
  32. data/x2c/doc/IRB/Prompt/cdesc-Prompt.yaml +36 -0
  33. data/x2c/doc/IRB/Prompt/config-i.yaml +10 -0
  34. data/x2c/doc/IRB/Prompt/main%3d-i.yaml +12 -0
  35. data/x2c/doc/IRB/Prompt/new-c.yaml +10 -0
  36. data/x2c/doc/IRB/Prompt/pop-i.yaml +10 -0
  37. data/x2c/doc/IRB/Prompt/push-i.yaml +10 -0
  38. data/x2c/doc/IRB/Prompt/set-i.yaml +11 -0
  39. data/x2c/doc/IRB/Prompt/start-i.yaml +10 -0
  40. data/x2c/doc/IRB/cdesc-IRB.yaml +15 -0
  41. data/x2c/doc/Kernel/cdesc-Kernel.yaml +16 -0
  42. data/x2c/doc/Kernel/xmms-i.yaml +12 -0
  43. data/x2c/doc/NilClass/cdesc-NilClass.yaml +16 -0
  44. data/x2c/doc/NilClass/inspect-i.yaml +10 -0
  45. data/x2c/doc/Object/cdesc-Object.yaml +18 -0
  46. data/x2c/doc/Object/format-i.yaml +10 -0
  47. data/x2c/doc/Object/to_d-i.yaml +12 -0
  48. data/x2c/doc/Prompting/activate-i.yaml +12 -0
  49. data/x2c/doc/Prompting/back-i.yaml +12 -0
  50. data/x2c/doc/Prompting/cdesc-Prompting.yaml +45 -0
  51. data/x2c/doc/Prompting/gointo-i.yaml +12 -0
  52. data/x2c/doc/Prompting/inspect-i.yaml +12 -0
  53. data/x2c/doc/Prompting/intersect-i.yaml +12 -0
  54. data/x2c/doc/Prompting/last%3d-i.yaml +12 -0
  55. data/x2c/doc/Prompting/last-i.yaml +12 -0
  56. data/x2c/doc/Prompting/lost-i.yaml +12 -0
  57. data/x2c/doc/Prompting/makelast-i.yaml +12 -0
  58. data/x2c/doc/Prompting/pop-i.yaml +12 -0
  59. data/x2c/doc/Prompting/push-i.yaml +12 -0
  60. data/x2c/doc/Prompting/stack-i.yaml +12 -0
  61. data/x2c/doc/Prompting/to_s-i.yaml +12 -0
  62. data/x2c/doc/Prompting/union-i.yaml +12 -0
  63. data/x2c/doc/String/cdesc-String.yaml +18 -0
  64. data/x2c/doc/String/format-i.yaml +10 -0
  65. data/x2c/doc/String/inspect-i.yaml +10 -0
  66. data/x2c/doc/Xmms/Browse/%5b%5d-i.yaml +12 -0
  67. data/x2c/doc/Xmms/Browse/cd-i.yaml +17 -0
  68. data/x2c/doc/Xmms/Browse/cdesc-Browse.yaml +34 -0
  69. data/x2c/doc/Xmms/Browse/dirs-i.yaml +12 -0
  70. data/x2c/doc/Xmms/Browse/files-i.yaml +12 -0
  71. data/x2c/doc/Xmms/Browse/format-i.yaml +10 -0
  72. data/x2c/doc/Xmms/Browse/get-i.yaml +12 -0
  73. data/x2c/doc/Xmms/Browse/list-i.yaml +12 -0
  74. data/x2c/doc/Xmms/Browse/mlib_add-i.yaml +12 -0
  75. data/x2c/doc/Xmms/Browse/open-i.yaml +12 -0
  76. data/x2c/doc/Xmms/Client/Chains/cdesc-Chains.yaml +39 -0
  77. data/x2c/doc/Xmms/Client/Chains/info-i.yaml +12 -0
  78. data/x2c/doc/Xmms/Client/Chains/remove-i.yaml +12 -0
  79. data/x2c/doc/Xmms/Client/Chains/song-i.yaml +12 -0
  80. data/x2c/doc/Xmms/Client/Config/cdesc-Config.yaml +18 -0
  81. data/x2c/doc/Xmms/Client/Config/config-i.yaml +18 -0
  82. data/x2c/doc/Xmms/Client/Daemon/cdesc-Daemon.yaml +27 -0
  83. data/x2c/doc/Xmms/Client/Daemon/connect-i.yaml +10 -0
  84. data/x2c/doc/Xmms/Client/Daemon/dead_daemon-i.yaml +12 -0
  85. data/x2c/doc/Xmms/Client/Daemon/post_daemon-i.yaml +12 -0
  86. data/x2c/doc/Xmms/Client/Daemon/pre_daemon-i.yaml +12 -0
  87. data/x2c/doc/Xmms/Client/Daemon/start_daemon-i.yaml +12 -0
  88. data/x2c/doc/Xmms/Client/IPlayback/cdesc-IPlayback.yaml +22 -0
  89. data/x2c/doc/Xmms/Client/IPlayback/pause-i.yaml +12 -0
  90. data/x2c/doc/Xmms/Client/IPlayback/play-i.yaml +12 -0
  91. data/x2c/doc/Xmms/Client/IPlayback/skip-i.yaml +12 -0
  92. data/x2c/doc/Xmms/Client/ListNames/cdesc-ListNames.yaml +20 -0
  93. data/x2c/doc/Xmms/Client/ListNames/setup_list-i.yaml +12 -0
  94. data/x2c/doc/Xmms/Client/ListNames/setup_lists-i.yaml +12 -0
  95. data/x2c/doc/Xmms/Client/Mlib/browse-i.yaml +14 -0
  96. data/x2c/doc/Xmms/Client/Mlib/cdesc-Mlib.yaml +20 -0
  97. data/x2c/doc/Xmms/Client/Mlib/rehash-i.yaml +12 -0
  98. data/x2c/doc/Xmms/Client/Remember/cdesc-Remember.yaml +25 -0
  99. data/x2c/doc/Xmms/Client/Remember/gointo-i.yaml +12 -0
  100. data/x2c/doc/Xmms/Client/Remember/inspect-i.yaml +10 -0
  101. data/x2c/doc/Xmms/Client/Remember/push-i.yaml +12 -0
  102. data/x2c/doc/Xmms/Client/Remember/to_s-i.yaml +10 -0
  103. data/x2c/doc/Xmms/Client/Search/cdesc-Search.yaml +17 -0
  104. data/x2c/doc/Xmms/Client/Shortcut/cdesc-Shortcut.yaml +22 -0
  105. data/x2c/doc/Xmms/Client/Shortcut/now-i.yaml +12 -0
  106. data/x2c/doc/Xmms/Client/Shortcut/seek-i.yaml +12 -0
  107. data/x2c/doc/Xmms/Client/Shortcut/volume-i.yaml +14 -0
  108. data/x2c/doc/Xmms/Client/Vote/cdesc-Vote.yaml +24 -0
  109. data/x2c/doc/Xmms/Client/Vote/rating-i.yaml +12 -0
  110. data/x2c/doc/Xmms/Client/Vote/remove_rating%21-i.yaml +12 -0
  111. data/x2c/doc/Xmms/Client/Vote/undo_voting-i.yaml +12 -0
  112. data/x2c/doc/Xmms/Client/Vote/vote-i.yaml +12 -0
  113. data/x2c/doc/Xmms/Client/__connect-i.yaml +12 -0
  114. data/x2c/doc/Xmms/Client/async_start-i.yaml +12 -0
  115. data/x2c/doc/Xmms/Client/bindata_add-i.yaml +10 -0
  116. data/x2c/doc/Xmms/Client/bindata_retrieve-i.yaml +10 -0
  117. data/x2c/doc/Xmms/Client/c-i.yaml +12 -0
  118. data/x2c/doc/Xmms/Client/cdesc-Client.yaml +169 -0
  119. data/x2c/doc/Xmms/Client/coll_find-i.yaml +12 -0
  120. data/x2c/doc/Xmms/Client/coll_get-i.yaml +12 -0
  121. data/x2c/doc/Xmms/Client/coll_idlist_from_playlist_file-i.yaml +12 -0
  122. data/x2c/doc/Xmms/Client/coll_list-i.yaml +12 -0
  123. data/x2c/doc/Xmms/Client/coll_query_ids-i.yaml +12 -0
  124. data/x2c/doc/Xmms/Client/coll_query_info-i.yaml +12 -0
  125. data/x2c/doc/Xmms/Client/coll_remove-i.yaml +12 -0
  126. data/x2c/doc/Xmms/Client/coll_rename-i.yaml +12 -0
  127. data/x2c/doc/Xmms/Client/coll_save-i.yaml +12 -0
  128. data/x2c/doc/Xmms/Client/configure-i.yaml +12 -0
  129. data/x2c/doc/Xmms/Client/configval_get-i.yaml +12 -0
  130. data/x2c/doc/Xmms/Client/configval_list-i.yaml +12 -0
  131. data/x2c/doc/Xmms/Client/configval_register-i.yaml +12 -0
  132. data/x2c/doc/Xmms/Client/configval_set-i.yaml +12 -0
  133. data/x2c/doc/Xmms/Client/connect-i.yaml +10 -0
  134. data/x2c/doc/Xmms/Client/continue-i.yaml +11 -0
  135. data/x2c/doc/Xmms/Client/format-i.yaml +12 -0
  136. data/x2c/doc/Xmms/Client/handled_connect-i.yaml +10 -0
  137. data/x2c/doc/Xmms/Client/help-i.yaml +16 -0
  138. data/x2c/doc/Xmms/Client/main-c.yaml +12 -0
  139. data/x2c/doc/Xmms/Client/main_stats-i.yaml +12 -0
  140. data/x2c/doc/Xmms/Client/medialib_add_entry-i.yaml +10 -0
  141. data/x2c/doc/Xmms/Client/medialib_entry_property_remove-i.yaml +10 -0
  142. data/x2c/doc/Xmms/Client/medialib_entry_property_set-i.yaml +10 -0
  143. data/x2c/doc/Xmms/Client/medialib_entry_remove-i.yaml +10 -0
  144. data/x2c/doc/Xmms/Client/medialib_get_id-i.yaml +10 -0
  145. data/x2c/doc/Xmms/Client/medialib_get_info-i.yaml +10 -0
  146. data/x2c/doc/Xmms/Client/medialib_path_import-i.yaml +10 -0
  147. data/x2c/doc/Xmms/Client/medialib_rehash-i.yaml +10 -0
  148. data/x2c/doc/Xmms/Client/medialib_select-i.yaml +10 -0
  149. data/x2c/doc/Xmms/Client/new-c.yaml +12 -0
  150. data/x2c/doc/Xmms/Client/on_disconnect-i.yaml +10 -0
  151. data/x2c/doc/Xmms/Client/playback_pause-i.yaml +12 -0
  152. data/x2c/doc/Xmms/Client/playback_seek_ms-i.yaml +12 -0
  153. data/x2c/doc/Xmms/Client/playback_seek_ms_rel-i.yaml +12 -0
  154. data/x2c/doc/Xmms/Client/playback_seek_samples-i.yaml +12 -0
  155. data/x2c/doc/Xmms/Client/playback_seek_samples_rel-i.yaml +12 -0
  156. data/x2c/doc/Xmms/Client/playback_start-i.yaml +12 -0
  157. data/x2c/doc/Xmms/Client/playback_stop-i.yaml +12 -0
  158. data/x2c/doc/Xmms/Client/playback_tickle-i.yaml +12 -0
  159. data/x2c/doc/Xmms/Client/playback_volume_get-i.yaml +12 -0
  160. data/x2c/doc/Xmms/Client/playback_volume_set-i.yaml +12 -0
  161. data/x2c/doc/Xmms/Client/playbacklist-i.yaml +10 -0
  162. data/x2c/doc/Xmms/Client/playlist-i.yaml +12 -0
  163. data/x2c/doc/Xmms/Client/playlist_list-i.yaml +12 -0
  164. data/x2c/doc/Xmms/Client/playlist_set_next-i.yaml +12 -0
  165. data/x2c/doc/Xmms/Client/playlist_set_next_rel-i.yaml +12 -0
  166. data/x2c/doc/Xmms/Client/plugin_list-i.yaml +12 -0
  167. data/x2c/doc/Xmms/Client/post_connect-i.yaml +10 -0
  168. data/x2c/doc/Xmms/Client/pre_connect-i.yaml +12 -0
  169. data/x2c/doc/Xmms/Client/quit-i.yaml +12 -0
  170. data/x2c/doc/Xmms/Client/setup-i.yaml +12 -0
  171. data/x2c/doc/Xmms/Client/showprompt-i.yaml +10 -0
  172. data/x2c/doc/Xmms/Client/shutdown-i.yaml +12 -0
  173. data/x2c/doc/Xmms/Client/welcome-i.yaml +10 -0
  174. data/x2c/doc/Xmms/Client/xform_media_browse-i.yaml +10 -0
  175. data/x2c/doc/Xmms/Collection/%26-i.yaml +12 -0
  176. data/x2c/doc/Xmms/Collection/%5b%5d%3d-i.yaml +12 -0
  177. data/x2c/doc/Xmms/Collection/%5b%5d-i.yaml +12 -0
  178. data/x2c/doc/Xmms/Collection/%7c-i.yaml +12 -0
  179. data/x2c/doc/Xmms/Collection/%7e-i.yaml +12 -0
  180. data/x2c/doc/Xmms/Collection/Attributes/add-i.yaml +12 -0
  181. data/x2c/doc/Xmms/Collection/Attributes/cdesc-Attributes.yaml +25 -0
  182. data/x2c/doc/Xmms/Collection/Attributes/field-i.yaml +12 -0
  183. data/x2c/doc/Xmms/Collection/Attributes/field_string-i.yaml +10 -0
  184. data/x2c/doc/Xmms/Collection/Attributes/format-i.yaml +10 -0
  185. data/x2c/doc/Xmms/Collection/Chains/cdesc-Chains.yaml +39 -0
  186. data/x2c/doc/Xmms/Collection/Chains/list-i.yaml +12 -0
  187. data/x2c/doc/Xmms/Collection/Chains/load-c.yaml +12 -0
  188. data/x2c/doc/Xmms/Collection/Chains/load_form_file-c.yaml +12 -0
  189. data/x2c/doc/Xmms/Collection/Chains/play-i.yaml +12 -0
  190. data/x2c/doc/Xmms/Collection/Chains/playlist-i.yaml +12 -0
  191. data/x2c/doc/Xmms/Collection/Chains/save-i.yaml +12 -0
  192. data/x2c/doc/Xmms/Collection/FormQuery/cdesc-FormQuery.yaml +22 -0
  193. data/x2c/doc/Xmms/Collection/FormQuery/method_missing-i.yaml +14 -0
  194. data/x2c/doc/Xmms/Collection/Info/cdesc-Info.yaml +32 -0
  195. data/x2c/doc/Xmms/Collection/Info/info-i.yaml +12 -0
  196. data/x2c/doc/Xmms/Collection/Info/inspect-i.yaml +10 -0
  197. data/x2c/doc/Xmms/Collection/Operands/cdesc-Operands.yaml +18 -0
  198. data/x2c/doc/Xmms/Collection/Operands/empty%3f-i.yaml +10 -0
  199. data/x2c/doc/Xmms/Collection/Query/%3c%3d-i.yaml +10 -0
  200. data/x2c/doc/Xmms/Collection/Query/%3e%3d-i.yaml +10 -0
  201. data/x2c/doc/Xmms/Collection/Query/%7e-i.yaml +10 -0
  202. data/x2c/doc/Xmms/Collection/Query/_-i.yaml +12 -0
  203. data/x2c/doc/Xmms/Collection/Query/cdesc-Query.yaml +32 -0
  204. data/x2c/doc/Xmms/Collection/Query/exist%3f-i.yaml +12 -0
  205. data/x2c/doc/Xmms/Collection/Query/format-i.yaml +10 -0
  206. data/x2c/doc/Xmms/Collection/Query/has-i.yaml +13 -0
  207. data/x2c/doc/Xmms/Collection/Query/new-c.yaml +10 -0
  208. data/x2c/doc/Xmms/Collection/Vote/acceptable-i.yaml +10 -0
  209. data/x2c/doc/Xmms/Collection/Vote/awesome-i.yaml +10 -0
  210. data/x2c/doc/Xmms/Collection/Vote/cdesc-Vote.yaml +32 -0
  211. data/x2c/doc/Xmms/Collection/Vote/good-i.yaml +10 -0
  212. data/x2c/doc/Xmms/Collection/Vote/nice-i.yaml +10 -0
  213. data/x2c/doc/Xmms/Collection/Vote/notsucking-i.yaml +10 -0
  214. data/x2c/doc/Xmms/Collection/Vote/unvoted-i.yaml +12 -0
  215. data/x2c/doc/Xmms/Collection/and-i.yaml +12 -0
  216. data/x2c/doc/Xmms/Collection/attribute-i.yaml +10 -0
  217. data/x2c/doc/Xmms/Collection/cdesc-Collection.yaml +140 -0
  218. data/x2c/doc/Xmms/Collection/complement-i.yaml +12 -0
  219. data/x2c/doc/Xmms/Collection/default-c.yaml +12 -0
  220. data/x2c/doc/Xmms/Collection/format-i.yaml +12 -0
  221. data/x2c/doc/Xmms/Collection/idlis-i.yaml +12 -0
  222. data/x2c/doc/Xmms/Collection/idlist%3d-i.yaml +12 -0
  223. data/x2c/doc/Xmms/Collection/intersect-i.yaml +12 -0
  224. data/x2c/doc/Xmms/Collection/load-c.yaml +10 -0
  225. data/x2c/doc/Xmms/Collection/new-c.yaml +10 -0
  226. data/x2c/doc/Xmms/Collection/new_constructor-c.yaml +12 -0
  227. data/x2c/doc/Xmms/Collection/new_list-c.yaml +12 -0
  228. data/x2c/doc/Xmms/Collection/new_pshuffle-c.yaml +12 -0
  229. data/x2c/doc/Xmms/Collection/new_selection-c.yaml +12 -0
  230. data/x2c/doc/Xmms/Collection/not-i.yaml +12 -0
  231. data/x2c/doc/Xmms/Collection/operand-i.yaml +10 -0
  232. data/x2c/doc/Xmms/Collection/or-i.yaml +12 -0
  233. data/x2c/doc/Xmms/Collection/parent-i.yaml +12 -0
  234. data/x2c/doc/Xmms/Collection/pshuffle-i.yaml +12 -0
  235. data/x2c/doc/Xmms/Collection/queue-i.yaml +12 -0
  236. data/x2c/doc/Xmms/Collection/tree_inject-i.yaml +12 -0
  237. data/x2c/doc/Xmms/Collection/tree_walk-i.yaml +12 -0
  238. data/x2c/doc/Xmms/Collection/typ-i.yaml +10 -0
  239. data/x2c/doc/Xmms/Collection/union-i.yaml +12 -0
  240. data/x2c/doc/Xmms/Collection/universe-c.yaml +12 -0
  241. data/x2c/doc/Xmms/Config/%5b%5d%3d-i.yaml +10 -0
  242. data/x2c/doc/Xmms/Config/%5b%5d-i.yaml +10 -0
  243. data/x2c/doc/Xmms/Config/cdesc-Config.yaml +47 -0
  244. data/x2c/doc/Xmms/Config/configs-i.yaml +10 -0
  245. data/x2c/doc/Xmms/Config/format-i.yaml +10 -0
  246. data/x2c/doc/Xmms/Config/join-i.yaml +10 -0
  247. data/x2c/doc/Xmms/Config/keys-i.yaml +10 -0
  248. data/x2c/doc/Xmms/Config/method_missing-i.yaml +10 -0
  249. data/x2c/doc/Xmms/Config/methods-i.yaml +10 -0
  250. data/x2c/doc/Xmms/Config/new-c.yaml +10 -0
  251. data/x2c/doc/Xmms/Config/parent-i.yaml +10 -0
  252. data/x2c/doc/Xmms/Config/respond_to%3f-i.yaml +10 -0
  253. data/x2c/doc/Xmms/Config/subs-i.yaml +10 -0
  254. data/x2c/doc/Xmms/Config/subtrees-i.yaml +10 -0
  255. data/x2c/doc/Xmms/Duration/cdesc-Duration.yaml +25 -0
  256. data/x2c/doc/Xmms/Duration/format-i.yaml +10 -0
  257. data/x2c/doc/Xmms/Duration/new-c.yaml +10 -0
  258. data/x2c/doc/Xmms/Duration/to_s-i.yaml +10 -0
  259. data/x2c/doc/Xmms/Format/cdesc-Format.yaml +22 -0
  260. data/x2c/doc/Xmms/Format/format-i.yaml +10 -0
  261. data/x2c/doc/Xmms/Format/inspect-i.yaml +10 -0
  262. data/x2c/doc/Xmms/Format/to_s-i.yaml +10 -0
  263. data/x2c/doc/Xmms/Info/cdesc-Info.yaml +32 -0
  264. data/x2c/doc/Xmms/Info/count-i.yaml +12 -0
  265. data/x2c/doc/Xmms/Info/format-i.yaml +12 -0
  266. data/x2c/doc/Xmms/Info/inspect-i.yaml +10 -0
  267. data/x2c/doc/Xmms/Info/method_missing-i.yaml +10 -0
  268. data/x2c/doc/Xmms/Info/new-c.yaml +10 -0
  269. data/x2c/doc/Xmms/Info/search-i.yaml +12 -0
  270. data/x2c/doc/Xmms/Info/to_s-i.yaml +10 -0
  271. data/x2c/doc/Xmms/Media/cdesc-Media.yaml +31 -0
  272. data/x2c/doc/Xmms/Media/format-i.yaml +10 -0
  273. data/x2c/doc/Xmms/Media/media-i.yaml +12 -0
  274. data/x2c/doc/Xmms/Media/mlib_add-i.yaml +12 -0
  275. data/x2c/doc/Xmms/Media/new-c.yaml +10 -0
  276. data/x2c/doc/Xmms/Media/parent-i.yaml +12 -0
  277. data/x2c/doc/Xmms/Options/%5b%5d%3d-c.yaml +10 -0
  278. data/x2c/doc/Xmms/Options/%5b%5d-c.yaml +10 -0
  279. data/x2c/doc/Xmms/Options/cdesc-Options.yaml +24 -0
  280. data/x2c/doc/Xmms/Options/get_argv-c.yaml +10 -0
  281. data/x2c/doc/Xmms/Options/help-c.yaml +10 -0
  282. data/x2c/doc/Xmms/Options/opts-c.yaml +10 -0
  283. data/x2c/doc/Xmms/Playlist/Chains/cdesc-Chains.yaml +18 -0
  284. data/x2c/doc/Xmms/Playlist/Chains/play-i.yaml +12 -0
  285. data/x2c/doc/Xmms/Playlist/Shortcut/add-i.yaml +12 -0
  286. data/x2c/doc/Xmms/Playlist/Shortcut/cdesc-Shortcut.yaml +24 -0
  287. data/x2c/doc/Xmms/Playlist/Shortcut/insert-i.yaml +12 -0
  288. data/x2c/doc/Xmms/Playlist/Shortcut/move-i.yaml +12 -0
  289. data/x2c/doc/Xmms/Playlist/Shortcut/remove_entries-i.yaml +12 -0
  290. data/x2c/doc/Xmms/Playlist/add_collection-i.yaml +12 -0
  291. data/x2c/doc/Xmms/Playlist/add_entry-i.yaml +12 -0
  292. data/x2c/doc/Xmms/Playlist/cdesc-Playlist.yaml +56 -0
  293. data/x2c/doc/Xmms/Playlist/clear-i.yaml +12 -0
  294. data/x2c/doc/Xmms/Playlist/collection-i.yaml +12 -0
  295. data/x2c/doc/Xmms/Playlist/current_pos-i.yaml +12 -0
  296. data/x2c/doc/Xmms/Playlist/entries-i.yaml +12 -0
  297. data/x2c/doc/Xmms/Playlist/format-i.yaml +10 -0
  298. data/x2c/doc/Xmms/Playlist/insert_entry-i.yaml +12 -0
  299. data/x2c/doc/Xmms/Playlist/load-i.yaml +12 -0
  300. data/x2c/doc/Xmms/Playlist/name-i.yaml +12 -0
  301. data/x2c/doc/Xmms/Playlist/new-c.yaml +12 -0
  302. data/x2c/doc/Xmms/Playlist/playlist_move_entry-i.yaml +12 -0
  303. data/x2c/doc/Xmms/Playlist/radd-i.yaml +12 -0
  304. data/x2c/doc/Xmms/Playlist/remove-i.yaml +12 -0
  305. data/x2c/doc/Xmms/Playlist/remove_entry-i.yaml +12 -0
  306. data/x2c/doc/Xmms/Playlist/shuffle-i.yaml +12 -0
  307. data/x2c/doc/Xmms/Playlist/sort-i.yaml +12 -0
  308. data/x2c/doc/Xmms/PropDict/Mlib/cdesc-Mlib.yaml +30 -0
  309. data/x2c/doc/Xmms/PropDict/Mlib/method_missing-i.yaml +10 -0
  310. data/x2c/doc/Xmms/PropDict/Mlib/methods-i.yaml +10 -0
  311. data/x2c/doc/Xmms/PropDict/Mlib/rehash-i.yaml +12 -0
  312. data/x2c/doc/Xmms/PropDict/Mlib/remove%21-i.yaml +12 -0
  313. data/x2c/doc/Xmms/PropDict/Mlib/respond_to%3f-i.yaml +10 -0
  314. data/x2c/doc/Xmms/PropDict/cdesc-PropDict.yaml +27 -0
  315. data/x2c/doc/Xmms/PropDict/format-i.yaml +10 -0
  316. data/x2c/doc/Xmms/PropDict/id-i.yaml +10 -0
  317. data/x2c/doc/Xmms/PropDict/inspect-i.yaml +10 -0
  318. data/x2c/doc/Xmms/PropDict/to_h-i.yaml +10 -0
  319. data/x2c/doc/Xmms/PropDict/to_s-i.yaml +10 -0
  320. data/x2c/doc/Xmms/Remember/cdesc-Remember.yaml +18 -0
  321. data/x2c/doc/Xmms/Result/cdesc-Result.yaml +20 -0
  322. data/x2c/doc/Xmms/Result/val-i.yaml +12 -0
  323. data/x2c/doc/Xmms/Song/cdesc-Song.yaml +29 -0
  324. data/x2c/doc/Xmms/Song/format-c.yaml +12 -0
  325. data/x2c/doc/Xmms/Song/format-i.yaml +10 -0
  326. data/x2c/doc/Xmms/Song/info-i.yaml +10 -0
  327. data/x2c/doc/Xmms/Song/new-c.yaml +10 -0
  328. data/x2c/doc/Xmms/Songlist/Chains/cdesc-Chains.yaml +29 -0
  329. data/x2c/doc/Xmms/Songlist/Chains/idlist-i.yaml +12 -0
  330. data/x2c/doc/Xmms/Songlist/Chains/queue-i.yaml +12 -0
  331. data/x2c/doc/Xmms/Songlist/cdesc-Songlist.yaml +37 -0
  332. data/x2c/doc/Xmms/Songlist/collection-i.yaml +10 -0
  333. data/x2c/doc/Xmms/Songlist/format-i.yaml +10 -0
  334. data/x2c/doc/Xmms/Songlist/format_hash-i.yaml +10 -0
  335. data/x2c/doc/Xmms/Songlist/info_hash-i.yaml +10 -0
  336. data/x2c/doc/Xmms/Songlist/new-c.yaml +10 -0
  337. data/x2c/doc/Xmms/Songlist/songs-i.yaml +12 -0
  338. data/x2c/doc/Xmms/Songlist/to_s-i.yaml +10 -0
  339. data/x2c/doc/Xmms/cdesc-Xmms.yaml +18 -0
  340. data/x2c/doc/Xmms/save_call-c.yaml +12 -0
  341. data/x2c/doc/created.rid +1 -0
  342. data/x2c/plug/async.rb +50 -0
  343. data/x2c/plug/chains.rb +148 -0
  344. data/x2c/plug/config.rb +90 -0
  345. data/x2c/plug/daemon.rb +72 -0
  346. data/x2c/plug/format.rb +251 -0
  347. data/x2c/plug/help.rb +240 -0
  348. data/x2c/plug/info.rb +86 -0
  349. data/x2c/plug/iplayback.rb +49 -0
  350. data/x2c/plug/listnames.rb +43 -0
  351. data/x2c/plug/mlib.rb +128 -0
  352. data/x2c/plug/query.rb +51 -0
  353. data/x2c/plug/remember.rb +124 -0
  354. data/x2c/plug/shortcuts.rb +108 -0
  355. data/x2c/plug/tutorial.rb +134 -0
  356. data/x2c/plug/vote.rb +77 -0
  357. data/x2c/x2c +36 -0
  358. data/x2c/x2c.rb +16 -0
  359. metadata +453 -0
@@ -0,0 +1,86 @@
1
+ # Copyright by Daniel Waeber, see the LICENSE file for details
2
+ require 'plug/format.rb'
3
+
4
+ module Xmms
5
+ # The info calls is used to show stats about Colelctions
6
+ # and search inside of them
7
+ #
8
+ # You can futher select only a certain field for information
9
+ # by typing info.field
10
+ class Info
11
+ include Format
12
+ def initialize coll = Collection.universe, *info
13
+ info=[:artist, :album, :title] if info.empty?
14
+ @coll = coll
15
+ @info = info
16
+ end
17
+ # search str the information object
18
+ def search str=nil
19
+ str ||= Readline.readline('search << ')
20
+ ids = []
21
+ @info.map do |i|
22
+ list = xmms.coll_query_info(@coll,[i.to_s,'id']).val.each do |h|
23
+ ids << h[:id] if h[i] =~ /#{str}/
24
+ end
25
+ end
26
+ Songlist.new(ids)
27
+ end
28
+ def to_s
29
+ ' '+format(' ', 1337)
30
+ end
31
+ def inspect
32
+ ' '+format(' ', 1337)
33
+ end
34
+ # count of infos available
35
+ def count
36
+ xmms.coll_query_info(@coll, @info.last.to_s).length
37
+ end
38
+ # show the stats
39
+ def format idt=' ', show=3
40
+ @info.map do |i|
41
+ l = xmms.coll_query_info(@coll,i.to_s)
42
+ return '' if l.length.zero?
43
+ while l.respond_to?(:val)
44
+ l = l.val
45
+ end
46
+ min = [l.length, show].min
47
+ all = (min == l.length)
48
+ "#{l.length} #{i}s:\n#{idt} #{(l[0...min].map{|a| a.values}+(all ? [] : ['...'])).format(idt+' ')}"
49
+ end.join("\n#{idt}")
50
+ end
51
+ def method_missing id
52
+ Info.new @coll, id
53
+ end
54
+ end
55
+ class Collection
56
+ # the info plugin shows nice stats and makes a collections searchable
57
+ # * info creates the default info object
58
+ # * artists, albums, titles, ids and urls show only the specified field
59
+ # * search will search the collection
60
+ module Info
61
+ # creates the info object to show stats
62
+ def info
63
+ Xmms::Info.new(self)
64
+ end
65
+ alias_forward :artists, :info, :artist
66
+ alias_forward :albums, :info, :album
67
+ alias_forward :titles, :info, :tilte
68
+ alias_forward :ids, :info, :id
69
+ alias_forward :urls, :info, :url
70
+ alias_forward :search, :info
71
+
72
+ alias_method :__inspect, :inspect
73
+ def inspect
74
+ __inspect+"\n "+info.format
75
+ end
76
+ end
77
+ include Info
78
+ end
79
+ class Client
80
+ # you can serach the media library with the s/search command
81
+ module Search
82
+ alias_forward :search, :universe
83
+ end
84
+ include Search
85
+ end
86
+ end
@@ -0,0 +1,49 @@
1
+ # Copyright by Daniel Waeber, see the LICENSE file for details
2
+ require 'plug/chains.rb'
3
+
4
+ module Xmms
5
+ class Client
6
+ # the Inteligent Playback module is used to extend the play, pause and skip commands
7
+ module IPlayback
8
+ # skip n tracks
9
+ def skip n=1
10
+ playlist_set_next_rel n
11
+ playback_tickle
12
+ end
13
+ # pause/unpase
14
+ def pause
15
+ if playback_status.val != Xmms::Client::PAUSE
16
+ playback_pause
17
+ else
18
+ playback_start
19
+ end
20
+ end
21
+ # play the last result
22
+ def play arg=nil
23
+ val = case arg
24
+ when Collection ; arg.play
25
+ when Playlist ; arg.play
26
+ when Songlist ; arg.idlist.play
27
+ when String ;
28
+ begin
29
+ playlist(arg).play
30
+ rescue Result::ValueError => e
31
+ coll_get(arg).play
32
+ rescue Result::ValueError => e
33
+ raise Result::ValueError, "can't find valid list or collection #{arg} (#{e})"
34
+ end
35
+ when nil
36
+ begin
37
+ last ? last.play : current
38
+ rescue
39
+ nil
40
+ end
41
+ else
42
+ raise(Result::ValueError,"Can't play a #{arg.class}")
43
+ end
44
+ playback_start.val; ls
45
+ end
46
+ end
47
+ include IPlayback
48
+ end
49
+ end
@@ -0,0 +1,43 @@
1
+ # Copyright by Daniel Waeber, see the LICENSE file for details
2
+ module Xmms
3
+ class Client
4
+ # the ListNames plugin gives esay access to saved Collection.
5
+ # it will create Constances or functions for the name of all collection,
6
+ # so you can access them by typing there names
7
+ module ListNames
8
+ # set up a list
9
+ def setup_list n
10
+ s = catch(:warn) do
11
+ begin
12
+ c = coll_get(n).val
13
+ c.name = n
14
+ throw(:warn, "constant #{n} already exists") if Client.const_defined?(n)
15
+ Client.const_set(n,c)
16
+ rescue NameError
17
+ throw(:warn, "method #{n} already exists") if self.respond_to?(n)
18
+ Client.send :define_method, n.to_sym do
19
+ c
20
+ end
21
+ rescue NameError
22
+ throw(:warn,"consider renaming it")
23
+ rescue
24
+ throw(:warn,"perhaps something is inconsistent")
25
+ end;nil
26
+ end
27
+ s && puts("can't create shortcut for #{n}, #{s}")
28
+ end
29
+ # sets up constances and methods according to collection names
30
+ def setup_lists
31
+ coll_list.each do |n|
32
+ setup_list n
33
+ end
34
+ end
35
+ end
36
+ include ListNames
37
+ end
38
+ class Collection
39
+ after_method_hook :save do |v|
40
+ xmms.setup_list v.name
41
+ end rescue nil
42
+ end
43
+ end
@@ -0,0 +1,128 @@
1
+ # Copyright by Daniel Waeber, see the LICENSE file for details
2
+ module Xmms
3
+ module Format; end
4
+ module Remember; end
5
+ # class for browsing media
6
+ class Media
7
+ Options['media-dir'=> ["file://#{Dir.pwd}", "path to the root of you muisc dir"]]
8
+ include Format
9
+ include Remember
10
+ attr_reader :path
11
+ def initialize path=Options['media-dir']
12
+ @path = path[/^file:\/\//] ? path : 'file://'+path
13
+ end
14
+ def format idt=' '
15
+ 'parent <-' + "\n#{idt}" +
16
+ @path
17
+ end
18
+ # parent of file
19
+ def parent
20
+ Browse.new(File.dirname(@path))
21
+ end
22
+ # returns a new collection of files under current path
23
+ def media
24
+ Collection.new_match(:url => "#{@path}%")
25
+ end
26
+ # adds media to mlib
27
+ def mlib_add
28
+ xmms.medialib_add_entry(@path).val
29
+ end
30
+ end
31
+ # class for browsing media
32
+ class Browse < Media
33
+ # list all
34
+ def list
35
+ xmms.xform_media_browse @path
36
+ end
37
+ # list dir
38
+ def dirs
39
+ list.map{|h| h[:isdir].zero? ? nil : h[:path]}.compact.map{|d| d.sub(/^#{@path}\/*/,'')}
40
+ end
41
+ # list files
42
+ def files
43
+ list.map{|h| h[:isdir].zero? ? h[:path] : nil}.compact.map{|f| f.sub(/^#{@path}\/*/,'')}
44
+ end
45
+ def format idt=' '
46
+ 'parent <-' + "\n#{idt}" +
47
+ dirs.map{|d| d+' ->'}.format + "\n#{idt}" +
48
+ files.map.format
49
+ end
50
+ # open sub
51
+ def cd sub
52
+ if files.include?(sub)
53
+ Media.new(File.join(@path,sub))
54
+ else
55
+ Browse.new(File.join(@path,sub))
56
+ end
57
+ end
58
+ alias_method :[], :cd
59
+ alias_method :open, :cd
60
+ alias_method :get, :cd
61
+ # adds media in path to mlib
62
+ def mlib_add
63
+ xmms.medialib_path_import(@path).val
64
+ end
65
+ end
66
+ class PropDict
67
+ # the Mlib module can change the info for a certain song:
68
+ # you can rehash it, set some or remove infos.
69
+ #
70
+ # As all is ruby, you can simple edit a hole branch of songs
71
+ # with thing like each:
72
+ # ls.each{|s| s.artist = 'Bar'}
73
+ # (artist == foobar).list.each{|s| s.rehash}
74
+ module Mlib
75
+ # rehash the info
76
+ def rehash
77
+ xmms.medialib_rehash(self[:id]).val
78
+ end
79
+ # remove song form media lib
80
+ def remove!
81
+ xmms.medialib_entry_remove(self[:id]).val
82
+ end
83
+ alias_method :__respond_to?, :respond_to?
84
+ alias_method :__methods, :methods
85
+ def respond_to? id
86
+ __respond_to?(id) || self[id] || ([?=,?!].include?(id.to_s[-1]) && self[id.to_s.chop.to_sym])
87
+ end
88
+ def methods
89
+ k = to_h.keys.map{|k| k.to_s}
90
+ __methods + k + k.map{|k| k+'='} + k.map{|k| k+'!'}
91
+ end
92
+ def method_missing key, val=nil, *args
93
+ case key.to_s[-1]
94
+ when ?= ; xmms.medialib_entry_property_set(self[:id], key.to_s.chop.to_sym, val).val
95
+ when ?! ; xmms.medialib_entry_property_remove(self[:id], key.to_s.chop.to_sym).val
96
+ else ; self[key] || raise(NoMethodError,"unknow field #{key}", caller)
97
+ end
98
+ end
99
+ end
100
+ include Mlib
101
+ end
102
+ class Client
103
+ # the Mlib module is change thing inside the mlib, you
104
+ # can browse you file system and add pathes or files
105
+ # or rehash the media lib. Also have a look at PropDict::Mlib
106
+ # where you can edit the medialib entry of a song
107
+ module Mlib
108
+ # browse for new media:
109
+ # browse [path]
110
+ # cd 'subdir'
111
+ # last['file'].mlib_add # add singlen file
112
+ # cd '..'
113
+ # cd '..'
114
+ # last.open('otherdir')
115
+ # mlib_add # add other dir
116
+ # cd '..'
117
+ # get('jod').mlib_add # add 'jod'
118
+ def browse path=Options['media-dir']
119
+ Browse.new path
120
+ end
121
+ # rehash media, arg can be a list, collection or id
122
+ def rehash arg=nil
123
+ arg ? Song.new(arg).rehash : medialib_rehash(0).val
124
+ end
125
+ end
126
+ include Mlib
127
+ end
128
+ end
@@ -0,0 +1,51 @@
1
+ # Copyright by Daniel Waeber, see the LICENSE file for details
2
+ module Xmms
3
+ class Collection
4
+ # in the middle class to format querys, eg. ((Collection.field == value).field > num) ...
5
+ class Query
6
+ def initialize field, base=Collection.default
7
+ @field = field.to_s
8
+ @base = base
9
+ end
10
+ # with this equals, match, hash, greater, smaller should work
11
+ [:equals, :match, :greater, :smaller].each do |id|
12
+ new = "new_#{id.to_s}".to_sym
13
+ define_method id do |*val|
14
+ Collection.send(new, @base, @field=>val[0])
15
+ end
16
+ end
17
+ def ~
18
+ ~has
19
+ end
20
+ def has
21
+ Collection.new_has(@base, @field=>nil)
22
+ end
23
+ def >= val
24
+ (self>val) | (self==val)
25
+ end
26
+ def <= val
27
+ (self<val) | (self==val)
28
+ end
29
+ alias_method :is , :equals; alias_method :==, :equals
30
+ alias_method :about , :match ; alias_method :=~, :match
31
+ alias_method :> , :greater ; alias_method :< , :smaller
32
+ alias_method :exist? , :has ; alias_method :_ , :has
33
+ end
34
+ # the Query plugin will give you access to a powerfull way to form querys on the medialib:
35
+ # for example the following will create a query:
36
+ # universe.((artist =~ '%Foob_r').genre == 'Bla').duration > 10000
37
+ # All fields can bes used with ==, =~, >, <, >=, <= and a string as argument.
38
+ # you can write ~field and field._, to get all media, where field is unset/set
39
+ module FormQuery
40
+ # creates a new query object, used to form querys.
41
+ # The field of the query is dynamicalle taken form the name of the function.
42
+ # The type and value has to be specified later.
43
+ # artist => will create a query with the artist field
44
+ # artist == 'Foo' => will specifiy the query as type equal with value 'Foo'
45
+ def method_missing id
46
+ Collection::Query.new(id,self)
47
+ end
48
+ end
49
+ include FormQuery
50
+ end
51
+ end
@@ -0,0 +1,124 @@
1
+ # Copyright by Daniel Waeber, see the LICENSE file for details
2
+
3
+ # remembers last results, the Xmms::Remember and Client::Remember for details
4
+ module Prompting
5
+ include Xmms
6
+ @@lastval = Collection.default
7
+ @@stackval = []
8
+ @@gointo = []
9
+ # retun the stack
10
+ def stack
11
+ @@stackval
12
+ end
13
+ # unify all Collections on the stack
14
+ def union
15
+ stack.inject{|a,b| b.is_a?(Collection) ? a|b : a}
16
+ end
17
+ # intersect all Collections on the stack
18
+ def intersect
19
+ stack.inject{|a,b| b.is_a?(Collection) ? a&b : a}
20
+ end
21
+ # push self to stack
22
+ def push
23
+ @@stackval.push self
24
+ end
25
+ # pop value form stack
26
+ def pop
27
+ @@stackval.pop
28
+ end
29
+ # get the prelast value
30
+ def lost
31
+ @@lostval.makelast
32
+ end
33
+ # return last rememberd value
34
+ def last
35
+ @@lastval
36
+ end
37
+ # set rememberd value
38
+ def last= val
39
+ @@lostval = @@lastval
40
+ if @@gointo.last
41
+ @@lastval = val
42
+ $prompt.set self
43
+ return nil
44
+ else
45
+ @@lastval = val
46
+ end
47
+ end
48
+ # set self to rememberd value
49
+ def makelast
50
+ self.last = self unless last==self
51
+ end
52
+
53
+ # set prompt to self and cascade on subwaluse
54
+ def gointo
55
+ @@gointo.push true
56
+ $prompt.push self
57
+ end
58
+ # only set the promt to object
59
+ def activate
60
+ @@gointo.push false
61
+ $prompt.push self
62
+ end
63
+ # go back to previous prompt
64
+ def back
65
+ @@gointo.pop
66
+ $prompt.pop
67
+ $prompt.set(xmms) unless $prompt.main
68
+ makelast
69
+ end
70
+ # new formating
71
+ def to_s
72
+ self.makelast
73
+ ((last==self)?'`':' ') + self.format
74
+ end
75
+ # new formating
76
+ def inspect
77
+ self.makelast
78
+ ((last==self)?'`':' ') + self.format
79
+ end
80
+ end
81
+
82
+ module Xmms
83
+ class Client
84
+ # the Remember module is used to remember last results.
85
+ # You can push the last result on a stack, pop form it or gointo it
86
+ # all unkonwn methods will be forwarded to the last result
87
+ module Remember
88
+ include Prompting
89
+ def to_s; format end
90
+ def inspect;format end
91
+ # push last value instead of client
92
+ def push val=last
93
+ val.push
94
+ end
95
+ # gointo last value instead of client
96
+ def gointo val=last
97
+ val.gointo
98
+ end
99
+ # forward to last
100
+ dynamic_forward :last
101
+ end
102
+ include Remember
103
+ end
104
+
105
+ # include support for being automaticalley remembered
106
+ # so if you get a result of a type include Remember,
107
+ # last will be set to the result.
108
+ # For more detail on last, see Client::Remember
109
+ module Remember
110
+ include Prompting
111
+ end
112
+ class Collection
113
+ include Remember
114
+ end
115
+ class Songlist
116
+ include Remember
117
+ end
118
+ class Song
119
+ include Remember
120
+ end
121
+ class Playlist
122
+ include Remember
123
+ end
124
+ end