Skip to content

Commit

Permalink
Merge pull request #128 from basenana/feature/update-readme
Browse files Browse the repository at this point in the history
update: readme.md
  • Loading branch information
hyponet authored Jun 16, 2024
2 parents eb59577 + 75d7b52 commit 79c037f
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 36 deletions.
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# NanaFS
# 🗄NanaFS

![unittest workflow](https://github.com/basenana/nanafs/actions/workflows/unittest.yml/badge.svg)
![pages-build-deployment](https://github.com/basenana/nanafs/actions/workflows/pages/pages-build-deployment/badge.svg)

<p align="right">[ English | <a href="https://github.com/basenana/nanafs/blob/main/README_zh.md">简体中文</a> ]</p>

NanaFS is a workflow engine that simplifies data management
by allowing users to manage structured and unstructured data in one place,
rather than across multiple sources. It's like a filing cabinet
that combines all your documents, emails, and to-do lists,
making it easier to manage everything at once.
NanaFS is a **Reference Filing System** inspired by the [GTD (Getting Things Done®)](https://gettingthingsdone.com/wp-content/uploads/2014/10/Filing.pdf) methodology,
designed to collect, store, and process information that does not require immediate action but may be useful in the future.

NanaFS is also customizable through plugin support,
meaning users can tailor the workflow engine to their specific needs.
This makes NanaFS a versatile and valuable tool for personal, academic, and professional use.
In personal, academic, and professional life, vast amounts of data and materials are scattered across various information silos,
such as Office documents, emails, RSS feeds, and work notes. While isolated data may seem insignificant,
it can become crucial for future projects. Whether it's a paper in progress or a PowerPoint presentation,
data serves specific purposes.

## Key Features
NanaFS treats files as first-class citizens, aiming to build a system
that enables quick collection, intelligent categorization, complex querying, and AI enhancement.

### Cloud-Based Storage
## 🚩 Key Features

### 🪄 Cloud-Based Storage

NanaFS utilizes cloud-based storage as main backend storage,
supporting not only object storage but also file-hosting service.
Expand All @@ -30,7 +31,7 @@ The following storage options are already supported or planned to be supported:
- **Cloud Drive**: Google Drive, OneDrive, AliyunDrive, BaiduWangpan
- **Other Storage Protocols**: WebDAV

### POSIX Compatibility
### 🗃 POSIX Compatibility

NanaFS offers a file system interface that complies with the POSIX standard through FUSE.
This makes it easy to mount NanaFS onto the directory tree and manage NanaFS data using tools such as Finder on MacOS
Expand All @@ -41,7 +42,7 @@ systems.
This means that existing commands and tools can be used to efficiently process data in NanaFS. For specific needs,
custom scripts or programs can also be written to process files in NanaFS.

### File-Centric Workflow
### ⚙️ File-Centric Workflow

The actual value of data storage lies in its use. To facilitate this,
NanaFS provides a file-centric workflow engine equipped with rule-based automatic file processing capabilities.
Expand All @@ -50,7 +51,7 @@ With the workflow engine, tasks such as batch file renaming and creating semanti
very simple.
This eases data manipulation, makes data no longer "cold," and helps uncover more inherent value in the data.

### Plugin Support
### 🔌 Plugin Support

NanaFS supports multiple types of plugins to extend its capabilities. Currently, NanaFS primarily supports three types
of plugins:
Expand All @@ -60,19 +61,19 @@ of plugins:
- **Process Plugin**: provides file processing capabilities and enhances the functionality of workflows by extending
Process Plugins.

### Data Security
### 🔐 Data Security

Data security is a prerequisite for data storage and usage.
NanaFS provides end-to-end encryption from storage to transmission, ensuring that your cloud data cannot be accessed
even if it is stolen by hackers.
Similarly, cloud service providers cannot access or modify your data, ensuring that your data is not leaked or misused.

## Usage
## 🚀 Usage

NanaFS's usage guidelines, including its parameters and examples of tools and commands, are documented
in [Instructions For Usage](https://github.com/basenana/nanafs/blob/main/docs/usage.md).

## Feedback
## ✉️ Feedback

If you encounter any problems while using NanaFS, whether it's related to usage, bugs, or you have suggestions for new
features,
Expand Down
26 changes: 13 additions & 13 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@

<p align="right">[ <a href="https://github.com/basenana/nanafs/blob/main/README.md">English</a> | 简体中文 ]</p>

NanaFS 是一款文件系统风格的工作流引擎,也是一款尝试将结构化和非结构化数据的统一管理的数据仓库。
NanaFS 是一款受 [GTD®](https://gettingthingsdone.com/wp-content/uploads/2014/10/Filing.pdf) 方法论启发的**参考资料归档系统**
用于收集、存储、处理那些不需要立即采取行动,但可能在未来有用的信息。

在个人工作、学习和生活中,大量的数据和材料存储在不同的信息孤岛之中,例如 Office 文件、电子邮件、RSS、工作笔记、待办记事等。
孤立的数据没有价值,无论是一个刚起步的项目还是酝酿一篇论文,数据是为具体场景服务的。 我曾花费很多时间编写胶水脚本,使它们可以被一起管理。
为什么不构建一个内建工作流,并提供具体场景数据入口的文件系统呢,于是 NanaFS 应运而生。
在个人工作、学习和生活中,大量的数据和材料存储在不同的信息孤岛之中,例如 Office 文件、电子邮件、RSS、工作笔记等。
孤立的数据没有价值,但有朝一日可能成为某个项目的重要素材。无论是一篇酝酿中的论文还是一份演讲 PPT,数据是为具体场景服务的。

NanaFS 采用一个统一的文件模型,将来自多种数据源的数据汇总至同一位置,并基于统一的存储提供通用的工作流能力
NanaFS 以文件为第一公民,目标构建一套快速收集、智能归类、复杂查询、AI 加持的参考资料归档系统

## 核心特性
## 🚩 核心特性

### 基于云端存储
### 🪄 基于云端存储

NanaFS 采用云端存储技术作为其主要后端存储方式,不仅仅支持对象存储,也支持网络硬盘。因此,凭借云端存储的能力,NanaFS
不但可以价格可控的拥有近乎无限的存储容量,也使得用户可以随时随地访问其保存在云端的数据。
Expand All @@ -26,7 +26,7 @@ NanaFS 采用云端存储技术作为其主要后端存储方式,不仅仅支
- **云盘类**:Google Drive、OneDrive、阿里云盘、百度网盘
- **其他存储协议**:WebDAV

### POSIX 兼容
### 🗃 POSIX 兼容

NanaFS 通过 FUSE 提供了符合 POSIX 标准的文件系统接口。这使得在 Linux 和 MacOS 操作系统中,可以轻松地将 NanaFS
挂载到目录树上,并通过访达等工具管理 NanaFS 中的数据。
Expand All @@ -35,28 +35,28 @@ NanaFS 通过 FUSE 提供了符合 POSIX 标准的文件系统接口。这使得
NanaFS 中的数据进行处理。
对于特定需求,也可以通过编写处理文件的脚本或程序,实现自定义处理 NanaFS 中的文件。

### 面向文件的工作流
### ⚙️ 面向文件的工作流

数据存储的实际价值在于数据的使用。NanaFS 为此提供了面向文件的工作流引擎,并配备了基于规则的文件自动处理能力。

基于工作流的能力,无论是文件的批量重命名,还是创建基于文件内容语义的索引都变得十分简单。轻松地操控数据,让数据不再冰冷,发掘数据中蕴含的更多价值。

### 支持插件
### 🔌 支持插件

NanaFS 通过支持多种类型的插件,以实现对功能的拓展。目前 NanaFS 主要支持三种类型的插件:

- **Source Plugin**:定期的从源地址同步数据并收纳到 NanaFS 中,比如聚合 RSS 信息,根据 SMTP 协议归档电子邮件;
- **Process Plugin**:提供文件处理能力,通过拓展 Process Plugin,增强 Workflow 的功能。

### 数据安全
### 🔐 数据安全

数据安全是进行数据存储和使用的前提条件。NanaFS
提供从存储到传输的全链路加密,即使您的云端数据被窃取,黑客也无法获取您的数据。同样,云服务提供商也无法访问和修改您的数据,保证了您的数据不会被泄露和滥用。

## 使用
## 🚀 使用

NanaFS 的使用方式参数文档 [Instructions For Usage](https://github.com/basenana/nanafs/blob/main/docs/usage_zh.md)

## 反馈
## ✉️ 反馈

如果您在使用NanaFS时遇到任何问题,无论是相关于使用方式、Bugs,还是您有新功能的建议,请随时创建 issue。
21 changes: 15 additions & 6 deletions cmd/apps/apis/fsapi/v1/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,12 @@ func (s *services) GetEntryDetail(ctx context.Context, request *GetEntryDetailRe
return nil, status.Error(common.FsApiError(err), "has no permission")
}

p, err := s.ctrl.GetEntry(ctx, en.ParentID)
if err != nil {
return nil, status.Error(common.FsApiError(err), "query entry parent failed")
var p *types.Metadata
if en.ParentID != dentry.RootEntryID {
p, err = s.ctrl.GetEntry(ctx, en.ParentID)
if err != nil {
return nil, status.Error(common.FsApiError(err), "query entry parent failed")
}
}

properties, err := s.queryEntryProperties(ctx, en.ID, en.ParentID)
Expand Down Expand Up @@ -1035,9 +1038,15 @@ func (s *services) TriggerWorkflow(ctx context.Context, request *TriggerWorkflow
}

func (s *services) queryEntryProperties(ctx context.Context, entryID, parentID int64) ([]*Property, error) {
properties, err := s.ctrl.ListEntryProperties(ctx, parentID)
if err != nil {
return nil, err
var (
properties = make(map[string]types.PropertyItem)
err error
)
if parentID != dentry.RootEntryID {
properties, err = s.ctrl.ListEntryProperties(ctx, parentID)
if err != nil {
return nil, err
}
}
entryProperties, err := s.ctrl.ListEntryProperties(ctx, entryID)
if err != nil {
Expand Down

0 comments on commit 79c037f

Please sign in to comment.