Skip to content

Commands

Joshua Haas edited this page Nov 6, 2015 · 19 revisions

Command Syntax and Explanations

Basic help is avaiable with sibyl help. Optional arguments are listed inside []. Note that prefacing commands with the bot's NICKNAME (default sibyl) is only necessary in a MUC.

Overview

This is the output of running sibyl help:

  • allmusic: play all music on the SCHWA 16G (orange) flash drive
  • audio: search and play a single audio file - audio [include -exclude]
  • audios: search and open a folder as a playlist - audios [include -exclude] [track#]
  • bookmark: manage bookmarks - bookmarks [show|set|remove] [name]
  • die: kill sibyl
  • echo: echo some text
  • fullscreen: toggle fullscreen
  • git: return a link to the github page
  • hello: reply if someone says hello
  • hop: move forward or back - hop [small|big] [back|forward]
  • info: display info about currently playing file
  • join: join a MUC - [roomJID nick pass]
  • jump: jump to an item# in the playlist - jump #
  • library: control media library - library (info|load|rebuild|save)
  • lights: control the living room light - lights [on|off|toggle|status]
  • logging: set the log level - log (critical|error|warning|info|debug|clear)
  • network: reply with some network info
  • next: go to next playlist item
  • note: add a note - note (show|add|playing|remove) [body|num]
  • pause: if xbmc is playing, pause
  • play: if xbmc is paused, resume playing
  • prev: go to previous playlist item
  • random: play random song - random [include -exclude]
  • reboot: restart sibyl
  • redo: execute the last command again
  • rejoin: rejoin the configured MUC
  • remote: execute remote buttons in order - remote (lrudeb)[...]
  • restart: start playing again from 0:00
  • resume: resume playing a playlist - resume [name] [next]
  • search: search all paths for matches - search [include -exclude]
  • seek: go to a specific time - seek [hh:]mm:ss
  • stop: if xbmc is playing, stop
  • stream: stream from [YouTube, Twitch (Live)] - stream url
  • subtitles: change the subtitles - subtitles (info|on|off|next|prev|set) [index]
  • tv: pass command to cec-client - tv (on|standby|as)
  • ups: get latest UPS tracking status - sibyl ups number
  • video: search and play a single video - video [include -exclude]
  • videos: search and open a folder as a playlist - videos [include -exclude] [track#]
  • viki: VIKI IS OBSOLETE
  • volume: set the player volume percentage - volume %
  • wiki: return a link and brief from wikipedia - wiki title

Details

Detailed usage explanations for each command are provided below.

audio

sibyl audio search1 [search2 search3 ...]

Search audio_dirs and play the matching file. If there are multiple matches, a list of paths is returned. In such a case, execute the command again with additional search terms to select only a single file. Note that the search terms are matched to the entire file path, not just the file name itself. A file is considered a match if it contains all of the given search terms, ignoring case. You can exclude a term instead of including a term by prefacing it with - as in -string. Quote phrases with spaces in them are also supported as in "two words".

audios

sibyl audios search1 [search2 search3 ...] [item#]

As audio but searches for a directory and plays its contents. If the last parameter is an integer the player begins at that item, otherwise it begins at the first item. Note that shuffling may interfere with specifying an item number.

bookmark

sibyl bookmark [show|set|remove] [name]

This command interfaces with the bookmark store. The set option only works if there is an active audios or videos playlist. It has three different options:

  • show - responds with a list of all saved bookmarks
  • show name - returns all bookmarks that contain name
  • set - save your position and time in the current playlist as the full path of the directory
  • set name - same as above but save it as name (you should always use this syntax)
  • remove name - deletes any bookmarks containing name
  • remove * - deletes all bookmarks

die

sibyl die

Kills sibyl using sys.exit(). Note that this does not clean up the PID file created by the init script. This command is disabled by default. To enable it, set chat_ctrl to True.

echo

sibyl echo text

Sibyl responds with the entered text.

fullscreen

sibyl fullscreen

Toggles the fullscreen GUI.

hello

sibyl hello

Simple test to make sure the bot is working. Sibyl responds with Hello World!.

help

sibyl help [command]

If no arguments are passed, print short help text for every command. Otherwise print the help text only for command.

hop

sibyl hop [small|big] [back|forward]

Hop forward or backward based on XBMC's configured hop distances. The defaults are small and back, so calling sibyl hop is the same as sibyl hop small back.

info

sibyl info

Responds with info about the currently playing file. Includes type, current time, and file name.

join

sibyl join [roomJID] [nick] [pass]

If no arguments are passed (i.e. sibyl join), it behaves like rejoin. Otherwise, it joins the MUC specified by roomJID. Sibyl's nickname in the room will be nick, or NICKNAME if none is specified. Optionally you can specify a password for the room with pass. This command is disabled by default. To enable it, set chat_ctrl to True.

jump

sibyl jump [item#]

Jump to the specified item number in the playlist.

library

sibyl library [info|load|rebuild|save]

Sibyl maintains a list of files and folders to speed up searching referred to as its "library". You can use this function to interact with it. The library is saved using python's pickle module.

  • info - Respond with the last time the library was updated
  • load - Reload the library from the pickle file (default: sibyl.pickle)
  • rebuild - Traverse all search directories, build the library, then save it
  • save - Save the library to a pickle file (default: sibyl.pickle)

logging

sibyl logging [critical|error|warning|info|debug|clear]

All options except the last set the logging level (default: warning). See python's logging module for more details. This can be useful for debugging without having to restart the bot. The clear option clears the log file.

network

sibyl network

Responds with some basic network info. Could be helpful if you have dynamic DNS or a dynamic external IP address. The returned addresses are explained below:

  • My IP - the device running Sibyl
  • RPi IP - passed during bot instantiation as RPI_IP
  • External IP - seen by the internet (uses http://ipecho.net/plain)

next

sibyl next

Play the next file in the playlist.

note

sibyl note (show|add|playing|remove) [body|num]

Unlike bookmarks, notes can contain anything you want. Sibyl can remember any number of notes, and display notes matching a search term. Notes are stores in a text file specified by note_file. This command has the following options:

  • show - show all notes
  • show body - show all notes containing the search text body
  • add body - add a note with body as its text
  • playing - adds a note containing the currently playing file info
  • playing body - adds a note with file info added after body
  • remove num - removes the note with index num

pause

sibyl pause

Pause the currently playing file.

play

sibyl play

Resume playing the current file.

prev

sibyl prev

Play the previous file in the playlist. Implementation note: this command actually calls the XBMC Previous function twice since the first call just goes to the beginning of the file.

random

sibyl random [search1 search2 ...]

Play a random audio file. If search is provided, the random file is chosen from among those whose path contains search. This command recognizes - and quotes as others do.

reboot

sibyl reboot

Reboot the bot using the init script. Specifically calls service sibyl restart. This command is disabled by default. To enable it, set chat_ctrl to True.

redo

sibyl redo

Execute the last command again (i.e. the most recent command that was not redo). Can be called multiple times in succession. NOTE: as currently implemented, this is global, so using Sibyl in more than one chat room or in a room and private chat could result in unexpected behavior.

rejoin

sibyl rejoin

Rejoins the MUC specified in the run_forever command.

remote

sibyl remote [udlreb...]

Behaves like a remote, pressing the buttons in the order specified. Options:

  • u - up
  • d - down
  • l - left
  • r - right
  • e - enter
  • b - back

For example, sibyl remote de presses down then enter.

restart

sibyl restart

Go back to the beginning of the current file (i.e. seek to 0:00).

resume

sibyl resume [name] [next]

Resume playing from the location denoted in a bookmark. Its behavior is as follows:

  • resume - start playing from the most recently added bookmark
  • resume name - start playing from the bookmark that matches name
  • resume [name] next - as above, but start at the beginning of the next playlist item

search

sibyl search search1 [search2 search3 ...]

Same as audio but searches both audio_dirs and video_dirs for matching files and folders. This command does not interact with XBMC.

seek

sibyl seek [hh:m]m:ss

Seek to the given time in the current file.

stop

sibyl stop

Stop playing the current file.

stream

sibyl stream URL

Open the given URL using a video Add-On. You must have the relevant XBMC addon installed. Supported streams:

  • YouTube
  • Twitch TV Live

subtitles

sibyl subtitles (info|on|off|next|prev|set) [index]

Controls the subtitle track being used in the currently playing video. Subtitles are always displayed in the format track# - language - name. This command has the following options:

  • info - reply with a list of all subtitles (current track inside ())
  • on - turn on subtitles
  • off - turn off subtitles
  • next - change to the next subtitle track (by track#)
  • prev - change to the previous subtitle track (by track#)
  • set - change to the track specified by index

tv

sibyl tv [command]

Send a command to cec-client to control a TV attached by HDMI. You can get a list of commands by entering echo help | cec-client on the command line. I have only tested on, standby, and as.

ups

sibyl ups tracking#

Return the most recent activity from the UPS website for the indicated tracking number.

video

sibyl video search1 [search2 search3 ...]

Same as audio but uses video_dirs to search.

videos

sibyl videos search1 [search2 search3 ...] [item#]

Same as audios but uses video_dirs to search.

volume

sibyl volume [percent]

If no arguments are passed, returns the current volume as a percent. If a number is passed in [0,100] it sets the volume to the specified percent.

wiki

sibyl wiki topic

Returns a link and brief from Wikipedia based on the search results for topic. YMMV.

Clone this wiki locally