GithubHelp home page GithubHelp logo

yoda-pa / yoda Goto Github PK

View Code? Open in Web Editor NEW
730.0 28.0 152.0 47.23 MB

Wise and powerful personal assistant, available in your nearest terminal

Home Page: https://manparvesh.com/project/yoda/

License: MIT License

Python 99.88% Dockerfile 0.12%
dude personal-assistant cli diary vocabulary money python love chat chatbot

yoda's Introduction

yoda

Build status SonarCloud Quality Status License Project status Code style: black

Wise and powerful personal assistant, available in your nearest terminal


Install, how to

Requirements

  • python (both 2 and 3 are supported)
  • virtualenv (only for testing and development)
  • Python development package:
    • Ubuntu: sudo apt-get install -y libxml2-dev libxslt-dev python-dev libav-tools
    • Visual C++ 9.0 for Python (If using Windows)
    • python-devel package (If using MacOS/OSX: link)

Run, how to

1. Docker

  1. Install docker
  2. Run docker run --rm -it yodapa/yoda:latest yoda chat Hi

2. Using pip, without cloning

You can install yoda directly from the github repository using the following commands in shell. virtualenv yodaenv ./yodaenv/bin/pip install git+https://github.com/yoda-pa/yoda

3. Using pip, with cloning

Clone this repository and create a virtual environment using Python 2 in the cloned directory (virtualenv -p /usr/bin/python2 venv). Steps after that:

Instead of pip install --editable . you can use pip install . if you don't intend to make any changes in the code.

Use this package, how to

chat

Use the chat command to talk to the inbuilt chatbot for this project.

You can test the chat functionality on api.ai agent website here

dev

This command group contains some sub-commands that may be helpful for developers and tech-geeks.

  • speedtest: check your internet speed

  • url: URL shortener

  • hackernews: read hackernews articles

  • sitechecker: check if a site is up

    Usage:

    $ yoda checksite https://manparvesh.com
    
    $ yoda checksite https://manparveshs.com
    

  • whois: get whois records

    Usage:

    $ yoda dev whois google.com
    

  • grep: grep implementation

    $ yoda dev grep PATTERN FILE|FOLDER -r [True] -i [True]
    -r is the flag for recursive search. -i enables case insensitive search.
    Both are optional parameter and the flags are off if they are not provided.
    
    $ yoda dev grep \d+ modules/ -r True
    Will recursively search all files in modules directory for any line containing 1 or more digits.
    
    $ yoda dev grep yOdA modules/ -i True
    Will recursively search all files in modules directory for any line containing the word yoda.
    This search is case insensitive.
    
    $ yoda dev grep yOdA yoda.py -i True
    Will recursively search the file yoda.py for any line containing the word yoda.
    This search is case insensitive.
    
  • gif: Create gif from images

    $ yoda gif from_images --source SOURCE_DIR --output OUTPUT_FILE
    Will scan the source directory and generate a gif. File will be located at OUTPUT_FILE.
    e.g.
    yoda gif from-images --source tests/resources/gif_frames/ --output test.gif
    
    $ yoda gif from_images --source SOURCE_DIR --output OUTPUT_FILE --<param> <value>
    Will scan the source directory and generate a gif. File will be located at OUTPUT_FILE.
    <param> and <value> can be any keyword argument that imageio's mimsave function takes.
    e.g.
    yoda gif from-images --source tests/resources/gif_frames/ --output test.gif --fps 9
    will create a gif with 9 fps.
    
  • gitsummary: gets the summary of your github account

    $ yoda gitsummary GITHUB_LOGIN GITHUB_PASSWORD
    Uses the GIthub v3 API to get number of repos, commits (last 24hr), open pull requests (last 24hr) and open issues (last 24hr).
    
    e.g.
    $ yoda gitsummary SomeUsername MySuperS3cr3tP4ssw0rd!
    Fetching data. Patience you must have, my young padawan.
    
    SomeUsername, ready your GitHub statistics are.
    6 repositories you have.
    In last 24 hours 10 commit(s), 2 pull requests(s) and 3 issue(s) you made.
    
  • run: compile and run source codes written in different programming languages!

    $ yoda run tests/resources/test_code.py
    

  • fileshare: share files that are accessible only once

    $ yoda fileshare transport.png
    

  • keybindings: save key bindings

    # To add(or import) a keybindings file
    $ yoda dev keybindings add vim /absolute/path/to/keybinding/file.csv
    
    # To search keybinding action for a software
    $ yoda dev keybindings search vim move cusror
    Key Bindings:
    ---------------------------------------
        key       |          action
    ---------------|-----------------------
          h       |       move cursor left
          j       |       move cursor down
          k       |       move cursor up
          l       |       move cursor right
    
  • IP lookup: Get the geographical location of an IP address.

    $ yoda iplookup 23.20.227.213
    Virginia, United States
    

