This project is a light tool to help people recognise their colleagues when your company is getting bigger.
- List of all persons in the company
- Display only the new persons
- An organigram of the teams
- A little game to learn names of your colleagues
- A calendar with the birthdays and arrival dates of everyone
- Some spaces to display information for the users
- Links aggregator
- Reports on a person profile if an information is incorrect (only visible by the admin)
- Admin interface
This project is using Python 2 and Flask. It is still compatible with Python 2.7, but python2 is going to be deprecated 2020, January 1st.
- Clone the repository
- Create a virtualenv
$ python3 -m venv venv
- Enter the virtualenv
$ source ./venv/bin/activate
- Install pip dependencies
(venv)$ pip install -r requirements.txt
- Copy "config-example.py" as "config.py" and edit it with your configuration
- Configurate your project
(venv)$ export FLASK_APP=run.py
- Run
flask run
- Open 127.0.0.1:5000 in your navigator
- Access 127.0.0.1:5000/admin in your navigator to access the admin page (use the credentials from your
config.py
file. - Enjoy!
I'm still actively working on this project, don't hesitate to comment or ask for some useful features :).
If activated, an API is available to access data from the trombi. It follows a simple REST structure and doesn't require any authentication. The return format is JSON.
Information about the persons.
- URL
/api/persons/<login>
- Methods
[GET]
- Parameters
Parameter | Required | Value | Description |
---|---|---|---|
login | No | string | Request information for only one person |
Success response
- Code: 200
Error response
- Code: 404
The requested login doesn't exist
Example response
[
{
"arrival": 1395270000,
"surname": "O'Neil",
"name": "Jack",
"team_id": 2,
"email": "[email protected]",
"job": "Colonel",
"birthday": 0,
"login": "joneil",
"id": 2,
"picture": "/photo/joneil"
},
{
"arrival": 1395270000,
"surname": "Carter",
"name": "Samantha",
"team_id": 2,
"email": "[email protected]",
"job": "Major",
"birthday": 0,
"login": "scarter",
"id": 3,
"picture": "/photo/scarter"
},
{
"arrival": 1395270000,
"surname": "",
"name": "Teal'c",
"team_id": 2,
"email": "[email protected]",
"job": "Jaffa",
"birthday": 0,
"login": "tealc",
"id": 4,
"picture": "/photo/tealc",
}
]
Information about the teams.
- URL
/api/teams/<team_id>
- Methods
[GET]
- Parameters
Parameter | Required | Value | Description |
---|---|---|---|
team_id | No | integer | Request information for only one team |
Success response
- Code: 200
Error response
- Code: 404
The requested team doesn't exist
Example response
[
{
"persons": ["ghammond"],
"id": 1,
"name": "SGC"
},
{
"persons": [
"joneil",
"scarter",
"tealc",
"djackson",
"jquinn"
],
"higher_teaml_id": 1,
"id": 2,
"name": "SG1"
}
]
Information about the links.
- URL
/api/links/
- Methods
[GET]
- Parameters
Parameter | Required | Value | Description |
---|---|---|---|
- | - | - | - |
Success response
- Code: 200
Example response
[
{
"url": "https://github.com/Mogmi95/Trombi",
"description": "Github page of the Trombi project",
"image_url": "https://dyw7ncnq1en5l.cloudfront.net/optim/news/75/75755/-c-github.jpg",
"id": 1,
"title": "Trombi on Github"
}
]
The translation section is still available, but it has not been heavily updated, since english is fine for most projects. I hope to propose a new translation later in the future.
# This line is only to create a new lang
$ pybabel init -i messages.pot -d trombi/translations -l [LANG]
# Extract the existing strings from the application
$ pybabel extract -F babel.cfg -o messages.pot .
# Updating the translation files with the new strings
$ pybabel update -i messages.pot -d trombi/translations
# Editing the translations (poedit is a cool tool for that)
$ poedit trombi/translations/[LANG]/LC_MESSAGES/messages.po
# Compile all the translations into an optimized file for production
$ pybabel compile -d trombi/translations