Giter VIP home page Giter VIP logo

mycroft-skill-helpme's People

Contributors

chrison999 avatar jarbasai avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

msgpo

mycroft-skill-helpme's Issues

Converse method

User: "Help me"
Mycroft: "Say skill if you want help with a skill or commands if you want help with a command" (then waits)
User: "skills"
Mycroft: "Which skill do you want help with?" (then waits)
User: "Weather"
Mycroft: "The commands for the weather skills are..."

something like:

def help_intent(self, message):
    self.speak("Say skill if you want help with a skill or commands if you want help with a command")
    self.expecting_answer = True
    self.counter = 0
    self.choice =  None
    self.asked = False

def converse(self, transcript):
      utterance = transcript[0]
      # probably better to call another method inside this so it isnt very crowded
      if self.expecting_answer:
               if "skill" in utterance:
                    self.expecting_answer = False
                    self.choice = "skill"
                    self.counter = 0
               elif "command" in utterance:
                    self.expecting_answer = False
                    self.choice = "command"
                    self.counter = 0
               elif counter >= 3 or "stop" in utterance:
                     self.speak("disabling help")
                     self.expecting_answer = False
                     self.choice = None
                     self.counter = 0
                     return False
                else:
                     self.speak("try again")
                     self.counter += 1
                     self.choice = None
                     return True

         if self.choice is not None:
                  self.speak("what skill you want help for")
                  self.asked = True
                  self.choice = None
                  self.counter = 0
                  return True

         if asked:
                 # TODO grab skill from utterance
                 # TODO check if skill name is a skill or invalid
        
                 if self.choice == "skill":
                        self.speak("skill help")
                        self.asked = False
                        self.counter = 0
                        self.choice = None
                        return True
                 elif self.choice == "command":
                         self.speak("command help")
                         self.asked = False
                         self.counter = 0
                         self.choice = None
                         return True
                 elif counter >= 3 or "stop" in utterance:
                     self.speak("disabling help")
                     self.asked = False 
                     self.counter = 0
                     self.choice = None
                     return False
      return False

Keep track of last executed skill

There are two possible use cases i can think off

  • help me with skill X

reads help for that skill

  • some skill executes
  • mycroft, help

reads help for last executed skill

so it would be cool to keep track of last executed skill

how:

  • on register intent messages keep track of intent and skill
  • on intent message check which skill it belongs too
  • if help requested without skill name use last executed skill
  • if no last executed skill read help from help skill

Auto generating help files for each skill

i make a quick skill for myself, other people may have a use for it, either by changing it to their needs or as is, if it was a not very important skill i wouldnt lose time creating docs, but if we make auto-generation then every skill has basic help because of a 1 time job

reading the vocab files would allow at least commands to be spoken for all skills

How:

  • monitor all skills folder
  • read json help file, create if it doesnt exist
  • use folder name as skill name
  • read all vocab for commands
  • if command not in json, add it
  • get author from init.py (most devs will have a "author" variable at the top
  • try to get other fields from pre-defined skill variables

so all skills would just need at the top (outside the skill class) the following variables:

  • author
  • contact
    -website
  • description

everything could then be manually over-rided

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.