dece
0b79bd9e9e
This absolutely un-atomic commit also introduces the Links class to hold methods regarding link lookups on top of the standard dict class.
19 lines
431 B
Python
19 lines
431 B
Python
"""Retrieve some paths from filesystem.
|
|
|
|
A lot of logic comes from `appdirs`:
|
|
https://github.com/ActiveState/appdirs/blob/master/appdirs.py
|
|
"""
|
|
|
|
from os import getenv
|
|
from os.path import expanduser, join
|
|
from pathlib import Path
|
|
|
|
|
|
APP_NAME = "bebop"
|
|
|
|
|
|
def get_user_data_path() -> Path:
|
|
"""Return the user data directory path."""
|
|
path = Path(getenv("XDG_DATA_HOME", expanduser("~/.local/share")))
|
|
return path / APP_NAME
|