我可以用 fusion-python 实现有趣的项目

发布于 2024-09-10 02:47:45 字数 124 浏览 8 评论 0原文

我正在考虑改进我的 python,最近读了一篇关于 python-fuse 库的文章。我一直对文件系统的东西很感兴趣,所以我认为这将是一个很好的破解库。

我想不出我应该用这个来实现什么。你们有什么建议或想法可以分享吗?

I was thinking of improving my python and just recently read an article about the python-fuse library. I'm always interested about filesystem stuff so I thought this would be a good library to hack on.

What I can't come up with is an idea of what I should implement with this. Do you guys have any suggestions or ideas that you can share?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

赠意 2024-09-17 02:47:45

FUSE 的典型“酷”功能是在文件系统接口中公开非文件的内容,并且通常存储在其他地方。

现有示例:Gmail 文件系统、SSH 文件系统。
不存在的(据我所知)示例:Twitter 文件系统,将推文显示为文件。或者 Stack Overflow 文件系统,问题和答案作为文件。

The typical 'cool' things with FUSE are exposing in a filesystem interface things that aren't files, and usually are stored somewhere else.

Existing examples: Gmail filesystem, SSH filesystem.
Non existing (that I know of) examples: a Twitter filesystem, that shows tweets as files. Or a Stack Overflow filesystem, questions and answers as files.

七七 2024-09-17 02:47:45

版本化文件系统怎么样?自从我读到 Plan 9 中的实现以来,这似乎一直是一个很酷的想法。您不必编写版本控制部分,因为您可以使用现成的版本控制(如 git)。存储库的内容可以作为文件层次结构公开,旧版本可以是只读目录,对存储库中文件的写访问可以触发提交。

sshfs 的原始版本使用 FUSE 前端,该前端向后端发出 shell 命令以在目标文件系统中移动。您可以很容易地实现类似的东西来输出 git 命令并在存储库上执行操作。

What about a versioned file-system? It has always seemed like a cool idea since I read about the implementation in Plan 9. You wouldn't have to write the versioning part as you could use an off-the-shelf version control like git. The contents of the repository could be exposed as a file hierarchy, older versions could be read-only directories and write access to files in the repository could trigger a commit.

The original versions of sshfs used a FUSE frontend that fired shell commands out the back to move around in the target file-system. You could implement something similar quite easily to output git commands and act on the repository.

心碎无痕… 2024-09-17 02:47:45

将 xml 文件挂载为文件系统,其中元素是目录,其内容存储为普通文件。属性以换行符分隔的名称:值对形式存储在每个目录中的“attributes”文件中。

这将允许使用常见的 shell 工具来修改 XML。 (sed、grep、mkdir、rm、rmdir、cat、vim 等)必须为具有相同名称的多个元素找到一个优雅的解决方案。

所以有点远。您从未说过这一定是一个主意。

Mounting an xml file as a filesystem, where elements are directories, and their contents is stored as a plain file. The attributes are stored in an "attributes" file as newline separated name: value pairs in each directory.

This would allow XML to be modified using the common shell tools. (sed, grep, mkdir, rm, rmdir, cat, vim, etc...) An elegant solution would have to be found for multiple elements with the same name.

So it's a bit far field. You never said that it had to be a good idea.

厌倦 2024-09-17 02:47:45

我不知道 python 是否合适,但也许你可以为 Firefox 中的熔断器提供 URL 处理程序。

例如:sshfs://host/path 将允许通过 Firefox 浏览器探索远程 ssh 主机。

I do not know if python is appropriate, but maybe you can provide URL handlers for fuse in Firefox.

for example: sshfs://host/path would allow to explore remote ssh host via Firefox browser.

幻梦 2024-09-17 02:47:45

也许是一个文件系统,其中文件的行为类似于目录,因此您可以将文件存储在文件中。
或者一个可以在 1 个目录中存储同名文件的文件系统。

Maybe a filesystem where files behave like directories, so you can store files in files.
Or a filesystem where you can store files with the same name in 1 directory.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文