Metadata-Version: 2.4
Name: onedrivepath
Version: 0.2.0
Summary: Resolve a path inside your local OneDrive folder, cross-platform
Author-email: Reece Lawrence <rllawrence03@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/Rllawrence03/python-onedrivepath
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# python-onedrivepath

Resolve a path inside your local OneDrive folder, cross-platform

## Install

```
pip install onedrivepath
```

To edit, install in editable mode instead and just modify the files in this repo directly:

```
pip install -e .
```

Installed via PyPI, so update to the latest published version with:

```
pip install --upgrade onedrivepath
```

## OneDrivePath

Resolves a path inside your local OneDrive folder (Windows/macOS; best-effort on Linux via unofficial clients).

```python
from OneDrivePath import onedrivePath

onedrivePath("/folder/I/Care/About/")
# 'C:/Users/.../OneDrive/folder/I/Care/About'

onedrivePath()
# 'C:/Users/.../OneDrive'
```

If you have multiple OneDrive accounts (e.g. personal + work/school), pass `account` to
pick one. Matching is a case- and punctuation-insensitive substring check against the
local folder name, the same way on every platform:

```python
onedrivePath(account="google")
# 'C:/Users/.../OneDrive - Google'

onedrivePath("Research/Data", account="google")
# 'C:/Users/.../OneDrive - Google/Research/Data'
```

This matches whatever your OneDrive folder is actually named.

 e.g. if your school's folder is `OneDrive - Neuromob University`:

```python
onedrivePath(account="neuromob")
# 'C:/Users/.../OneDrive - Neuromob University'

onedrivePath("Coursework", account="neuromob")
# 'C:/Users/.../OneDrive - Neuromob University/Coursework'
```

If you'll be using the same account for most calls, set it once with `setAccount` instead
of passing `account` every time. It validates immediately, so a bad name fails fast:

```python
from OneDrivePath import onedrivePath, setAccount

setAccount("neuromob")

onedrivePath()
# 'C:/Users/.../OneDrive - Neuromob University'

onedrivePath("Coursework")
# 'C:/Users/.../OneDrive - Neuromob University/Coursework'

onedrivePath("Photos", account="google")  # per-call account still overrides
# 'C:/Users/.../OneDrive - Google/Photos'
```

