cookie-clicker-parser


Namecookie-clicker-parser JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/ShadowCrafter011/Cookie-Clicker-Parser
SummaryParser for Cookie Clicker save codes
upload_time2024-11-12 16:16:58
maintainerNone
docs_urlNone
authorShadowCrafter
requires_pythonNone
licenseMIT
keywords parser cookie clicker
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Parse Cookie Clicker save codes

This is a package for parsing Cookie Clicker save codes. These save codes are generated by exporting your save through the options panel.

## Installation

`pip install cookie-clicker-parser`

### Testing

To test the package in development you have to install the requirements `pip install -r requirements.txt` and install the package itself `pip install .`.Then you can run `pytest`.

## Provided functions

Cookie Clicker save parser provides two functions at the moment:

- `parse` - get all the data from a Cookie Clicker save code
- `get_seed` - get the seed of the Cookie Clicker save

## Supported Cookie Clicker versions

The only offically supported and tested version is v2.052 of Cookie Clicker. Codes of older versions might work but this has not been tested.

## Examples

Both `parse` and `get_seed` take one string argument being the Cookie Clicker save code.

```python
from cookie_clicker_parser import parse, get_seed

parse("Mi4wNTJ8fDE3MDg2...wMDAwfHw%3D%21END%21")
get_seed("Mi4wNTJ8fDE3MDg2...wMDAwfHw%3D%21END%21")
```

## Data format

The `parse` function returns a dictionary which the layout is roughly described here. Of course to gain a better understanding of the data structure you should play around and see what you can find inside the data.

In the following subcategories we assume that we have a parsed Cookie Clicker save named `game`.

### Cookie Clicker version

`game["version"]` stores the version of Cookie Clicker that save was played on.

### Sections

Except the game version there are 9 categories of data describing the save in the root of `game`.

#### run_details

This section contains information about when the run started, when the legacy started, when the game was last opened, the bakerys name, the game seed, and data from the you customizer.

```python
details = game["run_details"]
details.keys()
=> dict_keys(["start_date", "legacy_start_date", "last_opened_game_date", "bakery_name", "seed", "you_customizer"])
```

#### preferences

This section contains the users preferences as booleans.

```python
preferences = game["preferences"]
preferences.keys()
=> dict_keys(["particles", "numbers", "autosave", "autoupdate", "milk", "fancy", "warn", "cursors", "focus", "format", "notifs", "wobbly", "monospace", "filters", "cookiesound", "crates", "showBackupWarning", "extraButtons", "askLumps", "customGrandmas", "timeout", "cloudSave", "bgMusic", "notScary", "fullscreen", "screenreader", "discordPresence"])
```

#### misc_game_data

```python
dict_keys(["cookies", "total_cookies_earned", "cookie_clicks", "golden_cookie_clicks", "cookies_made_by_clicking", "golden_cookies_missed", "background_type", "milk_type", "cookies_from_past_runs", "elder_wrath", "pledges", "pledge_time_left", "currently_researching", "research_time_left", "ascensions", "golden_cookie_clicks_this_run", "cookies_sucked_by_wrinklers", "wrinklers_popped", "santa_level", "reindeer_clicked", "season_time_left", "season_switcher_uses", "current_season", "amount_cookies_in_wrinklers", "number_of_wrinklers", "prestige_level", "heavenly_chips", "heavenly_chips_spent", "heavenly_cookies", "ascension_mode", "dragon_level", "chime_type", "volume", "number_of_shiny_wrinklers", "amount_of_cookies_contained_in_shiny_wrinklers", "current_amount_of_sugar_lumps", "total_amount_of_sugar_lumps", "time_when_current_lump_started", "time_when_last_refilled_minigame_with_lump", "sugar_lump_type", "vault", "heralds", "golden_cookie_fortune", "cps_fortune", "highest_raw_cps", "music_volume", "cookies_sent", "permanent_upgrades", "dragon_auras"])
```

#### buildings

Contains data about the buildings owned. From what I can gather there is no was to know the buildings name from the export code and it seems to identify buildings by their index.

`game["buildings"]` is an array containing a dictionary for each building type.

```python
buildings = game["buildings"]
buildings[0].keys()
=> dict_keys(["amount_owned", "amount_bought", "total_cookies", "level", "minigame_save", "muted", "highest_amount_owned"])
```

