Skip to content

Commit

Permalink
docs: README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
icrdr committed Apr 2, 2024
1 parent 2a705a7 commit 3f7dbc2
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Omoospace

[In Chinese](https://www.figma.com/proto/JsTmI3JwGQ3Q3qEThAJv15/Omoospace?page-id=0%3A1&type=design&node-id=1-2&viewport=-726%2C827%2C0.2&t=gOuR9PgBJRNM62R0-1&scaling=contain&mode=design)
[中文文档](https://www.figma.com/proto/JsTmI3JwGQ3Q3qEThAJv15/Omoospace?page-id=0%3A1&type=design&node-id=1-2&viewport=-726%2C827%2C0.2&t=gOuR9PgBJRNM62R0-1&scaling=contain&mode=design)

Omoospace is a scalable directory structure solution for digital creation works. We provide a Python library for managing omoospace, including creating omoospace, shipping packages, setting subspace, etc.

Expand Down
40 changes: 33 additions & 7 deletions docs/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pip install omoospace

## Omoospace

### Create New Omoospace
### Create a Omoospace

```python
from omoospace import create_omoospace
Expand All @@ -31,7 +31,7 @@ assert len(omoos.entities) == 0
assert len(omoos.subspace_tree_dict) == 0
```

### Manage Omoospace
### Manage Omoospaces

Example omoospace:

Expand Down Expand Up @@ -95,7 +95,7 @@ assert tree_dict[1]['data'].node_name == "AssetC"
assert len(tree_dict[1]['data'].children) == 2
```

### Manage Subspace
### Manage Subspaces

Example omoospace:

Expand Down Expand Up @@ -138,7 +138,7 @@ assert subs_Valves.route == ['Heart', 'Valves']
assert subs_Valves.description == 'The valves of heart.'
```

### Manage Process
### Manage Processes

```python
from omoospace import Omoospace
Expand Down Expand Up @@ -175,7 +175,7 @@ subs_Heart = omoos.get_subspace(file_path)
assert subs_Heart.route == ['Heart']
```

### Manage Creator
### Manage Creators

```python
from omoospace import Omoospace
Expand Down Expand Up @@ -203,7 +203,7 @@ creator.role = 'Director'
assert omoos.creators[0].role == 'Director'
```

### Manage Software
### Manage Softwares

```python
from omoospace import Omoospace
Expand Down Expand Up @@ -238,7 +238,7 @@ software.set_plugin(
assert len(software.plugins) == 1
```

### Manage Work
### Manage Works

Example omoospace:

Expand Down Expand Up @@ -339,6 +339,32 @@ More examples:

## Utils

### Format a Name

```python
from omoospace import format_name

assert format_name('SQ010_SH0100_001') == 'SQ010_SH0100'
```

| Original Name | Format Name |
| --------------------- | ------------ |
| SQ010_SH0100_001 | SQ010_SH0100 |
| SQ010_SH0100_v001 | SQ010_SH0100 |
| Asset A v001 | AssetA |
| Asset A autosave | AssetA |
| Asset_A autosave | Asset_A |
| Asset_a_autosave_001 | Asset_A |
| Asset_a_autosave_v001 | Asset_A |
| 头骨\_v001 | TouGu |
| 头骨\_0001 | TouGu |
| Asset 头骨\_0001 | AssetTouGu |
| AssetA_bak3 | AssetA |
| AssetA_bak001 | AssetA |
| AssetA_recovered | AssetA |
| AssetA_recovered_bak1 | AssetA |
| backup | |

### Reveal in File Explorer

```python
Expand Down
6 changes: 3 additions & 3 deletions omoospace/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ def remove_duplicates(list, key):
return new_list


def reveal_in_explorer(dir: PathLike):
def reveal_in_explorer(dst: PathLike):
"""Open the directory in file exploarer
Args:
dir (PathLike): The directory want to open
dst (PathLike): The directory want to open
"""
try:
os.startfile(Path(dir).resolve())
os.startfile(Path(dst))
except Exception as err:
print("Fail to reveal", err)

Expand Down

0 comments on commit 3f7dbc2

Please sign in to comment.