horoscope

See your horoscope

  • command keep
# To add a command to your keep
$ yoda keep save -k find -k text -k name 'find . -name "*.txt"' command used to find textfiles by name
# To show all commands
$ yoda keep findall
# To show commands by keywords
$ yoda keep find -k text
# To remove a command
$ yoda keep remove -i ##command index, showed when running find or findall##

goals

Create and complete goals, add tasks and analyze your progress.

# To set a goal (name, description, deadline)
$ yoda goals new

# To show list of ideas
$ yoda goals view

# To set a goal as completed
$ yoda goals complete

# To see number of completed/incomplete goals, missed deadlines etc.
$ yoda goals analyze

# To view tasks assigned to the goal
$ yoda goals tasks

Note: Use this module with diary module and assign new tasks to the goals by typing

$ yoda diary nt

and adding the goal names to the task when prompted to do so.

diary

This command can be used to maintain a personal diary, roughly based on the concept of Bullet Journal.

For creating and writing new note type

# For writing new note
$ yoda diary nn

# First give the title of the note.
# Second give the text of the note

# Viewing all notes.
$ yoda diary notes

# Updating note
# Choose the date and then the note to update
$ yoda diary un

# Deleting Note
# Choose the date and then the note to delete
$ yoda diary dn

For writing and viewing tasks.

# Writing new task
$ yoda diary nt

# Viewing all tasks
$ yoda diary tasks

# Change the status of task to completed
$ yoda diary ct

# Update task
# Choose the date and then the task to update
$ yoda diary ut

# Delete Task
# Choose the date and then the task to delete
$ yoda diary dt

# Delete all completed tasks for today
$ yoda diary dct
# type c to confirm the deletion

love

This command can be used to maintain a profile of someone you love, take notes and remember what they like.

money

For tracking money, this is.

Get your expenses per month

$ yoda money exps_month
$ Sep: spent 75 USD
$ Nov: spent 15 USD
$ Dec: spent 125 USD

Convert currency

$ yoda money convert
Enter currency codes seperated by space:
INR USD
₹ 1 = US$ 0.0136
Enter the amount in INR to be converted to USD
100
100 INR = 1.36 USD

leaselist

Keep a record of things people have taken from you, and the things you have taken from them - to remind them / yourself to return

# To add an item
$ yoda leaselist add

# To show list of items lent/borrowed
$ yoda leaselist show

# To remove an item from the list
$ yoda leaselist remove

Idea list

For creating list of ideas, type

# To add idea
$ yoda ideas add --task <task_name> --inside <project_name>

# To show list of ideas
$ yoda ideas show

# To remove a task from idea
$ yoda ideas remove --task <task_name> --inside <project_name>

# To remove an idea completely
$ yoda ideas remove --project <project_name>

IP lookup

Get the geographical location of an IP address.

$ yoda iplookup 23.20.227.213
Virginia, United States

Custom cummands

Set a custom command.

$ yoda cc pwd
$ yoda pwd
/home/alex/git-clones/yoda

learn

This command group contains commands that, helpful in learning new things, will be.

  • vocabulary: For enhancing your vocabulary and tracking your progress.

  • flashcards: for learning anything! (inspiration)

    # create new set (remember to keep the name to one word)
    $  yoda flashcards sets new english
    
    # modify set
    $  yoda flashcards sets modify english
    
    # list all sets
    $  yoda flashcards sets list
    
    # select a study set
    $  yoda flashcards select english
    
    # create new card in selected set (card name length can be more than 1 word)
    $  yoda flashcards cards new Oxford comma
    
    # Know which set is selected and its information
    $  yoda flashcards status
    
    # study the selected study set. This will show you all the cards in a study set
    # one by one.
    $  yoda flashcards study
    
  • dictionary: to get definition, synonym, antonym and example of a word. This definition or synonym search will be automatically saved, so that while you are working on your vocabulary, you can come through the new word as well.

    $ yoda dictionary define car
    A few definitions of the word "car" with their parts of speech are given below:
    ---------------------------------
    noun: a motor vehicle with four wheels; usually propelled by an internal combustion engine
    noun: the compartment that is suspended from an airship and that carries personnel and the cargo and the power plant
    noun: where passengers ride up and down
    noun: a wheeled vehicle adapted to the rails of railroad
    noun: a conveyance for passengers or freight on a cable railway
    This word already exists in the vocabulary set, so you can practice it while using that
    
    $ yoda dictionary synonym car
    A few synonyms of the word "car" are given below:
    ---------------------------------
    auto
    automobile
    machine
    motorcar
    gondola
    elevator car
    railcar
    railroad car
    railway car
    cable car
    This word already exists in the vocabulary set, so you can practice it while using that
    
    $ yoda dictionary antonym car
    Sorry, no antonyms were found for this word
    
    $ yoda dictionary example good
    A few examples of the word "good" are given below:
    ---------------------------------
    weigh the good against the bad
    among the highest goods of all are happiness and self-realization
    a good friend
    
    

