moodlefuse/README.md

65 lines
2.1 KiB
Markdown
Raw Normal View History

2023-05-01 01:12:48 +02:00
# moodlefuse - FUSE filesystem for Moodle
2023-05-01 11:47:05 +02:00
[![CodeFactor](https://www.codefactor.io/repository/github/matmasit/moodlefuse/badge/main)](https://www.codefactor.io/repository/github/matmasit/moodlefuse/overview/main)
2023-05-01 01:12:48 +02:00
This is a FUSE filesystem for Moodle. It allows you to mount your Moodle site as a filesystem and access your Moodle files as if they were local files.
It is a concept that has been around for a while, but I have not found any implementations that I could get to work, or that were not abandoned.
This is my attempt at creating one.
2023-05-09 16:17:22 +02:00
## Windows binary
2023-05-09 16:26:54 +02:00
You can easily grab a Windows binary in the _realeases_ section, it behaves as the program with all dependencies already resolved in a single file (thanks, pyinstaller), make sure to place the env file alongside it with the correct credentials.
</u>**You need to install [Winsfp](https://winfsp.dev/) to run the program on Windows.**</u>
2023-05-09 16:17:22 +02:00
2023-05-01 01:12:48 +02:00
## Installation
First, you need to create a `.env` file with the following variables:
```bash
SITE=https://moodle.example.com
MOODLE_USERNAME=yourusername
PASSWORD=yourpassword
MOUNT=/path/to/mountpoint
```
Then, just run the python script with the requirements installed. You can use a virtual environment if you want.
```bash
pip install -r requirements.txt
2024-01-15 00:05:36 +01:00
python main.py
2023-05-01 01:12:48 +02:00
```
2023-05-09 16:26:54 +02:00
This works on Linux and Windows. I have not tested it on Mac OS, but it could work there too.
2023-05-01 01:12:48 +02:00
2023-05-09 16:17:22 +02:00
> Q: Why is _refuse_ in the project root?
> It's alpha software with some errors, I managed to make it fit for this project for now
2023-05-01 01:12:48 +02:00
### Requirements
* Python 3.6 or newer
2023-05-09 16:26:54 +02:00
* refuse - cross platform FUSE bindings
2023-05-01 01:12:48 +02:00
* requests - HTTP library for Python
* python-dotenv - Python library for reading .env files
### Features
* Read-only filesystem to read your Moodle files and announcements
* In-memory file caching mechanism
* Automatic html-to-markdown conversion for announcements
### Future enhancements
2023-05-09 16:26:54 +02:00
* Fix invisible top-level files
2023-05-03 23:08:25 +02:00
* Better memory handling (customizable), expecially for large files (chunking)
2023-05-01 01:12:48 +02:00
* Forum viewing support
* Persistent tree cache (currently it is built at every mount)
* Better error handling
* Better logging
* Better documentation
2023-05-09 16:31:53 +02:00
* GUI
2023-05-01 01:12:48 +02:00
### Demo
2023-05-09 16:26:54 +02:00
![Demo](preview.gif)