Metadata-Version: 2.1
Name: notion-tree
Version: 0.0.1a1
Summary: UNKNOWN
Home-page: https://github.com/aureplop/notion-tree
Author: Aurélien Delobelle
Author-email: aurelien.delobelle@gmail.com
License: MIT
Project-URL: Source, https://github.com/aureplop/notion-tree
Project-URL: Tracker, https://github.com/aureplop/notion-tree/issues
Keywords: notion structure hierarchy export import sync
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# notion-tree

Hierarchic operations with Notion API, thanks to [notion-py](https://github.com/jamalex/notion-py).

## Requirements

- Python ≥ 3.6
- aureplop/notion-py, fork of https://github.com/jamalex/notion-py, with importFile feature

## Installation

Not available on Pypi at the moment.

```sh
$ git clone git@github.com:aureplop/notion-tree.git
$ cd notion-tree
$ pip install -r requirements.txt
```

## Usage

```
$ python notiontree/hierarchy.py --dir path/to/local/root --root-parent-url https://www.notion.so/id/to/parent/of/local/root
```

Assuming you had this hierarchy on Notion:
```
workspace
└── parent-root  # URL: https://www.notion.so/id/to/parent/of/local/root
```
And that you have this local structure:
```
path/to/local
└── root
    ├── index.md
    ├── dir1
    │   ├── index.md
    │   └── page1.md
    └── dir2
        └── page2.md
```
After running the command above, you will get this structure on your Notion workspace:
```
workspace
└── parent-root           # URL: https://www.notion.so/id/to/parent/of/local/root
    └── root              # Includes links to dir1 and dir2 + content of root/index.md
        ├── dir1          # Includes links to dir1/page1.md + content of root/dir1/index.md
        │   └── page1.md
        └── dir2          # Includes links to dir2/page2.md
            └── page2.md
```

## Todos

- Split 'notiontree/hierarchy.py' to multiple modules.
- Use 'click' for CLI.
- Package app.
- Document --github-wiki-root in README.
- Create stub pages in another page than 'root' to be able to import root index.html w/o removing other stub pages.
- Accept other filenames for index files (currently limited to 'index.md').
- Improve link resolver configuration.


