Giter Site home page Giter Site logo

dictdb's Introduction

Hi there ๐Ÿ‘‹

the-c0d3r

dictdb's People

Contributors

the-c0d3r avatar

Stargazers

 avatar

Watchers

 avatar  avatar

dictdb's Issues

[Bug] Delete Operation

When deleteing stuff, the program doesn't tell you if the word exist or not, it just try to wipe.

There are a few scenarios that needs to be taken care of.

What happens when the word doesn't exist?

Just print error, word doesn't exist?

What happens when the word is a partial match of one word?

Options: to delete the word, or not to delete the word and print that it is a partial match?

What happens when the word is a partial match of multiple words?

Options: delete all partial match words, or ask for confirmation?

[Bug] Edit mode, partial match, delete entry

Database content

a : test
aa : test aa

User triggers dictdb -e a. This will call the editor with both words, as they are partial match.

Delete the second entry aa : test aa from the editor. Save and quit.

dictdb -l still contains aa entry. It should have been removed.

Implementation

When triggering edit, keep track of which words are matched and presented to the editor. When the editor is closed, compare the final vs the old, delete the entry that has been deleted from final.

[Feature] Import dictionary (from txt)

Feature: Import dictionary (from txt)
Description: To be able to import a txt file into the database.

Design plan:

sample.txt

ablution : (noun) an act of washing oneself
abscond : (verb) leave hurriedly and secretly, escape, abandon a hive or nest
...

[Feature] Custom db location

Feature: Custom db location
Description: Application should allow user to specify where to save the database, preferably through a config file. This is to allow use cases where the user want to store the database file on a shared/synced cloud drive.

Design Plan:

  1. Create a file under ~/.config/dictdb/config.json
  2. create new variable in the json file "db_path": "/path/to/db"

[Feature] Interactive Mode

Feature: Interactive Mode
Description: Interactive console mode for adding, removing, updating entries, or doing anything that the program supports.

Design Plan:

./dictdb -i 

dictdb> help

add:   add a new entry
del:   delete the entry
mod:   modify the entry
purge: remove the entire dictionary
ls:    list the entries
count: get the count of the entries

dictdb> add 
dictdb.add> word: definition
dictdb => successfully added "word"
dictdb.add> back
dictdb>

[Feature] Official Dictionary Support

Feature: Official Dictionary Support
Description: The ability to lookup a word on official english dictionary instead of user created dictionary

Requirement:

  • The chosen dictionary should be free to use.
  • Dictionary should be hosted online somewhere to be downloaded if required.

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.