Aliasing

This command allows you to alias cumbersome commands.

# before: shortening a url
$ yoda url shorten google.com

# alias shorten to be s
$ yoda alias new "shorten" "s"

# can now use s in place of shorten
$ yoda url s google.com

# or alias the whole command as us
$ yoda alias new "url shorten" "us"
$ yoda us google.com

# show your current aliases
$ yoda alias show

# delete aliases
$ yoda alias delete "us"
$ yoda alias delete "s"

ascii_transfrom

This command outputs transformed ascii version of a given image.

    # give the path of the image you want to transform
    $ yoda ascii_transform logo.png

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%..S%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%..+.?%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%..SSS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.+..+..+?%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%..SSSSS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%..+..+..+..%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%SSSSS++%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...+.....+...%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%SSS++++%%%%%%%%%%%%%%%%%%%%%%%%%%%..............S%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%S+++++.%%%%%%%%%%..........?%%%................%%%%..........%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%++++...%%%%%%%%%%SSS............+++....+++.............SSS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%++.....%%%%%%%%%SSSS.........+....+.+....+..+......SSS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%.....**%%%%%%%%SSSSS...+..+......+.............SSSS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%...****%%%%%%%SSSSSS...........+......+..+.SSSSS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%.******%%%%%%SSSSSS......@@.....@@......SSSSS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%*****%%%%%%SSSS.......@[email protected]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%******%%%%%%%%SS..........SSS.........%S%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%..******%%%%%%%%%%%......................%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%....****%%%%%%%%%%%%%%.......S.............%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%++.....*%%%%%%%%%%%%%%%%%%.....%%%.S.........%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%++++....%%%%%%%%%%%%%%%%%%%%%?......%%%%%%...%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%S+++++..%%%%%%%%%%%%%%%%%%%%%%%%%............?%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%SSSS++++%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.........%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%.SSSSS++%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%......?%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%..SSSSS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%..SSS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%..%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.SSSSS++++++......*****%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.SSSSS++++++......*****%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.SSSSS++++++......*****%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Weather

This command obtains the weather information of a specified location using wttr as the weather service.

people

This is an inbuilt people manager that can be used to save profiles of people and related information, like their birthdays, likes, and some personalized notes for them.

# To add people(or a friend)
$ yoda people setup

# To show added friends
$ yoda people status
--------------------------------------
     Mob    |     DOB    |   Name
------------|------------|------------
 7503160111 | 1994-06-26 | Joy
 7503160112 | 1994-05-26 | Lobo

# To add what people like(or a friend likes)
$ yoda people like

# To add personalized notes for people(or friend)
$ yoda people note

# To view likes of your added people
$ yoda people likes
Joy
Likes:
1: #petry
2: #acting

# To view personalized notes for added people(or friend)
$ yoda people notes
Lobo
Notes:
1: stop saying start doing
2: keep chin up

lyrics

This command can be used to get the lyrics of a song.

$ yoda lyrics
Enter the artist name:
imagine dragons
Enter the title name:
thunder
--------Lyrics--------
Just a young gun with a quick fuse
I was uptight, wanna let loose
I was dreaming of bigger things in

food

Use this command to get suggestions related to food.

# To get a restaurant suggestion in your city:
$ yoda food suggest_restaurant
What city are you in? Berlin
What type of food are you interested in? Chinese

Why don't you try THIS restaurant tonight!

Shaniu's House of Noodles on Pariser Str. 58
Book a table at +493091552605


