clippy-say
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "clippy-say", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -15,5 +15,6 @@ # clippy-say | ||
# npm insall -g electron --unsafe-perm=true --allow-root | ||
npm install -g electron | ||
npm install -g electron | ||
npm install -g clippy-say | ||
``` | ||
## Usage | ||
@@ -28,6 +29,13 @@ | ||
# Run Merlin and let him speak "Hello World" | ||
# Run Merlin and let him say "Hello World" | ||
# Possible characters: "Clippy", "Merlin", "Rover" and "Links" | ||
clippysay "Hello World" --character "Merlin" | ||
# Play animations with the -a parameter | ||
# All the possible animations can be found on https://www.smore.com/clippy-js | ||
clippysay "Hello my Dudes" \ | ||
--animation Alert \ | ||
--animation Explain \ | ||
--animation CheckingSomething | ||
``` | ||
@@ -54,5 +62,4 @@ | ||
## Notice | ||
> Please don't kill me because of this application |
@@ -5,7 +5,20 @@ const electron = require('electron'); | ||
const character = argv.c || argv.character || 'Clippy'; | ||
const animations = argv.a || argv.animation; | ||
const jquery = require('jquery'); | ||
const clippy = require('clippyjs'); | ||
function playAnimation(agent, animationCount) { | ||
if(animationCount < animations.length) { | ||
agent.play(animations[animationCount], undefined, () => playAnimation(agent, animationCount + 1)); | ||
} | ||
} | ||
clippy.load(character, agent => { | ||
agent._startDrag = () => {}; | ||
agent.show(); | ||
agent.moveTo(0,0,0); | ||
agent.speak(...argv._); | ||
}); | ||
playAnimation(agent, 0); | ||
}); |
Sorry, the diff of this file is not supported yet
22829
65
63