Coder Social home page Coder Social logo

define's People

Contributors

coldsauce avatar professorjamesmoriarty avatar radek-sprta avatar sethdusek 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

Watchers

 avatar  avatar  avatar  avatar  avatar

define's Issues

Audio does not work

I get this error whilst using the --audio flag:

bash: play: command not found

I suggest using mplayer, which can fetch the audio file by itself without the need of wget.
If mplayer is out of the question, fix the package dependencies.

The program prints an error when no definition is found

The program prints out this error when the searched string has not been found on Wordnik.

Traceback (most recent call last):
  File "/usr/bin/define", line 24, in <module>
    print(rem[i].upper() + ": \n" + client.getDefinitions(rem[i])[0].text)
TypeError: 'NoneType' object has no attribute '__getitem__'

error

HTTP issues

This issue is, actually, #16 , #22 and #23 but they were closed by the childish maintainer of this project. No need to add a proper description, just read those, other than #23 which was changed by the aforementioned childish maintainer.

Language

In this code, it is assumed that the user wants the English definition. Perhaps this could be fixed by using the system dictionary?

HTTP use causes privacy issues

This software, needlessly, uses a website to define words. This is a privacy issue, for many obvious reasons. The first of which is a simple MITM attack, and the worst of which is data collected by the service used itself. There are, at least, access logs containing the users' IP addresses, and SethDusek5, himself, says that stats are collected on the words users define.

This also brings up issues where this project is wasting bandwidth, making HTTP requests when you could obviously just look for the definition in a file easily.

Support for multiple definitions

Almost all words are not limited to one definition. And usually the Wordnik web-interface shows a few of them alongside with the corresponding part of speech. It would be nice for this program to do the same.

Way sound is being played is not compatible with every system.

I know this has been referenced in a previous issue: #5 however, the fix was add a dependency to an Arch package. For people installing this from source or people using operating systems where play is not available, that isn't an adequate fix.

Getting sound to work on every platform is a nightmare (I just tried :D ) I guess that's why libraries exist..

Here's a good page that lists a few external dependencies we could use to play sounds programatically.

https://wiki.python.org/moin/PythonInMusic

API Keys

Your current code has API keys for services used, you should either remove all such items and services. This application is infringing on the rights of users. People want to be able to freely look up a term in a dictionary of their language. The best way to do this is to use the dictionaries already present on the system.

Do not use services that log requests made by users, and, certainly, not with your API keys. Your users are not you.

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.