# To get a drink suggestion
$ yoda food suggest_drinks
Like you need a drink you look.  Hmmmmmm.
---------------------Jello shots---------------------
Ingredients:
Vodka x 2 cups
Jello x 3 packages
Water x 3 cups
Instructions: Boil 3 cups of water then add jello. Mix jello and water until jello is completely disolved. Add the two cups of vodka and mix together. Pour mixture into plastic shot glasses and chill until firm. Then, eat away...


# To get a recipe suggestion
$ yoda food suggest_recipes
Categories: American, British, Canadian, Chinese, Dutch, Egyptian, French, Greek, Indian, Irish, Italian, Jamaican, Japanese, Kenyan, Malaysian, Mexican, Moroccan, Russian, Spanish, Thai, Unknown, Vietnamese

Choose a category above or type 'Random' for a random recipe suggestion: Random

---------------------Spicy Arrabiata Penne---------------------

Ingredients:
penne rigate x 1 pound
olive oil x 1/4 cup
garlic x 3 cloves
chopped tomatoes x 1 tin
red chile flakes x 1/2 teaspoon
italian seasoning x 1/2 teaspoon
basil x 6 leaves
Parmigiano-Reggiano x spinkling

Instructions: Bring a large pot of water to a boil. Add kosher salt to the boiling water, then add the pasta. Cook according to the package instructions, about 9 minutes.
In a large skillet over medium-high heat, add the olive oil and heat until the oil starts to shimmer. Add the garlic and cook, stirring, until fragrant, 1 to 2 minutes. Add the chopped tomatoes, red chile flakes, Italian seasoning and salt and pepper to taste. Bring to a boil and cook for 5 minutes. Remove from the heat and add the chopped basil.
Drain the pasta and add it to the sauce. Garnish with Parmigiano-Reggiano flakes and more basil and serve warm.

feedback

To create an issue in the github repository simple thing that shows a link. Yeesssssss.

ciphers

Use this command to encrypt or decrypt text using various classical ciphers

$ yoda ciphers encrypt
0: Atbash
1: Caesar
2: ROT13
3: Vigenere
Choose a cipher: 3
The text you want to encrypt: Mary had a litle lamb
The encryption keyword: mango
ZBFF WNE O SXGUZL ANNP

$ yoda ciphers decrypt
0: Atbash
1: Caesar
2: ROT13
3: Vigenere
Choose a cipher: 3
The text you want to decrypt: ZBFF WNE O SXGUZL ANNP
The encryption keyword: mango
MARY HAD A LITTLE LAMB

Packages and services used

Contribute, you must

Please refer to the contributing guidelines for contributing to this project. This project was made possible by contributions from many awesome people.

In the news

Changelog

v1.0.0

Related milestone: v1.0.0

Changes in this version:

  • Docker setup
  • Load modules on demand
  • Mock external services in tests
  • Support for custom commands
  • Currency conversion
  • Weather functionality
  • Money Manager: monthly expenses
  • Gif creator
  • Site checker
  • IP Lookup
  • Grep
  • Horoscope
  • Suggest drinks
  • Suggest recipes
  • Small bug fixes and improvements

v0.4.0

Related milestone: v0.4.0

Changes in this version:

  • Added goals and analysis
  • Added reading list
  • Enhancements to diary
  • Better documentation and code quality than before
  • Added more tests
  • Security alert fixes
  • Various bug fixes

v0.3.0

Related milestone: v0.3.0

Changes in this version:

  • Support for both Python 2 and Python 3
  • Command aliasing
  • Port scanning
  • More features in love module
  • Hackernews
  • yoda inspire
  • Increased test coverage
  • Bug fixes

v0.2.0

Related milestone: v0.2.0

Changes in this version:

  • Idea list
  • Reading list
  • Automated tests
  • Test coverage
  • Custom config directory location
  • Minor bug fixes

v0.1.0

Initial release.

yoda's People

Contributors

abelarm avatar alexandruvaleanu avatar alfredosequeida avatar c-shekhar avatar churyan7 avatar csaranbalaji avatar dragonghost7 avatar dragosdumitrache avatar erawpalassalg avatar felipefin avatar groovychoons avatar hargonix avatar jrbr avatar khukhunashvili avatar kkhsing avatar lopezjorge1 avatar man-jain avatar manparvesh avatar mondaini avatar saurabh-kumar-vit avatar siejqa avatar skcse avatar slin63 avatar thornycrackers avatar tirkarthi avatar vvv-aa avatar wasv avatar wcollins3 avatar ybfe1853 avatar zuziik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yoda's Issues

Reading list

Feature description:

Feature to add a reading list, where the user can add articles, books, etc to their lists, and read whenever they want in the future.

