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 Flask and Python 2.7.
- Clone the repository
- Create a virtualenv (optional, but recommended)
- Install pip dependencies ($ pip install -r requirements.txt)
- Copy "config-example.py" as "config.py" and edit it with your configuration
- Run $ python main.py
- 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. - Create persons manually or upload a CSV file in the Database section. The CSV format is given in
data/example-persons.csv
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": "oneil@sg1.com",
"job": "Colonel",
"birthday": 0,
"login": "joneil",
"id": 2,
"picture": "/photo/joneil"
},
{
"arrival": 1395270000,
"surname": "Carter",
"name": "Samantha",
"team_id": 2,
"email": "sam@sg1.com",
"job": "Major",
"birthday": 0,
"login": "scarter",
"id": 3,
"picture": "/photo/scarter"
},
{
"arrival": 1395270000,
"surname": "",
"name": "Teal'c",
"team_id": 2,
"email": "tealc@sg1.com",
"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"
}
]
# 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