Skip to content

Commit

Permalink
Release 0.5.10: PRs #95, #96, #97, #98, #100
Browse files Browse the repository at this point in the history
  • Loading branch information
frozenbanana committed Jan 15, 2025
1 parent 0c31797 commit ba2e553
Show file tree
Hide file tree
Showing 34 changed files with 1,084 additions and 3,010 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Lint

on:
pull_request:
branches:
- stage
types:
- opened
- synchronize
- reopened

jobs:
php-cs-fixer:
runs-on: ubuntu-latest

strategy:
fail-fast: true

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
tools: composer

- name: Install php-cs-fixer
run: composer require --dev friendsofphp/php-cs-fixer

- name: Run php-cs-fixer
run: vendor/bin/php-cs-fixer fix

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: fix code style"
commit_options: "--no-verify"
commit_user_name: "GitHub Actions"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/build
/dev-environment
js/nextcloud-swarm-plugin*.*
/.php_cs.cache
/.php-cs-fixer.cache

# Package Manages
/node_modules
Expand Down
21 changes: 20 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,31 @@

require_once './vendor/autoload.php';

use Nextcloud\CodingStandard\Config;
use Nextcloud\CodingStandard\Config as Base;
use PhpCsFixer\Runner\Parallel\ParallelConfig;

class Config extends Base {
public function getRules(array $rules = []): array
{
return [
...parent::getRules(), // Nextcloud Standard Rules
'@PSR12' => true,
'@PhpCsFixer' => true,
'global_namespace_import' => [
'import_classes' => true,
],
'trailing_comma_in_multiline' => ['elements' => ['arguments', 'arrays', 'match', 'parameters']],
];
}
}

$config = new Config();
$config
->setParallelConfig(new ParallelConfig(8))
->setRiskyAllowed(true)
->getFinder()
->ignoreVCSIgnored(true)
->notPath('dev-environment')
->notPath('build')
->notPath('l10n')
->notPath('src')
Expand Down
44 changes: 25 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# **Hejbit - Nextcloud Swarm Plugin**

*Bring decentralized, sovereign cloud storage to Nextcloud with the Hejbit Swarm plugin!*
_Bring decentralized, sovereign cloud storage to Nextcloud with the Hejbit Swarm plugin!_