Search notes

Feature description:

Functionality to search in previous notes (using something like fuzzy search, maybe?)

Ideas on how to implement:

whoosh seems like a good library to be tried.

Analysis of the current month's tasks

What should happen?

Analysis of the current month's tasks

  • What percentage of them were completed
  • How frequently the entries were made, etc

Any ideas on how to implement it?

  • Go through all the files in the diary folder (/diary/) with the name that matches the current month and year, and check the completed and incomplete tasks

Pin down version in requirements.txt

Cool project. It seems that requirements.txt doesn't have pinned version of the libraries and this could result in a build that might behave differently at different points of time since latest versions are always installed. I think it's better to have pinned versions. I tried installing it and did a pip freeze. I will raise a new PR.

I could also see different a setup.py that seems to have slightly different dependencies compared to requirements.txt . A note on README on how to build and test it will be helpful.

Thanks.

yoda chat return html code (error)

What are the steps to reproduce this issue?

just type yoda chat how are you or something

What happens?
yoda answers just with html (error code).
here it is
Yoda speaks:
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta charset="utf-8"> <title>Application Error</title> <style media="screen"> html,body,iframe { margin: 0; padding: 0; } html,body { height: 100%; overflow: hidden; } iframe { width: 100%; height: 100%; border: 0; } </style> </head> <body> <iframe src="//www.herokucdn.com/error-pages/application-error.html"></iframe> </body> </html>

What versions of software are you using?
macOS 10.12.6

Idea list

Feature description:

An encrypted list where one can store their ideas, with descriptions. For more ideas that can be added to this list, one can take a look at this repository.

Build failing due to idea list

Details

  1. Check build #151

Any ideas on how to fix it?

  • In the implementation of idea list, the cypher key is being taken from userconfig, which is not created by default in the beginning.
  • Maybe adding a different cypher key to the idea list will help

Error while showing accuracy before getting a word

What are the steps to reproduce this issue?

dude vocabulary accuracy before dude vocabulary word

What happens?

Error trace is shown

What were you expecting to happen?

A simplified message should be shown

What versions of software are you using?

Operating System: Ubuntu 16.04.02 LTS

Make the code pep8/pyflakes compliant

Feature description:

It would be better if code be pep8/pyflakes compliant

Any ideas on how to implement it?

either run autopep8 on the code or manually fix the errors.

Any other comments?

I would like to take this up.

Any feedback on the project?

The project looks cool.

Use locally built NLP model

Feature description:

Instead of using an external service (api.ai), we can make our own models specific to our needs.
This can be used in:

  • money
  • chat
  • keybindings (not yet implemented)

Any ideas on how to implement it?

Not yet

Unable to run after setup

What are the steps to reproduce this issue?

  1. Install yoda according to the steps mentioned in README (without using --editable while installing)

What happens?

Traceback (most recent call last):
  File "/home/mp/Desktop/github_repos/yoda/venv/bin/yoda", line 11, in <module>
    load_entry_point('yoda==0.1.0', 'console_scripts', 'yoda')()
  File "/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 570, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2751, in load_entry_point
    return ep.load()
  File "/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2405, in load
    return self.resolve()
  File "/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2411, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/yoda.py", line 6, in <module>
    from modules import *
  File "/home/mp/Desktop/github_repos/yoda/modules/learn.py", line 30, in <module>
    for line in pkgutil.get_data('yoda', 'resources/vocab-words.txt').split('\n'):
  File "/usr/lib/python2.7/pkgutil.py", line 591, in get_data
    return loader.get_data(resource_name)
  File "/usr/lib/python2.7/pkgutil.py", line 255, in get_data
    return open(pathname, "rb").read()
IOError: [Errno 2] No such file or directory: '/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/resources/vocab-words.txt'

What were you expecting to happen?

Should work properly

What versions of software are you using?

Operating System: Ubuntu 16.04
yoda: 0.1.0

Add gif demos

Since there are many features in yoda, it'll be better to have gif demos in the readme showing all the features.

Add git module

