We never really want to build this, but it makes `go get ./...`
complain because it imports programs (and not modules), so add
a build flag.
FYI this is known as the "tools.go" pattern, as discussed here:
- https://github.com/golang/go/issues/25922
github.com/gopherjs/gopherjs no longer supports new Go versions and
doing a full perkeep build currently requires go 1.12.
This moves to github.com/goplusjs/gopherjs which supports new Go
version. Building perkeep no longer requires go 1.12.
- Support building webui with just go 1.15
- Before this PR, reactGen was built from the vendor directory.
Now, it is built with gomodules. We can't run it with `go run`
because it breaks myitcv.io/gogenerate which they use to determine
what file to compile.
- go.mod: require go 1.15
- goplusjs/gopherjs is built and ran with gomodules. We run it
with go run github.com/goplusjs/gopherjs
- Add test-tidy workflow to ensure that go.mod can't drift.
- We use go run -mod=readonly so packages are not sneakily updated.
Any update in go.mod should be voluntary.
the perkeep MkdirAll never worked on Windows anyway, since it was calling
path.Dir rather than filepath.Dir. But now that the sftp client supports
MkdirAll, let's use it.
os.Symlink returns a nil error in some cases (when permissions allow), but
still does not behave as expected. Skip Windows altogether from some of these
tests for the time being.
#Issue:
The link pointing to "camlistore.org" will redirect back to "perkeep.org" anyways, so updated with relative link.
#Change:
Updated "Contributing" link from "https://camlistore.org/doc/contributing" to "/code#contributing".
This just generalizes PdfDetail to also recognize text/plain. It has
been renamed BrowserViewDetail to reflect its more general nature.
Adding more formats will now be trivial: just add entries to the
`supportedMimeTypes` array.
This is in relation to #580; we will need something like it to hook
Bleve up to the index. Currently only the SQL backends are implemented;
the rest is still TODO.
This also updates the version of the postgres library that we're using;
the old one didn't support setting the isolation level in TxOptions.
Change-Id: I14fdf74832e088d164b757417bfbb500a752d216
Summary:
Implement audio player using web ui.
Add new blob aspect for audio files.
Test Plan:
1. Upload browser compatible audio to perkeep
2. Navigate to web UI
3. Open the audio blob's detail page
4. Play audio
Before:
Audio cannot be played using web ui
After:
Compatible audio can be played and paused from the detail page
Audio title and artist are shown if available
Issue: #202
Change-Id: Icd450aaa16e9e622a677c23f4f1f699784453dbc
Summary:
Implement audio preview using web ui.
Add new blob handler for audio files.
Test Plan:
1. Upload browser compatible audio to perkeep
2. Navigate to web UI
3. Play audio without leaving perkeep ui
4. Pause audio
Before:
Audio cannot be played using web ui
After:
Compatible audio can be visually identified by the volume icon instead of the default file icon.
Hovering over the audio blob shows a play button.
Click the play button to start playing the audio.
Click the pause button to stop playing the audio.
Issue: #202
Change-Id: Iab8ee4a339f44178992e11e02232d480cd534b3e
This change allows the use of the default GCS client when not on GCE. It
simply removes the GCE metadata server check. GCS users should set the
GOOGLE_APPLICATION_CREDENTIALS environment variable to point to a
service account JSON key.
Change-Id: I49d68c17f535185b96196309bab926e810d4fd43
This change:
1) makes perkeep.org/server/perkeepd/ui/goui a module on its own, so that it
gets ignored by go mod with respect to perkeep.org. Because there's no reason it
should appear in perkeep.org/go.mod, as it is only used by gopherjs to rebuild
the web UI code.
2) updates a few of our dependencies to keep up with upstream changes (go get
-u, go mod tidy, go mod vendor).
3) readds manually (since go mod vendor removes them)
vendor/github.com/gopherjs/gopherjs (and its deps) as well as vendor/myitcv.io
because they are needed when one wants to rebuild the web UI.
As a result I think we can now drop dep, so it is done in this change as
well.
Change-Id: I155819163e15e214a6ba44bab2c19ae171d83d1b