Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thomasballinger/phonebook
https://github.com/thomasballinger/phonebook
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/thomasballinger/phonebook
- Owner: thomasballinger
- Created: 2014-04-21T21:36:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-04-21T21:36:51.000Z (over 10 years ago)
- Last Synced: 2024-10-10T19:11:16.628Z (29 days ago)
- Language: Python
- Size: 105 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Build a command line tool that manages phone books, via the interface below.
Things that should work:
$ phonebook create hsphonebook.pb
created phonebook hsphonebook.pb in the current directory
$ phonebook lookup Sarah -b hsphonebook.pb # error message on no such phonebook
Sarah Ahmed 432 123 4321
Sarah Apple 509 123 4567
Sarah Orange 123 456 7890$ phonebook add 'John Michael' '123 456 4323' -b hsphonebook.pb # error message on duplicate name
$ phonebook change 'John Michael' '234 521 2332' -b hsphonebook.pb # error message on not exist
$ phonebook remove 'John Michael' -b hsphonebook.pb # error message on not exist
$ phonebook reverse-lookup '312 432 5432'
You should also write tests. (<--- this is important, it's half of the assignment!)
Optional extra tasks when you're done:
* make lookup the default command
* allow search by partial name - not just beginning of name
* allow `-b phonebook.rb` to occur anywhere in command
* case insensitive search
* make names work without using quotes
add a config file where you can specify a default phone book to use. Add commands to edit this file without having to edit it manually
* implement a sql database backend if you didn't already
* implement a http backend (`phonebook lookup Tom -b 'http://mywebsite/phonebook'` etc.)
* Add tab completion