Commit Graph

22 Commits

Author SHA1 Message Date
Oleksandr Redko 001c417e73
all: replace deprecated io/ioutil with io and os (#1647) 2023-01-23 10:25:14 -08:00
ginabythebay b2d3e64a0f
Fix #1635, trim slash when looking up resource files (#1637) 2022-12-31 21:46:44 -08:00
luz paz d605f86c82 Fix various typos
Found via `codespell -q 3 -S ./clients/web/embed,./clients/chrome -L ba,everytime,impres,keypair,msdos,pres,ro,te,ue`
2022-05-02 14:31:09 -07:00
Tamás Gulácsi 1c400bd5b3 Remove unused code
as `staticcheck -checks=U1000` suggested.
2021-08-09 17:34:14 +02:00
Alexandre Viau ccad6635e4
move to go:embed (#1396) 2021-07-29 15:24:05 -04:00
Brad Fitzpatrick 46bb719dc5 buildinfo: track Version and Dockerfile separately
And don't hard-code VERSION info in the Dockerfile.

Change-Id: I35cb22fbb56cd634be4f1342c54ca86ce0e79901
2018-05-02 13:36:32 -07:00
Paul Lindner 84b2c6b3e4 all: various lint fixes
- correct logging that logged functions instead of their value
- use ID vs Id naming
- use correct function names in comments

Change-Id: I61562cef7ebac7337ec6c85312cdf7915cb1a84b
2018-02-05 11:59:00 -08:00
Paul Lindner 459c75410e all: more renaming of Camlistore to Perkeep
Change-Id: I118e3cbcf20d80afeffc84f001388c4556f21628
2018-01-30 03:02:56 -08:00
Brad Fitzpatrick 194d4f9443 blobserver, all: add contexts to ReceiveBlob, Fetch & million resulting deps
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
2018-01-18 16:22:16 -08:00
Brad Fitzpatrick c3d05cdce9 Move more packages out of pkg/ and into internal/
Moved hashutil, httputil, osutil, netutil,
images, media, magic, video, and rollsum.
2018-01-02 21:03:30 -08:00
Brad Fitzpatrick d6a0b05df0 Rename import paths from camlistore.org to perkeep.org.
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
2018-01-01 16:03:34 -08:00
Paul Lindner fa46c3935d Correct various misspelled words
Change-Id: I236e880526e4c2b0bd318da041983d557e0aa885
2017-09-11 08:33:31 -07:00
Fabian Wickborn bee7463f74 app/scanningcabinet/scancab: Count PDF pages with rsc.io/pdf
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
2017-07-28 07:00:49 +02:00
Fabian Wickborn 6393fc4275 app/scancab: fix filename regexp for updateLoop
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
2017-07-15 13:26:08 +02:00
Steve Armstrong 8197b88059 app/scanningcabinet: Show doc's other tags in search results
When listing documents that matched a given tag search, show the other tags those docs have

Change-Id: Id8897c4bcd1958cb7d8cac2a59e60e6f975180c5
2017-05-28 10:42:55 -07:00
Steve Armstrong c5d80de3b9 app/scanningcabinet: Always include jQuery
Change-Id: I7557c99e922e9fb0dbb30e1c7b66dfae9f136aa0
2017-05-11 20:48:57 -07:00
mpl fae92b072e app/scanningcabinet: add go doc
Change-Id: I7076e0777a10675b0cf1ae5ed86e473dad148c46
2017-04-12 18:36:31 +02:00
Steve Armstrong af5c7d1535 app/scanningcabinet: fix tag cloud and add typeahead
* 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
2017-03-31 23:58:27 -07:00
Steve Armstrong 70746313f6 app/scanningcabinet: logf for prefixing
Change-Id: I9baf72c2d9f0e02f121c28638533ed43980219ff
2017-03-28 21:15:02 -07:00
Steve Armstrong 9e2e35cf6f app/scanningcabinet: move static UI files to folder
Change-Id: I410fbaf0a113732cc2bde319607edab384122678
2017-03-24 21:36:03 -07:00
Steve Armstrong ddbcf34e9d app/scanningcabinet: Fix scancab pdf extraction
Change-Id: I187a4bbefce6f20b1aeaeab7ddde3d1dbecbb55c
2017-03-14 08:39:07 -07:00
mpl 5a24ffd854 new app: scanning cabinet
WARNING: this app is still experimental, and even its data schema might
change. Do not use in production.

This change adds a Camlistore-based port of the scanning cabinet app
originally created by Brad Fitzpatrick:
https://github.com/bradfitz/scanningcabinet

Some of it is inspired from the App Engine Go port of Patrick Borgeest:
https://bitbucket.org/pborgeest/nometicland

The data schema is roughly as follows:

-a scan is a permanode, with the node type: "scanningcabinet:scan".
-a scan's camliContent attribute is set to the actual image file.
-a scan also holds the "dateCreated" attribute, as well as the
"document" attribute, which references the document this scan is a part
of (if any).

-a document is a permanode, with the node type: "scanningcabinet:doc".
-a document page, is modeled by the "camliPath:sha1-xxx" = "pageNumber"
relation, where sha1-xxx is the blobRef of a scan.
-a document can also hold the following attributes: "dateCreated",
"tag", "locationText", "title", "startDate", and "paymentDueDate".

Known caveats, in decreasing order of concern:
-the data schema might still change.
-the scancab tool, to actually create and upload the files from physical
documents, is practically untested (since I do not own a scanner).
-some parts, in particular related to searches, are probably
sub-optimized.
-the usual unavoidable bugs.

Change-Id: If6afc509e13f7c21164a3abd276fec075a3813bb
2017-02-15 17:14:45 +01:00