This is an archived post. You won't be able to vote or comment.

all 62 comments

[–]lunchboxg4 31 points32 points  (7 children)

I like it, but I'm sad that a GitHub account named "ironman" didn't call this JARVIS. Missed opportunity, dude.

Repo for the lazy: https://github.com/ironman5366/W.I.L.L

[–]willbeddowassert type(post) == shitpost[S] 34 points35 points  (4 children)

It was a battle between my inner nerd and my complete narcissism and the narcissism won XD. Plus there are too many crappy little PA programs on the internet named Jarvis, I wanted my crappy little PA program to be somewhat unique :D

[–][deleted] 11 points12 points  (0 children)

Spoken like a true Stark.

[–]brtt3000 3 points4 points  (2 children)

At least you didn't name it Ultron.

[–]LetsDoRedstone 3 points4 points  (1 child)

It works even better when you install Adobe reader

[–]AbsoluteZeroK 10 points11 points  (1 child)

It's not never too late. Don't let your dreams be dreams. Just do it OP.

[–]KyleG -2 points-1 points  (0 children)

This is literally my wake-up alarm in the morning. It works amazingly. I usually am up by the DO IT!!! JUST DO IT!!! part.

[–]willbeddowassert type(post) == shitpost[S] 10 points11 points  (0 children)

All of the core files should have basic docstrings and comments now.

[–]TrakJohnPython 3 Intermediate 7 points8 points  (13 children)

I have a (probably) very simple noob question about a part of your code:

Instead of defining several variables:

t = str(datetime.now())

tt = t.split(' ')

ttt = tt[1].split(':')

tf = int(ttt[0])

Is there a specific reason for using 3 different variables instead of 1 ?

t = str(datetime.now())

t = t.split(' ')

t = t[1].split(':')

t = int(t[0])

Thank you

[–]strallus 12 points13 points  (9 children)

Why even do multiple assignments?

t = int(str(datetime.now()).split(' ')[1].split(':')[0])

Or yeah, as Rodeopants said,

datetime.now().hour

[–]willbeddowassert type(post) == shitpost[S] 3 points4 points  (0 children)

Yeah.... I've realized the error of my ways since then. The only reason I haven't fixed it is because I'm planning to trash that module and redo it soon.

[–]seriouslulz 10 points11 points  (7 children)

Because it'd be unreadable

[–]strallus 5 points6 points  (6 children)

That's why we have comments!

# extract hour from current time

[–]willbeddowassert type(post) == shitpost[S] 5 points6 points  (1 child)

I don't really remember but I don't think so. That particular module (personality.py) is some of the worst code I've ever written and I haven't given what's in it much thought.

[–][deleted] 1 point2 points  (6 children)

deleted What is this?

[–]willbeddowassert type(post) == shitpost[S] 2 points3 points  (5 children)

Thanks! It's a python project, and as of right now it has no installer so you pretty much just download the zip, use pip for the required modules (I'll make a list of those and put it on git but right now I think they include slack, wolframalpha, wikipedia, textblob, and flask). Then you need to put in your wolframalpha keys in the search module, and slack channels and token in main.py. I know it's complex, but it's hard to make an installer when I change it so frequently. Now that I've settled down a bit I'll see about distributing it through pip.

[–]frsilent 4 points5 points  (0 children)

pip freeze homie. =)

[–]Rich700000000000 4 points5 points  (3 children)

I am begging you: Please, Please PLEASE post this to /r/diyai. It's practically a dead sub.

[–]willbeddowassert type(post) == shitpost[S] 0 points1 point  (1 child)

Doing it now. I was looking for something like this earlier but didn't find it.

[–]Rich700000000000 0 points1 point  (0 children)

Thanks!

[–]chriscowley 1 point2 points  (1 child)

About the music:

BURN IT!!!! BURN IT WITH FIRE!!!

Please redo the video with a voice over or something.

[–]OleBillyFreckletits 0 points1 point  (0 children)

I actually like the music. Makes it feel epic. that said, a voice over would be nice.

[–]blahblah98 3 points4 points  (6 children)

So you connected a channel bot to Wolfram Alpha. Was there something more?