#### upgrades

Contains data about unlocked and owned upgrades. Stored as array.

```python
upgrades = game["upgrades"]
upgrades[0].keys()
=> dict_keys(["unlocked", "bought"])
```

#### achievements

Is an array containing a boolean indicating if the achievement at that index is unlocked.

#### buffs

Contains data about the currently active buffs.

#### mod_data

Contains data about loaded mods and data from those mods.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ShadowCrafter011/Cookie-Clicker-Parser",
    "name": "cookie-clicker-parser",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "parser, cookie clicker",
    "author": "ShadowCrafter",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/b8/dd/6d5305e2e0c52b0fc31fefa6fb9489ac3f893339bc341bf0bf13e814023c/cookie_clicker_parser-1.1.0.tar.gz",
    "platform": null,
    "description": "# Parse Cookie Clicker save codes\r\n\r\nThis is a package for parsing Cookie Clicker save codes. These save codes are generated by exporting your save through the options panel.\r\n\r\n## Installation\r\n\r\n`pip install cookie-clicker-parser`\r\n\r\n### Testing\r\n\r\nTo test the package in development you have to install the requirements `pip install -r requirements.txt` and install the package itself `pip install .`.Then you can run `pytest`.\r\n\r\n## Provided functions\r\n\r\nCookie Clicker save parser provides two functions at the moment:\r\n\r\n- `parse` - get all the data from a Cookie Clicker save code\r\n- `get_seed` - get the seed of the Cookie Clicker save\r\n\r\n## Supported Cookie Clicker versions\r\n\r\nThe only offically supported and tested version is v2.052 of Cookie Clicker. Codes of older versions might work but this has not been tested.\r\n\r\n## Examples\r\n\r\nBoth `parse` and `get_seed` take one string argument being the Cookie Clicker save code.\r\n\r\n```python\r\nfrom cookie_clicker_parser import parse, get_seed\r\n\r\nparse(\"Mi4wNTJ8fDE3MDg2...wMDAwfHw%3D%21END%21\")\r\nget_seed(\"Mi4wNTJ8fDE3MDg2...wMDAwfHw%3D%21END%21\")\r\n```\r\n\r\n## Data format\r\n\r\nThe `parse` function returns a dictionary which the layout is roughly described here. Of course to gain a better understanding of the data structure you should play around and see what you can find inside the data.\r\n\r\nIn the following subcategories we assume that we have a parsed Cookie Clicker save named `game`.\r\n\r\n### Cookie Clicker version\r\n\r\n`game[\"version\"]` stores the version of Cookie Clicker that save was played on.\r\n\r\n### Sections\r\n\r\nExcept the game version there are 9 categories of data describing the save in the root of `game`.\r\n\r\n#### run_details\r\n\r\nThis section contains information about when the run started, when the legacy started, when the game was last opened, the bakerys name, the game seed, and data from the you customizer.\r\n\r\n```python\r\ndetails = game[\"run_details\"]\r\ndetails.keys()\r\n=> dict_keys([\"start_date\", \"legacy_start_date\", \"last_opened_game_date\", \"bakery_name\", \"seed\", \"you_customizer\"])\r\n```\r\n\r\n#### preferences\r\n\r\nThis section contains the users preferences as booleans.\r\n\r\n```python\r\npreferences = game[\"preferences\"]\r\npreferences.keys()\r\n=> dict_keys([\"particles\", \"numbers\", \"autosave\", \"autoupdate\", \"milk\", \"fancy\", \"warn\", \"cursors\", \"focus\", \"format\", \"notifs\", \"wobbly\", \"monospace\", \"filters\", \"cookiesound\", \"crates\", \"showBackupWarning\", \"extraButtons\", \"askLumps\", \"customGrandmas\", \"timeout\", \"cloudSave\", \"bgMusic\", \"notScary\", \"fullscreen\", \"screenreader\", \"discordPresence\"])\r\n```\r\n\r\n#### misc_game_data\r\n\r\n```python\r\ndict_keys([\"cookies\", \"total_cookies_earned\", \"cookie_clicks\", \"golden_cookie_clicks\", \"cookies_made_by_clicking\", \"golden_cookies_missed\", \"background_type\", \"milk_type\", \"cookies_from_past_runs\", \"elder_wrath\", \"pledges\", \"pledge_time_left\", \"currently_researching\", \"research_time_left\", \"ascensions\", \"golden_cookie_clicks_this_run\", \"cookies_sucked_by_wrinklers\", \"wrinklers_popped\", \"santa_level\", \"reindeer_clicked\", \"season_time_left\", \"season_switcher_uses\", \"current_season\", \"amount_cookies_in_wrinklers\", \"number_of_wrinklers\", \"prestige_level\", \"heavenly_chips\", \"heavenly_chips_spent\", \"heavenly_cookies\", \"ascension_mode\", \"dragon_level\", \"chime_type\", \"volume\", \"number_of_shiny_wrinklers\", \"amount_of_cookies_contained_in_shiny_wrinklers\", \"current_amount_of_sugar_lumps\", \"total_amount_of_sugar_lumps\", \"time_when_current_lump_started\", \"time_when_last_refilled_minigame_with_lump\", \"sugar_lump_type\", \"vault\", \"heralds\", \"golden_cookie_fortune\", \"cps_fortune\", \"highest_raw_cps\", \"music_volume\", \"cookies_sent\", \"permanent_upgrades\", \"dragon_auras\"])\r\n```\r\n\r\n#### buildings\r\n\r\nContains data about the buildings owned. From what I can gather there is no was to know the buildings name from the export code and it seems to identify buildings by their index.\r\n\r\n`game[\"buildings\"]` is an array containing a dictionary for each building type.\r\n\r\n```python\r\nbuildings = game[\"buildings\"]\r\nbuildings[0].keys()\r\n=> dict_keys([\"amount_owned\", \"amount_bought\", \"total_cookies\", \"level\", \"minigame_save\", \"muted\", \"highest_amount_owned\"])\r\n```\r\n\r\n#### upgrades\r\n\r\nContains data about unlocked and owned upgrades. Stored as array.\r\n\r\n```python\r\nupgrades = game[\"upgrades\"]\r\nupgrades[0].keys()\r\n=> dict_keys([\"unlocked\", \"bought\"])\r\n```\r\n\r\n#### achievements\r\n\r\nIs an array containing a boolean indicating if the achievement at that index is unlocked.\r\n\r\n#### buffs\r\n\r\nContains data about the currently active buffs.\r\n\r\n#### mod_data\r\n\r\nContains data about loaded mods and data from those mods.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Parser for Cookie Clicker save codes",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/ShadowCrafter011/Cookie-Clicker-Parser"
    },
    "split_keywords": [
        "parser",
        " cookie clicker"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df1d9b6820b29c5b928df2c45e48d36c8393cd15ddcdd9f3a38eae41eb36b686",
                "md5": "ce933a353c8091d4452b11474e49e7f9",
                "sha256": "3c5ce7892d549d10a1f14529e3fecaf3591f2325f048912bfb12b896c375a328"
            },
            "downloads": -1,
            "filename": "cookie_clicker_parser-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ce933a353c8091d4452b11474e49e7f9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6695,
            "upload_time": "2024-11-12T16:16:56",
            "upload_time_iso_8601": "2024-11-12T16:16:56.529830Z",
            "url": "https://files.pythonhosted.org/packages/df/1d/9b6820b29c5b928df2c45e48d36c8393cd15ddcdd9f3a38eae41eb36b686/cookie_clicker_parser-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b8dd6d5305e2e0c52b0fc31fefa6fb9489ac3f893339bc341bf0bf13e814023c",
                "md5": "ff707a75ff136803cba7fb2a7a5c8e1c",
                "sha256": "87ed9218cab4e8615e3fdf4c2a64b422abc42efd488d89e12058239e92f858e1"
            },
            "downloads": -1,
            "filename": "cookie_clicker_parser-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ff707a75ff136803cba7fb2a7a5c8e1c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6368,
            "upload_time": "2024-11-12T16:16:58",
            "upload_time_iso_8601": "2024-11-12T16:16:58.928193Z",
            "url": "https://files.pythonhosted.org/packages/b8/dd/6d5305e2e0c52b0fc31fefa6fb9489ac3f893339bc341bf0bf13e814023c/cookie_clicker_parser-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-12 16:16:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ShadowCrafter011",
    "github_project": "Cookie-Clicker-Parser",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "cookie-clicker-parser"
}
        
Elapsed time: 0.41241s