Feature description:

  • Save credentials to make it convenient for the user
  • Know status of all the git repos (pretty display of git commits, I remember seeing a github repo for that)
  • Agenda (show all the repos worked on in the past and suggest which ones should be worked on depending on code coverage etc) (creating a roadmap, basically)
  • Push all (or something similar with which the day's work can be automatically pushed to remote host)

Test failure in speedtest due to server unavailable

What are the steps to reproduce this issue?

  1. Install yoda
  2. Run yoda speedtest

What happens?

Stacktrace is shown and it says that server is not found

What were you expecting to happen?

Get speedtest

What versions of software are you using?

Operating System: Ubuntu 18.04

Travis build checker failing .travis.yml

I'm not entirely sure about this, but it seems like my pull requests are failing because Travis fails when attempting to run the "py.test" command to check for passing builds.
Might removing the script phase, or adding in a temporary testing file solve the issue?
0072baac95c63e6a34b74d5b9ce2fd50

Error message when trying to use yoda chat when system is offline

If I try to use the yoda chat feature when my system is offline, it hits me with a big python error message about socket error
socket.gaierror: [Errno -2] Name or service not known

What are the steps to reproduce this issue?

  1. Go offline
  2. Try any of the yoda chat commands

What happens?

There is no error checking at response = request.getresponse().read(), so when it does not get a proper response it throws the error.

How to solve it

We can easily solve this issue by using try catch blocks to encapsulate the part where we make the request. So when ever the request fails we can give the user a friendly reminder to go online instead of the error message.

I would love to implement this and contribute to the project.

Set goals and do analysis

What should happen?

  • User should be able to set a target / goal (can set a date, or just weekly / monthly).
  • One should be able to check their goal and their set dates for completion
  • One should be able to set tags in their daily tasks added to the diary which automatically add the task to the goal (by using hashtags?)

Any ideas on how to implement it?

  • Create a different folder with the config file containing the names of the goals with their completion status and deadlines.
  • Create a different file for every goal (keeping in mind the filename conflicts) and add the tasks to it

colored output not working

What are the steps to reproduce this issue?

  1. Run any command that uses chalk to output

What happens?

Nothing is displayed

What versions of software are you using?

Operating System: Ubuntu 16.04

Suggestions on how to fix

Find a different library to output colored text or just use print statements (in this case, click.echo would be better than print statements)

Notes with titles

Feature description:

Option to add a note which is kind of an article, with title and content, and the user can add notes to it.

Error handling for dev module

Similar to #39 the dev module also makes requests to several API calls in its commands. None of these have error handling around the API call.

In this issue I would like to fix all of them by adding error handling and simple user friendly response in case the user is offline.

"modules" module is not being found

*I am new to open source and have found this error when trying to run my local copy of "yoda". I am posting partly to see if there are mistakes in my running of this and also because I would be happy to work on this issue.

Reproduce the bug:

  1. git clone https://github.com/yoda-pa/yoda
  2. virtualenv venv
  3. . venv/bin/activate
  4. pip install .
  5. yoda

============

The console outputs an error "ImportError: No module named modules".

The console says this happens in:
File "/home/akhil/open_source/yoda/venv/local/lib/python2.7/site-packages/yoda.py", line 4, in
from modules import *

Possible solution:
So I think the issue here is that when Python searches for a file it only looks with in the current directory, and the "yoda.py" that is being run is not in the top most directory in the repository. It exists within the "/venv/local/lib/python2.7/site-packages/" directory; however, the "modules" sub-directory needs be accessed from the "yoda" main directory.

Using: version 0.1.0 on Ubuntu 16.04

Not able to install yoda

I have forked this project and cloned on my machine.
I have created python 2.7 virtual env using anaconda.
But when I try to install yoda using "pip install ." command.
It fails for pychalk library
Am I doing something wrong ?

yoda_install_1

yoda_install_2

setup command not working

For installing yoda as mentioned in 'contribution.md'

For bug reporting

the steps to reproduce this issue?

  1. $ git clone https://github.com/yoda-pa/yoda
  2. $ cd yoda
  3. $ virtualenv -p /usr/bin/python2 venv
  4. $ . venv/bin/activate
  5. $ pip install .
  6. $ yoda

What happens?

  1. After install i used a command "yoda chat hi"
    it works yeh!
  2. then i used a comman "yoda setup new"
    this command keeps on running until i close it.
    same happens with command "yoda money setup"

operating system - ubuntu 16.04

Add tests

Description:

Add automated tests to the project. Currently, the Travis build simply runs pytest, but since there are no tests, it passes.

This task will take a considerable effort.

Checklist:

  • chat
  • dev
    • speedtest
    • url
  • diary
    • notes
    • tasks
      • analysis
  • learn
    • vocabulary
    • flashcards
    • define
  • life
    • reading list
    • ideas
  • love
  • money
  • setup
  • feedback
  • util

Logo

I need to make a logo that shows a command prompt with the dude's face.

ImportError: No module named config

I forked, cloned, and followed the steps of making the venv and installing requirements with pip. There were no errors reported during the installation of requirements. When I run yoda I get an ImportError stating that there is no config module. I had to copy config.py(c) from the project root into the site-packages\modules folder. I then had the same issue with util.py(c). After that I was able to run yoda successfully.

As an aside, I find it unusual to see a package like this where you install the 'production' code and execute it i.e. pip install . I think it would be an improvement to move the dependencies to requirements.txt and have the instructions simply call out pip install -r requirements.txt. The problem this causes for me anyway, maybe I'm missing something obvious, is that when i make a change to the project code, I do not see that reflected by running yoda. It is also not obvious to me where the entry point of the app is if, for example, i wanted to run it from within my IDE or from the command line with python <filename>.py.

What are the steps to reproduce this issue?

  1. Make virtualenv
  2. pip install .
  3. yoda

What happens?

File "c:\users\barry\pycharmprojects\yoda\venv\yoda\lib\site-packages\modules\setup.py", line 13, in <module> from config import get_config_file_paths ImportError: No module named config

What were you expecting to happen?

For yoda to run normally

What versions of software are you using?

Operating System: Windows 7 Ultimate 64 bit
Python version: 2.7

IndexOutOfBounds

What are the steps to reproduce this issue?

  1. Run the command "dude diary ct".
  2. When it asks for the task number enter any number which is greater than the task number in the given list.

What happens?

The program crashes and generate a very unpleasant error message stating index out of range.

What were you expecting to happen?

It should have presented the error in nice way like re-ask for the same task number by displaying messages like "You had input a wrong task number before" or something like that!

What versions of software are you using?

Operating System: Ubuntu Gnome 16.04.02

Feature description:

NA

Any ideas on how to implement it?

You can make a conditional check for the input to be less than the maximum task number. Loop to prompt for the input by displaying proper error message!

Any other comments?

NA
Any feedback on the project?

Very nice and interesting project

URL shortener not working

What are the steps to reproduce this issue?

  1. While using Python 2:
  2. Install yoda
  3. Run yoda url shorten <some url>. This works fine
  4. RUn yoda url expand <shortened url>. Doesn't work
  5. While using Python 3:
  6. Install yoda
  7. Run yoda url shorten <some url>. Doesn't work

What happens?

It says command doesn't exist.
The tests are also failing because of this.

What were you expecting to happen?

To shorten/expand URLs

What versions of software are you using?

Operating System: Ubuntu 16.04

Idea list not able to create project

What are the steps to reproduce this issue?

  1. install yoda
  2. try to create an idea

What happens?

$ yoda ideas add --task "demo text" --project "demo project" --inside "demo inside"                                                                                                                 Brief desc of the current task : 
something and something else
Traceback (most recent call last):
  File "/home/mp/Desktop/github_repos/yoda/venv/bin/yoda", line 11, in <module>
    load_entry_point('yoda', 'console_scripts', 'yoda')()
  File "/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/mp/Desktop/github_repos/yoda/modules/life.py", line 346, in ideas
    sub_commands[subcommand]((project or inside), task)
  File "/home/mp/Desktop/github_repos/yoda/modules/life.py", line 253, in add_task
    with open(IDEA_CONFIG_FILE_PATH, 'w') as f:
IOError: [Errno 2] No such file or directory: '/home/mp/.yoda/life/ideaconfig.txt'

Improve tests

Description:

The existing tests are okay, but not very thorough. Some of the parts of the modules still lack tests.

Checklist:

  • learn
    • flashcards
  • life
    • reading list
    • ideas
  • setup

Related to: #16

Stacktrace displayed when adding an invalid expense

For bug reporting

What are the steps to reproduce this issue?

  1. Run yoda money exp
  2. Enter specdt 30 dollars on icecream
  3. This response will be saved to the expense, but while reading this will show an error.
  4. Run yoda money exps to show the expense

What happens?

A stacktrace will be shown

What were you expecting to happen?

No stacktrace should be shown.

Implementation ideas

This invalid expense shouldn't have been added to the expense list in the first place. Just show an error while adding this expense.

What versions of software are you using?

Operating System: Ubuntu 16.04

Online storage of configuration folder

Feature description:

User should be able to save their config somewhere online so that they can sync their data over different devices.

Any ideas on how to implement it?

Possible solution can be creating a github repository and saving the data to it after the user enters a command.
I was able to initialize a repo inside the config file, stage the changes and commit to the file using dulvich, but I was not able to connect it to github. I tried PyGithub, but no luck.

Analyzing data before getting a new word

Feature description:

In the vocabulary module, a new word is chosen at random, but I want it to analyze the previous accuracy results of the words and get a word accordingly.

Any ideas on how to implement it?

For example, we can set the weights for the words used, and sometimes words are chosen from there and sometimes new words are shown.

Fix tests

Description

After changing chalk.<color> to click.echo(chalk.<color>), some tests are failing because of difference in the outputs

View previous day or week's notes

Feature description:

Add functionality to view notes from previous days by simply writing yoda diary notes yesterday or something similar

flashcards select command does not work as described in the docs

For bug reporting

What are the steps to reproduce this issue?

  1. $ yoda flashcards sets new english
  2. $ yoda flashcards select english

What happens?

Prints "Command does not exist!"

What were you expecting to happen?

Select study set and print "Selected study set: english"

What versions of software are you using?

Operating System:
Ubuntu 16.04

It works perfectly with the command "yoda flashcards sets select english". I'm not sure whether it works as intended right now or should work as described in the docs. I can make the fix if it should indeed behave that way

Hackernews error when description is None

What are the steps to reproduce this issue?

  1. $ yoda hackernews

What happens?

Continue? [press-"y"]

News-- 7/575

Title--  A Taxonomy of Technical Debt | Hacker News
Traceback (most recent call last):
  File "/Users/joey/Environments/yoda3.6_env/bin/yoda", line 11, in <module>
    load_entry_point('yoda', 'console_scripts', 'yoda')()
  File "/Users/joey/Environments/yoda3.6_env/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/joey/Environments/yoda3.6_env/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/joey/Environments/yoda3.6_env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/joey/Environments/yoda3.6_env/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/joey/Environments/yoda3.6_env/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/joey/Projects/yoda/modules/dev.py", line 137, in hackernews
    click.echo('Description-- ' + result['articles'][index]['description'])
TypeError: must be str, not NoneType

This only occurs when the description = null (confirmed by crosschecking https://newsapi.org/v2/everything?sources=hacker-news&apiKey=534594afc0d64a11819bb83ac1df4245)

What were you expecting to happen?

Expected command to continue to run as intended.

What versions of software are you using?

Operating System:
Mac OS 10.13.4

Suggestion

Allow the bot to understand any format of language:

Current:
'yoda speedtest'

New:
'yoda do a speedtest'
'yoda can you please do a speed test'

Current:
'yoda define amazing'

New:
'yoda find the definition for amazing'

Just generally allowing versatility for language.

Keyboard shortcuts

Feature description:

There should be a feature to get and search keybindings for different software packages and tools, like eclipse, vim, etc.

  • The user should be allowed to add more lists
  • They can search for keybindings in a list
  • [big] use natural language queries to understand and reply appropriate key-binding for the query
  • [todo] divide this into smaller tasks

Any ideas on how to implement it?

  • Add this in dev module
  • Import lists as csv files
  • while searching for what a keyword does, instead of accurate match, use partial search as well

Unable to load resources when in a different folder

What are the steps to reproduce this issue?

  1. Install dude
  2. move to a different folder in a terminal
  3. run dude vocabulary word

What happens?

It can't find the text file containing words and their meanings.

What were you expecting to happen?

Should display a word

What versions of software are you using?

Operating System: Ubuntu 16.04.02 LTS

Any ideas on how to fix it?

On installation, save the resources folder to local and access from there later.

Yoda not running

What happens?

  • Install and write yoda
  • output:
Traceback (most recent call last):
  File "/home/mp/Desktop/github_repos/yoda/venv/bin/yoda", line 11, in <module>
    load_entry_point('yoda', 'console_scripts', 'yoda')()
  File "/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 570, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2755, in load_entry_point
    return ep.load()
  File "/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2409, in load
    return self.resolve()
  File "/home/mp/Desktop/github_repos/yoda/venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2415, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/mp/Desktop/github_repos/yoda/yoda.py", line 6, in <module>
    from modules import *
  File "/home/mp/Desktop/github_repos/yoda/modules/life.py", line 217
    task.append((task_name, desc))										# a new entry created
                                                                ^
IndentationError: unindent does not match any outer indentation level

Weird text in yoda setup

What are the steps to reproduce this issue?

  1. yoda setup

What happens?

$ yoda setup new
Tell me your name, yoda:

What were you expecting to happen?

sensible text

What versions of software are you using?

Operating System: Ubuntu 16.04

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.