Update README

pull/37/head
Varun Patil 2022-08-16 01:28:40 +00:00
parent 0273dfc63e
commit 002771590b
1 changed files with 18 additions and 42 deletions

View File

@ -1,52 +1,28 @@
# Polaroid
Place this app in **nextcloud/apps/**
## Building the app
**📸 Yet another photo management app for Nextcloud**
The app can be built by using the provided Makefile by running:
## How is this different?
make
* **📸 Photo and Video Timeline**: Sorts photos by date taken.
* **🤔 Quick Recap**: Jump to anywhere in the timeline instantly.
This requires the following things to be present:
* make
* which
* tar: for building the archive
* curl: used if phpunit and composer are not installed to fetch them from the web
* npm: for building and testing everything JS, only required if a package.json is placed inside the **js/** folder
## 🚀 Installation
The make command will install or update Composer dependencies if a composer.json is present and also **npm run build** if a package.json is present in the **js/** folder. The npm **build** script should use local paths for build systems and package managers, so people that simply want to build the app won't need to install npm libraries globally, e.g.:
1. ☁ Clone this into your `apps` folder of your Nextcloud.
1. Run `php ./occ polaroid:index` to generate metadata indices for existing photos.
1. Consider installing the [preview generator](https://github.com/rullzer/previewgenerator) for pre-generating thumbnails.
**package.json**:
```json
"scripts": {
"test": "node node_modules/gulp-cli/bin/gulp.js karma",
"prebuild": "npm install && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update",
"build": "node node_modules/gulp-cli/bin/gulp.js"
}
```
## 🏗 Development setup
1. ☁ Clone this into your `apps` folder of your Nextcloud.
1. 👩‍💻 In a terminal, run the command `make dev-setup` to install the dependencies.
1. 🏗 Then to build the Javascript whenever you make changes, run `make build-js`. To create a pull request use `make build-js-production`. Watch changes with: `make watch-js`.
1. ✅ Enable the app through the app management of your Nextcloud.
1. 🎉 Partytime!
## Publish to App Store
## Why a separate app?
The approach of this app is fundamentally different from the official Nextcloud Photos app, which is extremely lightweight. This app instead maintains special metadata in a separate table on the backend, and thus can be considered to have different objectives.
First get an account for the [App Store](http://apps.nextcloud.com/) then run:
make && make appstore
The archive is located in build/artifacts/appstore and can then be uploaded to the App Store.
## Running tests
You can use the provided Makefile to run all tests by using:
make test
This will run the PHP unit and integration tests and if a package.json is present in the **js/** folder will execute **npm run test**
Of course you can also install [PHPUnit](http://phpunit.de/getting-started.html) and use the configurations directly:
phpunit -c phpunit.xml
or:
phpunit -c phpunit.integration.xml
for integration tests
## Special Thanks 🙏🏻
Nextcloud team. At least one half of the code is based on the work of the [Nextcloud Photos](https://github.com/nextcloud/photos).