Project Time Tracker
The Project Time Tracker extension helps you keep track of the time you spend working on different projects and files within Visual Studio Code. This extension is perfect for developers who need to log their working hours or simply want to improve their productivity by analyzing their time management.
Features
- Automatically tracks the time spent on each file and project.
- Logs the time spent on a file when it is closed or the editor loses focus.
- Saves log data to a
time_log.json
file within your workspace.
- Includes the Git username and email of the user who worked on the file.
- Displays the time spent on the active file in the status bar.
- Provides a webview panel to display detailed time tracking statistics.
- Allows exporting of log data as JSON or CSV.
- Simple and non-intrusive, integrates smoothly into your workflow.
How It Works
- Open a file in your project.
- The extension starts tracking the time you spend on that file.
- When you save the file, switch to another file, or lose focus on the editor, the time spent is logged.
- The log data includes the project name, file name, time spent in seconds, and the Git username and email of the user.
- The total time spent is displayed in the status bar.
- You can view detailed statistics and export data using the webview panel.
Installation
- Open Visual Studio Code.
- Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window.
- Search for
Project Time Tracker
.
- Click Install.
Usage
Simply open and work on your files as usual. The extension will automatically track and log your time. You can view the logs in the time_log.json
file located in your workspace directory.
To view detailed statistics or export your log data:
- Click on the "Time Spent" status bar item.
- The Project Time Tracker panel will open.
- Use the filters and export buttons as needed.
Example Log
{
"MyProject": {
"/path/to/file.ts": [
{
"date": "2024-05-15T08:23:08.373Z",
"user": {
"name": "John Doe",
"email": "john.doe@example.com"
},
"timeSpent": 123
},
{
"date": "2024-05-15T09:45:10.123Z",
"user": {
"name": "Jane Doe",
"email": "jane.doe@example.com"
},
"timeSpent": 45
}
],
"/path/to/anotherfile.ts": [
{
"date": "2024-05-15T10:00:00.000Z",
"user": {
"name": "John Doe",
"email": "john.doe@example.com"
},
"timeSpent": 78
}
]
}
}
Contributing
We welcome feedback and contributions! If you encounter any issues or have suggestions for improvements, please visit our GitHub repository and create an issue or pull request.
License
This extension is licensed under the MIT License.
Developed by 404-Labor
Screenshots
Here are some screenshots showing the Project Time Tracker in action:
Tracking Time in a File
Log File