macprefs


Namemacprefs JSON
Version 0.3.4 PyPI version JSON
download
home_pagehttps://github.com/Tatsh/macprefs
SummaryCommand and library to export macOS preferences.
upload_time2024-06-23 12:52:23
maintainerNone
docs_urlNone
authorAndrew Udvare
requires_python<4,>=3.10
licenseMIT
keywords command line macos preferences utilities
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # macprefs

[![QA](https://github.com/Tatsh/macprefs/actions/workflows/qa.yml/badge.svg)](https://github.com/Tatsh/macprefs/actions/workflows/qa.yml)
[![Tests](https://github.com/Tatsh/macprefs/actions/workflows/tests.yml/badge.svg)](https://github.com/Tatsh/macprefs/actions/workflows/tests.yml)
[![Coverage Status](https://coveralls.io/repos/github/Tatsh/macprefs/badge.svg?branch=master)](https://coveralls.io/github/Tatsh/macprefs?branch=master)
[![Documentation Status](https://readthedocs.org/projects/macprefs/badge/?version=latest)](https://macprefs.readthedocs.io/en/latest/?badge=latest)
![PyPI - Version](https://img.shields.io/pypi/v/macprefs)
![GitHub tag (with filter)](https://img.shields.io/github/v/tag/Tatsh/macprefs)
![GitHub](https://img.shields.io/github/license/Tatsh/macprefs)
![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/Tatsh/macprefs/v0.3.4/master)

Export and keep track of changes to your preferences.

## How to use

```plain
Usage: prefs-export [OPTIONS]

  Export preferences.

Options:
  -K, --deploy-key FILE           Key for pushing to Git repository.
  -c, --commit                    Commit the changes with Git.
  -d, --debug                     Enable debug logging.
  -o, --output-directory DIRECTORY
                                  Where to store the exported data.
  --help                          Show this message and exit.
```

`prefs-export` is the main utility. You can export preferences, generate a
[`~/.macos`](https://github.com/mathiasbynens/dotfiles/blob/main/.macos)-like script, and store the
results in a Git repository.

My primary usage is like so:

```shell
prefs-export -o ~/.config/defaults -c
```

## About the generated shell script

A shell script named `exec-defaults.sh` will exist in the output directory. It may be executed, but
is primarily for copying `defaults` commands for use in your actual `~/.macos` file.

### Filtered domains and keys

Certain domains are filtered because they generally do not have anything useful to preserve, such
as `com.apple.EmojiCache` which only has a cache of Emoji usage data.

Some keys are filtered, as they contain values that often changing and non-useful values such as
session IDs and UI state (e.g. `QtUi.MainWin(Geometry|State|Pos|Size)`,
`NSStatusItem Preferred Position`).

## Automated usage

A command `macprefs-install-job` is included which will install a daily launchd job. The job name is
`sh.tat.macprefs`

```plain
Usage: macprefs-install-job [OPTIONS]

  Job installer.

Options:
  -K, --deploy-key FILE           Key for pushing to Git repository.
  -o, --output-directory DIRECTORY
                                  Where to store the exported data.
  --help                          Show this message and exit.
```

If the output directory has a `.git` directory, a commit will be automatically made. Be aware that
files will be added and removed automatically.

To stop this job permanently, run `launchctl unload -w ~/Library/LaunchAgents/sh.tat.macprefs.plist`.

To uninstall this job, after stopping permanently, delete `~/Library/LaunchAgents/sh.tat.macprefs.plist`.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Tatsh/macprefs",
    "name": "macprefs",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.10",
    "maintainer_email": null,
    "keywords": "command line, macos, preferences, utilities",
    "author": "Andrew Udvare",
    "author_email": "audvare@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/19/4b/35f85578d333d45f9fc5aec025f2f8ab0692abb7c1695d47ac4a0da2f05a/macprefs-0.3.4.tar.gz",
    "platform": null,
    "description": "# macprefs\n\n[![QA](https://github.com/Tatsh/macprefs/actions/workflows/qa.yml/badge.svg)](https://github.com/Tatsh/macprefs/actions/workflows/qa.yml)\n[![Tests](https://github.com/Tatsh/macprefs/actions/workflows/tests.yml/badge.svg)](https://github.com/Tatsh/macprefs/actions/workflows/tests.yml)\n[![Coverage Status](https://coveralls.io/repos/github/Tatsh/macprefs/badge.svg?branch=master)](https://coveralls.io/github/Tatsh/macprefs?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/macprefs/badge/?version=latest)](https://macprefs.readthedocs.io/en/latest/?badge=latest)\n![PyPI - Version](https://img.shields.io/pypi/v/macprefs)\n![GitHub tag (with filter)](https://img.shields.io/github/v/tag/Tatsh/macprefs)\n![GitHub](https://img.shields.io/github/license/Tatsh/macprefs)\n![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/Tatsh/macprefs/v0.3.4/master)\n\nExport and keep track of changes to your preferences.\n\n## How to use\n\n```plain\nUsage: prefs-export [OPTIONS]\n\n  Export preferences.\n\nOptions:\n  -K, --deploy-key FILE           Key for pushing to Git repository.\n  -c, --commit                    Commit the changes with Git.\n  -d, --debug                     Enable debug logging.\n  -o, --output-directory DIRECTORY\n                                  Where to store the exported data.\n  --help                          Show this message and exit.\n```\n\n`prefs-export` is the main utility. You can export preferences, generate a\n[`~/.macos`](https://github.com/mathiasbynens/dotfiles/blob/main/.macos)-like script, and store the\nresults in a Git repository.\n\nMy primary usage is like so:\n\n```shell\nprefs-export -o ~/.config/defaults -c\n```\n\n## About the generated shell script\n\nA shell script named `exec-defaults.sh` will exist in the output directory. It may be executed, but\nis primarily for copying `defaults` commands for use in your actual `~/.macos` file.\n\n### Filtered domains and keys\n\nCertain domains are filtered because they generally do not have anything useful to preserve, such\nas `com.apple.EmojiCache` which only has a cache of Emoji usage data.\n\nSome keys are filtered, as they contain values that often changing and non-useful values such as\nsession IDs and UI state (e.g. `QtUi.MainWin(Geometry|State|Pos|Size)`,\n`NSStatusItem Preferred Position`).\n\n## Automated usage\n\nA command `macprefs-install-job` is included which will install a daily launchd job. The job name is\n`sh.tat.macprefs`\n\n```plain\nUsage: macprefs-install-job [OPTIONS]\n\n  Job installer.\n\nOptions:\n  -K, --deploy-key FILE           Key for pushing to Git repository.\n  -o, --output-directory DIRECTORY\n                                  Where to store the exported data.\n  --help                          Show this message and exit.\n```\n\nIf the output directory has a `.git` directory, a commit will be automatically made. Be aware that\nfiles will be added and removed automatically.\n\nTo stop this job permanently, run `launchctl unload -w ~/Library/LaunchAgents/sh.tat.macprefs.plist`.\n\nTo uninstall this job, after stopping permanently, delete `~/Library/LaunchAgents/sh.tat.macprefs.plist`.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Command and library to export macOS preferences.",
    "version": "0.3.4",
    "project_urls": {
        "Documentation": "https://macprefs.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/Tatsh/macprefs",
        "Repository": "https://github.com/Tatsh/macprefs"
    },
    "split_keywords": [
        "command line",
        " macos",
        " preferences",
        " utilities"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bbda5b44e74166fb28c0954fd77372e4f8830eceb72231980d247a2c89e3e3c4",
                "md5": "ba9f9dc0c8025eb2295a6d3b2e4fe5b4",
                "sha256": "61e2102a28fc8e2849eebdf9a04f08ad0d44c0055aa6dc36b5d91be35b3ac9d1"
            },
            "downloads": -1,
            "filename": "macprefs-0.3.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ba9f9dc0c8025eb2295a6d3b2e4fe5b4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.10",
            "size": 20251,
            "upload_time": "2024-06-23T12:52:22",
            "upload_time_iso_8601": "2024-06-23T12:52:22.251341Z",
            "url": "https://files.pythonhosted.org/packages/bb/da/5b44e74166fb28c0954fd77372e4f8830eceb72231980d247a2c89e3e3c4/macprefs-0.3.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "194b35f85578d333d45f9fc5aec025f2f8ab0692abb7c1695d47ac4a0da2f05a",
                "md5": "8e3230e7bf4d610d65a584e4bed228db",
                "sha256": "9b1b8e0fcd0d7027dbd1d2706c773ef7f8620c97223219b3294ee0a4ee5e9908"
            },
            "downloads": -1,
            "filename": "macprefs-0.3.4.tar.gz",
            "has_sig": false,
            "md5_digest": "8e3230e7bf4d610d65a584e4bed228db",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.10",
            "size": 19985,
            "upload_time": "2024-06-23T12:52:23",
            "upload_time_iso_8601": "2024-06-23T12:52:23.929732Z",
            "url": "https://files.pythonhosted.org/packages/19/4b/35f85578d333d45f9fc5aec025f2f8ab0692abb7c1695d47ac4a0da2f05a/macprefs-0.3.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-23 12:52:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Tatsh",
    "github_project": "macprefs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "macprefs"
}
        
Elapsed time: 0.29868s