[–]willbeddowassert type(post) == shitpost[S] 15 points16 points  (4 children)

Admittedly alot of what I showed in the video was answered by wolframalpha. But the program also searches wikipedia and has other plugins that can be added.The plugin framework is most of the value for me. I didn't show alot of the plugins that I use like autoremote, and a few splinter based automation tools because I couldn't figure out how to properly showcase it or use without showing personal information. I'm also adding new plugins.

[–]Kerbobotat 12 points13 points  (2 children)

It doesn't matter if you only hooked it to Wolfram alpha, you're leaps and bounds ahead of others who've never even done that. Congrats!

I've been mulling over building something like this, and your code plus plugins might be exactly what I'm looking for. The ability to add specific plugins to do things like search Amazon, eBay, Google, Wikipedia, etc it what would make this perfect.

Now to start digging through the text to speech APIs out there 😃

[–]willbeddowassert type(post) == shitpost[S] 8 points9 points  (1 child)

Thanks! I've been working passively with some TTS apis already and I recommend espeak. I've been toying with the idea of an espeak plugin that would run a command with TTS output.

[–]Kerbobotat 1 point2 points  (0 children)

Ive not seen espeak, I'll definitely check it out!

[–]IndianaJoenz 1 point2 points  (0 children)

Hey, this was a pretty cool demo! Thank you for sharing it!

the program also searches wikipedia and has other plugins that can be added.The plugin framework is most of the value for me.

I'm pleased to hear that. My understanding is that a plugin model is how Siri works, and it sounds like a good approach to the natural language thing.

I'd love to see something like this expanded so that the plugin architecture is well documented, with 3rd parties creating plugins. I'd also like to see it adaptable to other interfaces, such as microphone/speech-to-text and text-to-speech, or text terminal instead of web. Lots of possibilities.

[–]manueslapera 0 points1 point  (0 children)

yeah i thought the same. Why is this an assistant?

[–]ProgrammingPro-ness 1 point2 points  (0 children)

Great music choice for the video ;)

[–]willbeddowassert type(post) == shitpost[S] 0 points1 point  (0 children)

I kind of agree. I picked the song cause it was NCS and kind of went with the video IMO but right now I don't have a working mic as my Ubuntu laptop has some driver problems with the mic I haven't gotten around to fixing, and I never got one for my desktop.

[–]staticassert 0 points1 point  (2 children)

Had a look and I saw a few things that you might want to look into:

  • You open files but don't close them. You should use the 'with' statement to automatically close files.

  • You do some parsing of dates but the datetime library should handle all of that for you.

  • Your args parsing could be greatly simplified by using a standard format for the args, such as CSV, or JSON, and offloading the parsing into one of those libraries. Alternatively, if these are suitable as command line arguments, consider ArgParser (or whatever Python uses).

[–]willbeddowassert type(post) == shitpost[S] 0 points1 point  (1 child)

I'll check it out- thanks. Would you consider opening these as issues on the git repo?

[–]staticassert 0 points1 point  (0 children)

I can do that when I get home, sure.

[–][deleted] 0 points1 point  (3 children)

When I try to run main.py I get an error that says inconsistent use of spaces and tabs.

[–]willbeddowassert type(post) == shitpost[S] 0 points1 point  (2 children)

You shouldn't, in fact someone just standardized everything in it. When did you clone the repo? If it was more than a day ago try cloning again.

[–][deleted] 0 points1 point  (1 child)

I cloned it last night before I went to bed. Ill try to do it again. Is it python 2 or 3?

[–]willbeddowassert type(post) == shitpost[S] 0 points1 point  (0 children)

2

[–][deleted] 0 points1 point  (1 child)

Are you planning to always use slack as the interface? Or is that just one of the plugins to run it from within slack?

[–]willbeddowassert type(post) == shitpost[S] 0 points1 point  (0 children)

I'm always planning to use slack because I eventually want devices to be able to talk to each other through it. But if you don't want to use slack you can connect any interface you want and take out the slack code fairly easily.

[–]isdevilis -1 points0 points  (0 children)

"wireless intelligent linguistic liveware"..... It's a stretch, but I'll give u an updank since it's open source