https://github.com/vmapps/tagscards
Store and tag your favorite contact cards
https://github.com/vmapps/tagscards
bootstrap contacts flask python3 rethinkdb tags
Last synced: 25 days ago
JSON representation
Store and tag your favorite contact cards
- Host: GitHub
- URL: https://github.com/vmapps/tagscards
- Owner: vmapps
- Created: 2020-04-19T21:07:00.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-20T03:36:40.000Z (about 5 years ago)
- Last Synced: 2025-04-07T11:31:26.278Z (about 1 year ago)
- Topics: bootstrap, contacts, flask, python3, rethinkdb, tags
- Language: Python
- Size: 10.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tagscards
Store and tag your favorite contact cards
## Purpose
Purpose of this very simple tool is to :
- create contact cards
- store cards into database
- search for contacts using tags
## Requirements
Some modules are packaged with application :
- [Bootstrap 4](https://getbootstrap.com/)
- [Font Awesome](https://fontawesome.com/)
- [jQuery](https://jquery.com/)
- [Jquery Suggestags](https://github.com/amsify42/jquery.amsify.suggestags)
Following python modules are required :
- [Flask](https://flask.palletsprojects.com/)
- [RethinkDB](https://rethinkdb.com/)
Modules could be installed using following command:
```
$ pip install -r requirements.txt
```
## Database initialization
:warning: Following steps are now optional if you run `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("","sha256") )
sha256$zwmdPo4e$59122744f59e7197a396c3db3fa340eba975ae2316b5685e3e3091a6e932a024
```
Then, using RethinkDB Data Explorer (`http://localhost:8080/#dataexplorer`), you will initialize the database :
- create database ``
- create table `contacts`
- create tables `users` (different than RethinkDB internal one)
- create user `admin`
```
r.dbCreate('')
r.db(').tableCreate('contacts')
r.db(').tableCreate('users')
r.db(').table('users').insert({
username: 'admin',
email: '',
password: ''
})
```
## Configuration
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 = ''
TAGSCARDS_PASSWORD = ''
TAGSCARDS_FULLAUTH = False (True if you want authentication for all pagesr)
TAGSCARDS_TIMEOUTS =
# database
RETHINKDB_HOST = 'localhost'
RETHINKDB_PORT = 28015
...
```
## Run
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
```
## Import contacts
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
```
## Some features
- 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
- :lock: Bulk mode to add/del tags
- :lock: Import from CSV
- :lock: Users management
## Todo list
- [x] ~~bootstrap 4 integration~~
- [x] ~~autocompletion for tags input~~
- [x] ~~search with multiple tags~~
- [x] ~~actions to add/edit/delete records~~
- [x] ~~add PGP field~~
- [x] ~~add position field~~
- [x] ~~add website field~~
- [x] ~~add sort asc/desc on fields~~
- [x] ~~add icons support~~
- [x] ~~fields text search support~~
- [x] ~~login/logout functions~~
- [x] ~~add session timeout~~
- [x] ~~export as vCard format~~
- [x] ~~add users management~~
- [x] ~~export contacts as JSON file~~
- [x] ~~export users as JSON/CSV file~~
- [x] ~~import contacts from CSV file~~
- [x] ~~manage flask messages~~
- [x] ~~add fields for notes (reserved to admins)~~
- [x] ~~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
- [ ] ...
## Samples






