https://github.com/publicarray/synoedit
Synology package for editing files through a web interface
https://github.com/publicarray/synoedit
file-editor synology
Last synced: about 1 month ago
JSON representation
Synology package for editing files through a web interface
- Host: GitHub
- URL: https://github.com/publicarray/synoedit
- Owner: publicarray
- License: other
- Created: 2018-06-12T08:02:04.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-07-22T12:40:01.000Z (almost 4 years ago)
- Last Synced: 2025-04-14T02:07:58.898Z (about 1 month ago)
- Topics: file-editor, synology
- Language: Go
- Homepage: https://github.com/publicarray/synoedit
- Size: 313 KB
- Stars: 26
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Syno Edit
[](https://goreportcard.com/report/github.com/publicarray/synoedit)
[](https://godoc.org/github.com/publicarray/synoedit/package/src/synoedit)Synology package for editing files through a web interface

## Build using script
```sh
git clone https://github.com/publicarray/synoedit && cd synoedit
./build all # builds all available versions/architectures
./build amd64 # alias to build amd64 architecture only for both DSM6 and DSM7 (good for development)
./build help
Usage: ./build.sh commandCommands:
compress compresses compiled binary with upx
update update dependencies with yarn or npm
dependencies installs npm and go dependencies (yarn/npm and dep)
all compile and package for all architectures and DSM6/7 versions
compile [arch] compile go project: e.g. compile amd64
package [arch] [syno_arch] [min_dsm_version] create spk e.g. package amd64 broadwell 6.1-14715
dev runs '_cp', 'compile' and 'package' commands using the native platform
clean|clear remove all *spk files
lint lint code
test run a simple test
amd64 alias to compile and package for amd64 only, good for quick development
```## Build manually
```sh
git clone https://github.com/publicarray/synoedit.git
cd synoedit/package/src/synoedit
go build -ldflags="-s -w" -o ../../ui/index.cgi
# Run the binary
go run . -h
env SERVER_PROTOCOL=HTTP/1.1 REQUEST_METHOD=GET go run . -dev -config ../../ui/database.toml -layout ../../ui/layout.html
# or
cd ../../ui/
env SERVER_PROTOCOL=HTTP/1.1 REQUEST_METHOD=GET ./index.cgi --dev > test.html
```## Add package support
1. Add your package to the synocommunity group
for synocommunity packages add `SPK_GROUP=synocommunity` to your `Makefile` Otherwise add it to your `privilege` file
```json
{
"defaults": {
"run-as": "package"
},
"groupname": "synocommunity"
}
```2. In the `postinstall` script add group read and write permissions for the files you want to add support for
```sh
chmod g+rw -R "$SYNOPKG_PKGVAR"
```