-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a script to merge records of multiple databases #455
Conversation
The timetagger-mergedatabases.py is intended to merge TimeTagger record tables of multiple user databases into one user database, replacing the existing records. Extends the records by user information. This can be used as a workaround to create a unified view of the records of all or a group of users.
Thanks! I guess it's time for a folder with user-contributed stuff. Let's create a folder |
Excellent. I'll adapt the PR soon and possible add another feature to the script. |
Added some more features to the script, moved it to contrib and added to the package. Adding to the package has been done in a separate commit. Remove it, if you want. |
... to be able to replace text in the descriptions during merging.
Thanks! I just fixed some linting issues. |
…v24.4.1@5f4c178 by renovate (#21018) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/almarklein/timetagger](https://togithub.com/almarklein/timetagger) | major | `v23.11.4-nonroot` -> `v24.4.1-nonroot` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>almarklein/timetagger (ghcr.io/almarklein/timetagger)</summary> ### [`v24.4.1`](https://togithub.com/almarklein/timetagger/releases/tag/v24.4.1) [Compare Source](https://togithub.com/almarklein/timetagger/compare/v23.11.4...v24.4.1) ##### App - Fixes iOS zoom issue by [@​axelknock](https://togithub.com/axelknock) in [https://github.com/almarklein/timetagger/pull/456](https://togithub.com/almarklein/timetagger/pull/456) - Add option for Monday-Friday week by [@​staddi99](https://togithub.com/staddi99) in [https://github.com/almarklein/timetagger/pull/458](https://togithub.com/almarklein/timetagger/pull/458) - More shortcuts by [@​Tagirijus](https://togithub.com/Tagirijus) in [https://github.com/almarklein/timetagger/pull/467](https://togithub.com/almarklein/timetagger/pull/467) - Enable notifications by [@​almarklein](https://togithub.com/almarklein) in [https://github.com/almarklein/timetagger/pull/470](https://togithub.com/almarklein/timetagger/pull/470) ##### For self-hosters - Pass an import string rather than a function reference to enable multi-worker and reload support. by [@​michaellenaghan](https://togithub.com/michaellenaghan) in [https://github.com/almarklein/timetagger/pull/457](https://togithub.com/almarklein/timetagger/pull/457) - add a script to merge records of multiple databases by [@​joergsteffens](https://togithub.com/joergsteffens) in [https://github.com/almarklein/timetagger/pull/455](https://togithub.com/almarklein/timetagger/pull/455) ##### New Contributors - [@​michaellenaghan](https://togithub.com/michaellenaghan) made their first contribution in [https://github.com/almarklein/timetagger/pull/457](https://togithub.com/almarklein/timetagger/pull/457) - [@​axelknock](https://togithub.com/axelknock) made their first contribution in [https://github.com/almarklein/timetagger/pull/456](https://togithub.com/almarklein/timetagger/pull/456) - [@​staddi99](https://togithub.com/staddi99) made their first contribution in [https://github.com/almarklein/timetagger/pull/458](https://togithub.com/almarklein/timetagger/pull/458) - [@​joergsteffens](https://togithub.com/joergsteffens) made their first contribution in [https://github.com/almarklein/timetagger/pull/455](https://togithub.com/almarklein/timetagger/pull/455) - [@​Tagirijus](https://togithub.com/Tagirijus) made their first contribution in [https://github.com/almarklein/timetagger/pull/467](https://togithub.com/almarklein/timetagger/pull/467) ##### Personal note I'm rather occupied with other projects, so I find that I don't have as much time to work on TimeTagger as I want to. In the last days I did some work on timetagger.app to refactor things into more components with specific tasks, which will make room for future improvements such as teams ... **Full Changelog**: almarklein/timetagger@v23.11.4...v24.4.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMDkuMCIsInVwZGF0ZWRJblZlciI6IjM3LjMwOS4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbInVwZGF0ZS9kb2NrZXIvZ2VuZXJhbC9tYWpvciJdfQ==--> Signed-off-by: Stavros Kois <[email protected]> Co-authored-by: Stavros Kois <[email protected]>
After my approach to extend the webui to offer some access to other user records (#449) got rejected, I abandoned this approach. As a workaround, I created an external script to merge the record tables of multiple users together.
The timetagger-mergedatabases.py is intended to merge TimeTagger record tables of multiple user databases into one user database, replacing the existing records. Extends the records by user information.
This can be used as a workaround to create a unified view of the records of all or a group of users.
Currently I run this script periodically via cron.
Feel free to merge it, or reject it. As an external script, it is quite easy maintainable by itself.