{"id":22216803,"url":"https://github.com/conorsheehan1/uhabits_converter","last_synced_at":"2025-07-27T14:30:56.646Z","repository":{"id":41892295,"uuid":"464252433","full_name":"ConorSheehan1/uhabits_converter","owner":"ConorSheehan1","description":"Convert uhabits boolean habits to the new numeric habit type.","archived":false,"fork":false,"pushed_at":"2024-05-08T08:24:43.000Z","size":686,"stargazers_count":6,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-21T09:48:39.643Z","etag":null,"topics":["cli","loophabits","python","sqlite","uhabits"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/uhabits-converter","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ConorSheehan1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-27T21:00:56.000Z","updated_at":"2024-05-08T08:24:47.000Z","dependencies_parsed_at":"2024-05-08T09:30:30.195Z","dependency_job_id":"807da82c-859c-477b-88f3-1979b6999ffe","html_url":"https://github.com/ConorSheehan1/uhabits_converter","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConorSheehan1%2Fuhabits_converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConorSheehan1%2Fuhabits_converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConorSheehan1%2Fuhabits_converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConorSheehan1%2Fuhabits_converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ConorSheehan1","download_url":"https://codeload.github.com/ConorSheehan1/uhabits_converter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227810317,"owners_count":17823176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","loophabits","python","sqlite","uhabits"],"created_at":"2024-12-02T22:13:31.208Z","updated_at":"2024-12-02T22:13:32.983Z","avatar_url":"https://github.com/ConorSheehan1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# uhabits_converter\n[![Build Status](https://github.com/ConorSheehan1/uhabits_converter/workflows/ci/badge.svg)](https://github.com/ConorSheehan1/uhabits_converter/actions/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Tested Operating Systems](https://img.shields.io/badge/dynamic/yaml?url=https://raw.githubusercontent.com/ConorSheehan1/uhabits_converter/main/.github/workflows/ci.yml\u0026label=os\u0026query=$.jobs.build.strategy.matrix.os)](https://github.com/ConorSheehan1/uhabits_converter/blob/main/.github/workflows/ci.yml#L25)\n[![Tested python versions](https://img.shields.io/badge/dynamic/yaml?url=https://raw.githubusercontent.com/ConorSheehan1/uhabits_converter/main/.github/workflows/ci.yml\u0026label=Tested%20python%20versions\u0026query=$.jobs.build.strategy.matrix.python)](https://github.com/ConorSheehan1/uhabits_converter/blob/main/.github/workflows/ci.yml#L26)\n\n[Loop Habit / uhabits](https://github.com/iSoron/uhabits) converter.\n\n## Warnings\nPlease back up your data! By default this project does copy your data to a new db before editing it, but I make no promises it won't break on write or import.\n\nThis project is developed in my spare time, so it could be out of sync with [Loop Habit / uHabits](https://github.com/iSoron/uhabits).\nIt has been tested with version [2.0.3](https://github.com/iSoron/uhabits/releases/tag/v2.0.3).\n\n\n## Features\n1. Convert boolean habits to the new numeric habit type.\n    **Example output**\n    | Before                                          | After                                         |\n    | ----------------------------------------------- | --------------------------------------------- |\n    | ![coffee_bool](.github/images/coffee_bool.jpg)  | ![coffee_num](.github/images/coffee_num.jpg)  |\n\n\n## Installation\n```bash\n# options 1 pypi\npip install uhabits-converter\n\n# option 2 github release\npip install https://github.com/ConorSheehan1/uhabits_converter/releases/latest/download/uhabits_converter.tar.gz\n\n# option 3 from source\n# install python (\u003e=3.8 check pyproject.toml)\n# https://github.com/ConorSheehan1/uhabits_converter/blob/main/pyproject.toml#L9\ngit clone git@github.com:ConorSheehan1/uhabits_converter.git\ncd uhabits_converter\npoetry install\n# if you want the uhabits_converter command available run the lines below.\n# otherwise you can use: PYTHONPATH=$(pwd) poetry run task dev\npoetry build\npip install .\n```\n\n### Steps to convert habits\n1. Follow the instructions for **How can I export a full backup of my data?**\n    1. https://github.com/iSoron/uhabits/discussions/689 \n    \u003e Select the option \"Export full backup\" on the settings screen.\n2. Copy the `.db` file to your computer\n3. Run `uhabits_converter` from a terminal\n    1. You can specify arguments up front or interactively. e.g.\n    `uhabits_converter --inputdb=Loop_Habits_Backup_2022-02-28_220305.db --habits=Gym,Coffee`\n    this will convert the habits Gym and Coffee from boolean to numeric habits.\n    now you can track hours in the gym and cups of coffee, rather than just the days you went to the Gym or drank coffee.\n4. copy the `output.db` file back to your android device.\n5. follow the instructions for **How can I restore a full backup?**\n    \u003e First, go to the settings screen and tap \"Import data\". A file browser should appear. Tap the menu icon (the one with three vertical lines) and select the app where your backup is stored, such as Google Drive.\n\n    \u003e If your backup file is located in your SD card, after tapping \"Import data\", tap the icon with three dots on the top right corner of the screen and select \"Show internal storage\". Then, tap the menu icon (the one with three vertical lines) and select your SD card.\n\n\n### Development\nSee [DEV.md](./DEV.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconorsheehan1%2Fuhabits_converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconorsheehan1%2Fuhabits_converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconorsheehan1%2Fuhabits_converter/lists"}