|
|
# Installation
|
|
|
|
|
|
Nothing special to install GpxMotion. You can get it from the app websites or clone this repository.
|
|
|
|
|
|
## Download on app website
|
|
|
```
|
|
|
cp ~/Downloads/gpxmotion-0.0.1.tar.gz /path/to/nextcloud/apps/
|
|
|
cd /path/to/nextcloud/apps/
|
|
|
tar xvf gpxmotion-0.0.1.tar.gz
|
|
|
rm gpxmotion-0.0.1.tar.gz
|
|
|
```
|
|
|
|
|
|
## Clone the repository
|
|
|
```
|
|
|
cd /path/to/nextcloud/apps/
|
|
|
git clone https://gitlab.com/eneiluj/gpxmotion-oc gpxmotion
|
|
|
```
|
|
|
|
|
|
# Integration in "Files" app (optional, tested with Nextcloud 11 and 12)
|
|
|
|
|
|
If you want to be able to edit a .gpx file directly from the "Files" app, you have to add a MimeType to your Nextcloud/Owncloud instance. The clean way to do it is to create ```/path/to/nextcloud/config/mimetypemapping.json``` file and set its content :
|
|
|
|
|
|
```
|
|
|
{
|
|
|
"gpx": ["application/gpx+xml"]
|
|
|
}
|
|
|
```
|
|
|
This will only be effective on new .gpx files. If you want your instance to recognize all existing .gpx files with the correct mimetype, you have to make it rescan the user files (adapt path and web server user it to your context) :
|
|
|
|
|
|
```
|
|
|
sudo -u www-data php /var/www/html/nextcloud/occ files:scan --all
|
|
|
```
|
|
|
|
|
|
For logged in users, the "view in GpxMotion" action is available in context menu for .gpx files.
|
|
|
|
|
|
# Change icons of .gpx files (optional, tested with Nextcloud 11 and 12)
|
|
|
|
|
|
Copy the gpx filetype icon in the right place :
|
|
|
```
|
|
|
sudo -u www-data cp /path/to/nextcloud/apps/gpxmotion/img/gpx.svg /path/to/nextcloud/core/img/filetypes/
|
|
|
```
|
|
|
|
|
|
Create ```/path/to/nextcloud/config/mimetypealiases.json``` file and set its content to :
|
|
|
|
|
|
```
|
|
|
{
|
|
|
"application/gpx+xml": "gpx"
|
|
|
}
|
|
|
```
|
|
|
|
|
|
Then run :
|
|
|
|
|
|
```
|
|
|
sudo -u www-data php /path/to/nextcloud/occ maintenance:mimetype:update-js
|
|
|
``` |