Metadata-Version: 2.4
Name: dack
Version: 0.1.0
Summary: Dack is a file format that can be stored in any text file
Project-URL: Repository, https://github.com/Wirlocke/dack
Author-email: Marisha Lozada-Norcross <marishaloznorcross@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Marisha Lozada-Norcross
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Description-Content-Type: text/markdown

Dack is a file format that can be stored in any text file, but will default to `.cfg`.

Dack primarily stores key value pairs or dictionaries. The syntax are thusly:  
`&>KEY:VALUE`

Anything after `&>` and before `:` is a key.  
Anything after the first `:` and before the next `&>` is a value.

The key may contain anything except `&>` or `:`, leading or trailing whitespace will by stripped.  
The value may contain anything except `&>`, leading or trailing whitespace will by stripped.

If there is a `&>` without an associated `:` then it will be ignored, effectively acting as comments.  
If the file contains duplicate key entries the first one will be used and the rest ignored with a warning.

This format has many benefits:
* Very simple and readable
* Very flexible and hard to break
* Doesn't feel tedious to type in
* Works with any text document filetype
* Highly portable, won't break being posted in markdown or on social media

Dack has 10 public functions that are outlined here:

`dack.to_pydict` will convert a string of the Dack format into a python dict.  
`dack.from_pydict` will convert a python dict into a string of the Dack format.  
`dack.save` `dack.load` will save or load a dict to or from a file using that file's path.  
`dack.saveas` `dack.savefile` `dack.loadfrom` `dack.loadfile` are like overrides for the save and load functions;  
`saveas` and `loadfrom` only need the name of the file, `savefile` and `loadfile` needs the file name with it's extension.  
`dack.savebatch` will save a list of dictionaries as separate files in a directory.  
`dack.loadbatch` will recursively load files in a directory and return a list of dictionaries.