The publisher app required GopherJS which has been behind upstream Go
for many years. This just removes all GopherJS stuff, breaking the publisher
app in the process. We'll have to rewrite it.
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
AppEngine lets you do just about anything these days. No need to cater
to the ancient limited version.
Signed-off-by: Brad Fitzpatrick <brad@danga.com>
Since we do not systematically regenerate app/publisher/js/zsearch.go
anymore (because it's part of building the web UI process),
go test ./app/publisher/js
would fail. But we want go test ./... to succeed, so we add build tags
in ./app/publisher/js so that it gets ignored by default.
Change-Id: Ia77689ed937411a628e903189433b70be659e941
- correct logging that logged functions instead of their value
- use ID vs Id naming
- use correct function names in comments
Change-Id: I61562cef7ebac7337ec6c85312cdf7915cb1a84b
I had intended for this to be a small change.
I was going to just add context.Context to the BlobReceiver interface,
but then I saw blob.Fetcher could also use one, so I decided to do two
in one CL.
And then it got a bit infectious and ended up touching everything.
I ended up doing SubFetch in the process by necessity.
At a certain point I finally started using context.TODO() in a few
spots, but not too many. But removing context.TODO() will come in the
future. There are more blob storage interfaces lacking context, too,
like RemoveBlobs.
Updates #733
Change-Id: Idf273180b3f8e397ac5929c6d7f520ccc5cdce08
Part of the project renaming, issue #981.
After this, users will need to mv their $GOPATH/src/camlistore.org to
$GOPATH/src/perkeep.org. Sorry.
This doesn't yet rename the tools like camlistored, camput, camget,
camtool, etc.
Also, this only moves the lru package to internal. More will move to
internal later.
Also, this doesn't yet remove the "/pkg/" directory. That'll likely
happen later.
This updates some docs, but not all.
devcam test now passes again, even with Go 1.10 (which requires vet
checks are clean too). So a bunch of vet tests are fixed in this CL
too, and a bunch of other broken tests are now fixed (introduced from
the past week of merging the CL backlog).
Change-Id: If580db1691b5b99f8ed6195070789b1f44877dd4
Use the go/parser to parse, go/ast to modify and
go/format to write the types needed for publisher/js
instead of running godoc.
Change-Id: I567fac9e6cdd0cb29fbd097b0d478fd9f35864fb
This switches most usages of the pre-1.7 context library to use the
standard library. Remaining usages are in:
app/publisher/main.go
pkg/fs/...
Change-Id: Ia74acc39499dcb39892342a2c9a2776537cf49f1
According to https://golang.org/pkg/html/template/#ErrorCode
(ErrPredefinedEscaper), the template engine already performs
sanitization equivalent to urlquery on any pipeline, and therefore makes
this extra urlquery call unnecessary, and even maybe harmful.
Change-Id: I7fcce395bf015b64022d1ac66b42069cdefb69eb
Apparently the html escaper was not being used in the right order/place,
and the auto-escaper does a better job than us at escaping?
For reference: https://go-review.googlesource.com/c/go/+/37880
I have noticed some odd results when trying other escaping combinations,
but that's a Go problem, if any, that I will investigate independently.
Fixes#960
Change-Id: I43e6eca26404d0bcbc7a48764393186f1d112dbc
If we keep app/publisher/js/zsearch.go, when running make.go, it first gets mirrored into
CAMLI_ROOT/tmp/build-gopath-nosqlite/src/camlistore.org/app/publisher/js/zsearch.go
, with the same modtime as app/publisher/js/zsearch.go.
Then in genSearchTypes,
CAMLI_ROOT/tmp/build-gopath-nosqlite/src/camlistore.org/app/publisher/js/zsearch.go gets
regenerated anyway, because its modtime is older than that of
CAMLI_ROOT/tmp/build-gopath-nosqlite/src/camlistore.org/pkg/search/describe.go
Then in a subsequent run of make.go, the mirroring overwrites the newly regenerated file,
because its modtime is different (indeed, it is newer) than that of
app/publisher/js/zsearch.go
And the cycle repeats ad vitam eternam.
I think if we added app/publisher/js/zsearch.go to mirrorIgnored, it
might fix the problem, but I don't see the point in even keeping
zearch.go in git at all, so I propose with this CL to simply remove it.
If removed, it is simply generated at the first make.go run, and never
again afterwards (except if pkg/search/describe.go changes).
Fixes#957
Change-Id: Ia6fcc50ce33513a2003809783fc323ab36a60b52
This commit changes the PDF page count so that a pure-Go count is tried
first. If that fails, a fallback to counting the pages with the
external tool "pdfinfo" is made.
Change-Id: I3a1b665b6b7c5996bc9154f754cbd900a1170119
This commit removes two slashes from the filename regexp which prevented
successful matching of files to upload to the scanningcabinet.
I assume that the slashes were just a leftover from the port from Perl.
Change-Id: I6712c9c5464d7ecd748fb352a993afbc759edbec
When the DownloadHandler handles a zip archive requests, it writes the
zip archive being built directly to the network response, in order to
avoid writing any of the files to disk or to memory. As a consequence,
as soon as the archive starts being built, if any error reading one of
the files occurs, it can't properly report it to the client as the
response had already started being sent.
In this change, if the DownloadHandler's Fetcher is a caching fetcher,
we try reading all the requested files before starting the zip archive.
As a result, we can error early and properly if any of the files can't
be read. And since the blobs get cached as they are read the first time,
reading them a second time when actually building the archive should not
be too costly.
Change-Id: I6477d82149b08b1db1471ca9ad77fef254929db0
Change the css to allow variable width images, keep constant height only.
Use a fixed limit maxThumbWidthRatio to limit thumbnail image width
for panoramic images.
Fixes#902
Change-Id: I60c16c63b018680885c67f00b47e2e96c8dba47e
Also remove the scheme variable from the template that
tells what protocol the backend uses to talk to camlistore.
Fixes#920
Change-Id: Ia25e99d0f1b77077158f761f11a5c6bacfa2dc3b
* Switch getTags to return a frequency map
* Removed old tag cloud library because it has been [archived and is not available](https://code.google.com/archive/p/visapi-gadgets/)
* Switched to [jQCloud](http://mistic100.github.io/jQCloud/) and vendored in the CSS and JS
* Add type-ahead suggestion for tag search box and tag edit page
Change-Id: I69b00b107d531f744c1a96cd986dee34fb3dfe06