Metadata-Version: 2.4
Name: os-independent
Version: 1.0.0
Summary: Library made for easier work with different system platforms
Author: maxie
License-Expression: MIT
Project-URL: Homepage, https://codeberg.org/maxeepy/os-independent
Project-URL: Issues, https://codeberg.org/maxeepy/os-independent/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# os-independent

library for easier work with different system platforms
such as config files, path stuff and so on...

example
```py
from os_independent import OSIndependent

osi = OSIndependent("project_name")
# by default empty config is {"editor": "nano"}

# gets the config file for project_name, useful for cli's and command line stuff
# all config files are stored at either ~, ~/.config or %APPDATA%
print(osi.get_config()) # {"editor": "nano"}

# add new stuff to the config
osi.config["meow"] = "that"
osi.save_config()
# --- or ---
# this variant saves the config immediately after adding new stuff
osi.add_to_config({"meow": "that"})

# calls osi.cli_edit(osi.config_path)
# which in this case runs "nano ~/.config/project_name.json" in your terminal
osi.edit_config()

# reset config, in this case it will return to {"editor": "nano"}
osi.reset_config()

# cli stuff
# cli_edit in this case runs "nano <path>"
osi.cli_edit(path)

# cli_read in linux runs "less <path>"
osi.cli_read(path)

# you can also run this to return the contents of path in terminal instead
osi.cli_read(path, print_in_terminal = True)
```

things might be a bit different on other systems
