Store and tag your favorite contact cards
Purpose of this very simple tool is to :
- create contact cards
- store cards into database
- search for contacts using tags
Some modules are packaged with application :
Following python modules are required :
Modules could be installed using following command:
$ pip install -r requirements.txt
manage.py --init
(see section Run
)
First, you will have to generate SHA-256 password from the user admin
(password will be tagscards
here):
$ python3
>>> from werkzeug.security import generate_password_hash
>>> print( generate_password_hash("<your_admin_password>","sha256") )
sha256$zwmdPo4e$59122744f59e7197a396c3db3fa340eba975ae2316b5685e3e3091a6e932a024
Then, using RethinkDB Data Explorer (http://localhost:8080/#dataexplorer
), you will initialize the database :
- create database
<your_database_name>
- create table
contacts
- create tables
users
(different than RethinkDB internal one) - create user
admin
r.dbCreate('<your_database_name>')
r.db('<your_database_name>).tableCreate('contacts')
r.db('<your_database_name>).tableCreate('users')
r.db('<your_database_name>).table('users').insert({
username: 'admin',
email: '<your_email>',
password: '<your_hashed_password>'
})
A sample of settings is located into web/config-sample.py
file.
You should first copy that sample file to web/config.py
:
cp web/config-sample.py web/config.py
Then, edit the web/config.py
file to setup following variables :
...
# setup
TAGSCARDS_DATABASE = '<your_database_name>'
TAGSCARDS_PASSWORD = '<your_admin_password>'
TAGSCARDS_FULLAUTH = False (True if you want authentication for all pagesr)
TAGSCARDS_TIMEOUTS = <timeout_session>
# database
RETHINKDB_HOST = 'localhost'
RETHINKDB_PORT = 28015
...
Finally, use script manage.py
ro init to database and run the flask server :
$ ./manage.py --help
Usage: ./manage.py [options]
Options:
-b, --bind=ADDRESS bind to specific ip ADDRESS (default 0.0.0.0)
-d, --debug run in debug mode (default False)
-i, --init initialize database, tables and user admin
-h, --help display this help and exit
-p, --port=PORT listen to specific PORT (default 8000)
-t, --thread run in threaded mode (default False)
$ ./manage.py --init
[1/4] database "test" created !
[2/4] table "contacts" created !
[3/4] table "users" created !
[4/4] user "admin" created (password="tagscards") !
$ ./manage.py --thread
Contacts can be imported from CSV file:
- CSV file must contain one contact per line
- Each line must contain fields must be separated with semicolons
- Required fields are
fullname;role;email;pgp;phone;website;tags
- Tags must be separated with commas
tag1,tag2,tag3
Joe Smith;Unix Administrator;john.smith@company.com;0x12345678;11-22-33-44;http://github.com/;unix,admin
John Doe;Security Analyst;john.doe@company.com;0x12ABCDEF;55-66-77-88;http://github.com/;security,analyst
Foo Bar;Windows Administrator;foo.bar@company.com;0x98765432;12-34-56-78;http://github.com/;windows,admin
- Bootstrap 4 ready
- Tags input with auto-completion
- Admin user authentication
- Sorting (asc/desc) on columns
- Export contacts as JSON/CSV files
- Export contacts as EMAIL recipients
- Export to vCard
- 🔒 Bulk mode to add/del tags
- 🔒 Import from CSV
- 🔒 Users management
-
bootstrap 4 integration -
autocompletion for tags input -
search with multiple tags -
actions to add/edit/delete records -
add PGP field -
add position field -
add website field -
add sort asc/desc on fields -
add icons support -
fields text search support -
login/logout functions -
add session timeout -
export as vCard format -
add users management -
export contacts as JSON file -
export users as JSON/CSV file -
import contacts from CSV file -
manage flask messages -
add fields for notes (reserved to admins) -
bulk mode to add/remove tags on multiple contacts - manage pagination
- syntax check when editing fields
- pretty nice things to enhace interface
- export for bulk mode
- ...