This plugin integrates [Swarm](https://www.ethswarm.org/) (a decentralized, blockchain-connected file storage system) directly into your [Nextcloud ](https://nextcloud.com/)instance.

![File view when using the plugin in Nextcloud](https://github.com/user-attachments/assets/24f89fd9-f8eb-47e3-97ac-e1da41e48072)

## Table of Contents

- [Dependencies](#dependencies)
- [Setup and Installation](#setup-and-installation)
- [Usage](#usage)
- [Settings](#settings)
- [Usage](#usage)
- [Get Hejbit License](#get-hejbit-license)
- [License](#license)
- [Dependencies](#dependencies)
- [Setup and Installation](#setup-and-installation)
- [Usage](#usage)
- [Settings](#settings)
- [Usage](#usage)
- [Get Hejbit License](#get-hejbit-license)
- [License](#license)

## Dependencies

Before using the plugin, ensure you have the following:

- An active Nextcloud instance (version 27,28 or 29)
- A valid license and URL to activate the service
- [Request Your Free Nextcloud Swarm Plugin Trial License](https://metaprovide.org/hejbit/start)
- An active Nextcloud instance (version 27,28 or 29)
- A valid license and URL to activate the service
- [Request Your Free Nextcloud Swarm Plugin Trial License](https://metaprovide.org/hejbit/start)

## Setup and Installation

Expand All @@ -37,9 +37,9 @@ Follow these steps to configure Hejbit Swarm in Nextcloud:

Once installed, Hejbit Swarm integrates directly with Nextcloud’s "Files" section, allowing seamless file operations:

- **Upload:** Transfer files to decentralized storage.
- **Download:** Retrieve and view files from decentralized storage.
- **Copy/Move:** Shift files between any external storage and decentralized storage
- **Upload:** Transfer files to decentralized storage.
- **Download:** Retrieve and view files from decentralized storage.
- **Copy/Move:** Shift files between any external storage and decentralized storage

![View, download, and file view actions in Nextcloud](https://github.com/user-attachments/assets/3bee08e4-7a9e-4b44-a904-821359cc3e7b)

Expand All @@ -53,23 +53,29 @@ Users with administrative credentials can configure the plugin through the stand

Once setup and configured, the Decentralized Storage is ready to use.

- Access the Decentralized Storage folder under "All Files" or via the "Files" menu under "External Storage."
- Upload files as you would in Nextcloud.
- Access the Decentralized Storage folder under "All Files" or via the "Files" menu under "External Storage."
- Upload files as you would in Nextcloud.

![Upload file to swarm in Nextcloud](https://github.com/user-attachments/assets/aadd664e-26ca-470a-a27b-af8d94351e52)

- Once uploaded, it can be viewed internally or downloaded. It can also be copied to another storage.
- Once uploaded, it can be viewed internally or downloaded. It can also be copied to another storage.

![View, download, and file view actions in Nextcloud](https://github.com/user-attachments/assets/596b72ed-d97f-48ba-bcb9-0ee5ff581a3c)

- Files from another Nextcloud storage can also be copied/moved to the decentralized storage.. Choose the decentralized storage folder as the target Folder
- Files from another Nextcloud storage can also be copied/moved to the decentralized storage.. Choose the decentralized storage folder as the target Folder

![Copying or moving files to decentralized storage folder](https://github.com/user-attachments/assets/ceed3585-f7e6-4f16-b371-d61402e9f1e9)

- Right-click on a Swarm file to copy the Swarm reference (hash) to your clipboard. Alternatively, click the three dots in the Actions menu and select 'Copy Swarm Reference.' The Swarm reference is the unique address of the file on the Swarm network.
- Right-click on a Swarm file to copy the Swarm reference (hash) to your clipboard. Alternatively, click the three dots in the Actions menu and select 'Copy Swarm Reference.' The Swarm reference is the unique address of the file on the Swarm network.

![Copy swarm reference to clipboard](https://github.com/user-attachments/assets/cc73282b-e32e-411f-a94b-a2ac3313f60b)

### Additional Integration with Moodle

You can also enhance your experience by integrating the Hejbit Swarm plugin with the **Moodle Nextcloud plugin**. This integration allows users to access decentralized storage directly within the Moodle environment, providing a seamless experience for educational content management. For more information on how to set up this integration, visit the [Moodle Nextcloud repository documentation](https://docs.moodle.org/405/en/Nextcloud_repository).

For detailed guidance on using the integrated features, please refer to the [Metaprovide Learning Platform](https://learning.metaprovide.org/login/index.php).

### Get Hejbit License

Experience the future of data storage with 5GB of free, decentralized storage on the Ethereum Swarm network. Our plugin seamlessly integrates with your existing Nextcloud interface, providing true data sovereignty without the complexity.
Expand Down
6 changes: 6 additions & 0 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ Once setup and configured, the Decentralized Storage is ready to use.
- Files from another Nextcloud storage can also be copied/moved to the decentralized storage. Choose the decentralized storage folder as the target Folder.
- Right-click on a Swarm file to copy the Swarm reference (hash) to your clipboard. Alternatively, click the three dots in the Actions menu and select 'Copy Swarm Reference.' The Swarm reference is the unique address of the file on the Swarm network.
### Additional Integration with Moodle
You can also enhance your experience by integrating the Hejbit Swarm plugin with the **Moodle Nextcloud plugin**. This integration allows users to access decentralized storage directly within the Moodle environment, providing a seamless experience for educational content management. For more information on how to set up this integration, visit the [Moodle Nextcloud repository documentation](https://docs.moodle.org/405/en/Nextcloud_repository).
For detailed guidance on using the integrated features, please refer to the [Metaprovide Learning Platform](https://learning.metaprovide.org/login/index.php).
### **Hejbit Licence**
Experience the future of data storage with 5GB of free, decentralized storage on the Ethereum Swarm network. Our plugin seamlessly integrates with your existing Nextcloud interface, providing true data sovereignty without the complexity.
Expand Down
3 changes: 0 additions & 3 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

/**
* @copyright Copyright (c) 2022, MetaProvide Holding EKF
*
* @author Ron Trevor <ecoron@proton.me>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
Expand All @@ -21,7 +19,6 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
return ['routes' => [
[
Expand Down
10 changes: 8 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"autoload-dev": {
"psr-4": {
"OC\\": "dev-environment/nextcloud_source/lib/",
"OCP\\": "dev-environment/nextcloud_source/lib/public/",
"OCA\\Files_External\\": "dev-environment/nextcloud_source/apps/files_external/lib/",
"OCA\\Files_External_Ethswarm\\": "lib/"
Expand All @@ -10,7 +11,12 @@
"ext-curl": "*"
},
"require-dev": {
"nextcloud/coding-standard": "^0.5.0",
"christophwurst/nextcloud": "^22"
"nextcloud/coding-standard": "^1.3.2",
"ext-fileinfo": "*",
"friendsofphp/php-cs-fixer": "*"
},
"scripts": {
"cs:check": "./vendor/php-cs-fixer/shim/php-cs-fixer.phar fix --dry-run --diff",
"cs:fix": "./vendor/php-cs-fixer/shim/php-cs-fixer.phar fix"
}
}
Loading

0 comments on commit ba2e553

Please sign in to comment.