GithubHelp home page GithubHelp logo

gabfv / logitech-g-hub-settings-extractor Goto Github PK

View Code? Open in Web Editor NEW
60.0 5.0 10.0 23 KB

This is a small python tool to extract the json file stored inside the "settings.db" file of the Logitech G Hub app. This allows you to update the json and then replace the file blob inside the db with the new json.

License: MIT License

Python 100.00%
logitech ghub

logitech-g-hub-settings-extractor's Introduction

Logitech G Hub settings extractor

This is a small python tool to extract the json file stored inside the "settings.db" file of the Logitech G Hub app. This allows you to update the json and then replace the file blob inside the db with the new json.

Requirements

Tested on Windows and macOS.

You need Python installed. I've tested with 3.9 but I think 2.x versions should work too.

How to use

Simply follow the instructions after executing the py file.

In summary: It extracts the JSON. It asks you to close Logitech G Hub then, once it's done, you can press Enter to continue. The script open it into your editor (the default app per OS settings for json files, or the OS will let ask you what to open it with). You edit the file as you like. Then, you save the file and close the editor. As soon as you close the editor, it automatically insert the modified JSON into Logitech G Hub sqlite db. When you open Logitech G Hub again, it should reflects the changes you've made.

Script parameters (all are optional)

usage: G Hub Settings Extractor [-h] [-d DB_PATH] [-s SETTINGS_PATH]

Extract and replace the settings.json inside the settings.db used by Logitech G Hub.

options:
  -h, --help            show this help message and exit
  -d DB_PATH, --db_path DB_PATH
                        Path to an alternate settings.db file to edit. The result will not be written back to this file but in the default LGHUB settings folder (unless one has been provided with -s(--settings_path)).
  -s SETTINGS_PATH, --settings_path SETTINGS_PATH
                        Path to the LGHUB settings folder

Windows

In a cmd or PowerShell window, type the following in the same folder as the py file.

(You can "Shift+Right Click" into an explorer window to open a cmd/PowerShell window in the same folder):

python ghub-settings.py

macOS

Open Terminal

cd path/where/you/downloaded/the/py/file
python ghub-settings.py

logitech-g-hub-settings-extractor's People

Contributors

burck1 avatar gabfv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

logitech-g-hub-settings-extractor's Issues

Issues with macos

This program is intended to extract and replace the settings.json inside the settings.db used by Logitech G Hub.

Press Enter to continue.

Traceback (most recent call last):
File "ghub-settings.py", line 173, in
input()
File "", line 0

^

SyntaxError: unexpected EOF while parsing

Possible to edit a backup settings.db?

My Ghub profile was corrupted.
I have a backup "\AppData\Local\LGHUB" but Ghub keeps giving me error "Unable to save changes. An unknown error occured"
When I run this py script (with my backup db), I get error "Failed to read blob data from sqlite table database disk image is malformed"

Is there anyway to transfer my settings from my backup settings.db over to Ghub?

How to import?

Now that I've used this script to extract a JSON file per the README, how do I import the JSON file into a new installation of Logitech GHUB? Could this info be added to the README?

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.