Rasmus Kaj
2460e26e64
Cleanup.
2017-11-20 13:08:12 +01:00
Rasmus Kaj
5028a1831c
Add timecluster grouping for place views.
...
Just as for people and tag views.
2017-11-20 12:42:01 +01:00
Rasmus Kaj
b47726a6a5
Add timecluster grouping for tag views.
...
Just as for people.
2017-11-20 11:40:06 +01:00
Rasmus Kaj
8e7a3a36b6
Cleanup.
2017-11-20 10:27:27 +01:00
Rasmus Kaj
63fac99f27
Split long list for person in chunks.
2017-11-19 23:46:03 +01:00
Rasmus Kaj
36653d760f
Implement next and prev links.
2017-11-18 00:38:41 +01:00
Rasmus Kaj
3dd706c1ef
More accesskeys, incl a helpful listing.
2017-11-17 00:26:17 +01:00
Rasmus Kaj
884ffe7e02
Add UX to note people in pictures.
2017-11-10 19:26:45 +01:00
Rasmus Kaj
328074c0b6
Some minor cleanups.
2017-11-09 00:06:12 +01:00
Rasmus Kaj
d41b22b4b8
Update and reenable rustfmt.
...
Update code format to the new recommended style.
2017-11-08 21:55:12 +01:00
Rasmus Kaj
5fc48cf2cf
Redirect from /random.
...
Use a redirect rather than just rendering a random photo page.
Also, add a link to /random to the menu.
2017-11-08 21:09:15 +01:00
Rasmus Kaj
551c5c6897
Redirect from /random.
...
Use a redirect rather than just rendering a random photo page.
Also, add a link to /random to the menu.
2017-11-07 23:36:09 +01:00
Rasmus Kaj
18ddb04d65
Remove readkpa subcommand.
...
My old kphotoalbum database is no longer relevant, rphotos is
the main soruce now and should not be overridden.
The readkpa subcomand was never intended for general consumption
anyway, it was hardcoded to match configurations in my kphotoalbum
setup.
2017-11-07 23:34:19 +01:00
Rasmus Kaj
21f2fce9e1
Nicer implementation of find_image_data.
2017-11-05 23:51:03 +01:00
Rasmus Kaj
8fb8d991dd
Add UI to add tags to images.
2017-11-05 23:03:55 +01:00
Rasmus Kaj
376927e39c
Silly feature; an url for a random image.
2017-11-05 17:56:18 +01:00
Rasmus Kaj
38711abc37
Some lint-style changes suggested by clippy.
2017-09-27 00:19:03 +02:00
Rasmus Kaj
cde078317a
Add a message for login failure.
2017-09-25 19:12:54 +02:00
Rasmus Kaj
3a6a9cb21d
Add admin function to rotate image.
2017-09-25 07:25:58 +02:00
Rasmus Kaj
f4d083360e
Fix memcache problem.
...
Thirty days is max expire time in memcache, setting a larger value
gets it treated as a unix time (so when I said 90 days, everything
expired april 1, 1970).
Also, less logging while precaching.
2017-09-23 22:54:41 +02:00
Rasmus Kaj
e5188e1c09
Document intent.
2017-09-21 07:17:32 +02:00
Rasmus Kaj
8a926c3a55
Add a command for precaching thumbnails.
2017-09-20 23:47:27 +02:00
Rasmus Kaj
16a1b75643
Cleanup some more.
...
Get rid of lib.rs, and move main entry point to main.rs.
2017-09-02 00:05:44 +02:00
Rasmus Kaj
ce1e9c6190
Update some dependencies.
2017-09-01 23:36:08 +02:00
Rasmus Kaj
8131f5e5ec
Merge server and adm to single binary.
2017-09-01 23:14:17 +02:00
Rasmus Kaj
97076336a6
Refuse non-replace pidfile.
...
If the given pid file already exists, but --replace is not given,
refuse to start the server.
2017-08-31 20:09:20 +02:00
Rasmus Kaj
ec52f0b57e
Typo.
2017-08-31 19:32:24 +02:00
Rasmus Kaj
d52e874645
Add options for pidfile usage.
2017-08-15 19:54:22 +02:00
Rasmus Kaj
a0df34644b
Allways give "next" argument for login link.
2017-08-03 19:59:21 +02:00
Rasmus Kaj
f78966682a
Support "next" parameter in login form.
2017-08-03 12:50:01 +02:00
Rasmus Kaj
ce44b1f18f
Expose version in command line and footer.
2017-08-01 01:41:27 +02:00
Rasmus Kaj
c9f024b205
Split days with to many photos in parts.
2017-08-01 01:15:46 +02:00
Rasmus Kaj
7193047a7d
Copy the code for nickel_diesel.
...
To much problem with versions, the nickel_diesel crate isnt
maintained, so just copy the code here since it is short.
2017-07-27 18:30:17 +02:00
Rasmus Kaj
32bf0c0aa8
Very minor cleanup.
...
res.set can set multiple headers in one call by using a tuple.
2017-07-27 17:37:22 +02:00
Rasmus Kaj
8422133a3c
Minor clarification.
...
Rename a method, since caching is not handled by that but by
the caller. Also remove a TODO about caching, since it was
actually done, just not in that place.
2017-07-27 17:05:17 +02:00
Rasmus Kaj
e5b749795e
Use a custom 404 page.
...
Mainly, provide a login link on it.
2017-06-27 00:13:48 +02:00
Rasmus Kaj
161e9c4df9
Up-to-date rexif takes path arguments.
2017-06-26 23:26:36 +02:00
Rasmus Kaj
d4ade480d6
Use ructe 0.3.2, with mime support.
2017-06-23 17:13:44 +02:00
Rasmus Kaj
09c6a5131e
Update diesel to 0.12.
2017-05-12 16:39:23 +02:00
Rasmus Kaj
86616719e1
Remove rustc-serialize.
...
It was only needed for mustache, which I no longer use. (Both
mustache and rustc-serialize is still dependencies of nickel, but
that's ok as long as I dont have to touch them in my code.)
2017-05-12 14:02:41 +02:00
Rasmus Kaj
33b9f8a27b
Use foo? rather than try!(foo).
2017-05-08 22:01:59 +02:00
Rasmus Kaj
e73c363986
Unify far_expires handling.
...
Make the expire header on images actually far.
2017-05-08 20:44:31 +02:00
Rasmus Kaj
5ea5a9bd90
Update ructe.
...
It now supports adding static sass files, so remove direct dependency
on rsass.
2017-05-08 07:09:22 +02:00
Rasmus Kaj
483fe37487
Avoid empty "Tid:"
2017-02-12 17:56:26 +01:00
Rasmus Kaj
abf5dcf384
Large is full.
...
The "large" version of an image is the full original file. Only
logged-in users may access the large version.
2017-02-12 15:24:39 +01:00
Rasmus Kaj
3a1a2d15d3
Add basic attribution.
2017-02-11 22:24:35 +01:00
Rasmus Kaj
708ff73997
Simplify error handling.
...
Internal server error is internal server error anyway, so why not put
a panic in the log for it.
2017-02-08 18:41:20 +01:00
Rasmus Kaj
eada496c5b
Use slices in templates.
2017-02-05 12:08:38 +01:00
Rasmus Kaj
2ce41194e6
Some code-style improvements.
2017-02-04 18:17:32 +01:00
Rasmus Kaj
cb000948f2
A little more modular.
2017-02-04 17:48:42 +01:00
Rasmus Kaj
767a0c6bb0
Refuse to tag non-existing images.
...
But find images even if the file names are lowercased since tagging.
2017-02-04 11:35:17 +01:00
Rasmus Kaj
01b21bd36d
Refuse to tag non-existing images.
2017-02-03 21:47:45 +01:00
Rasmus Kaj
b69ceb8166
Nicer urls for images and details.
2017-02-01 16:12:03 +01:00
Rasmus Kaj
1ae8cf91b5
More flexible route mapping.
2017-02-01 07:39:47 +01:00
Rasmus Kaj
8cd215cdc2
Improve handling of static files.
...
Use static files handling from updated ructe rather than local
handling, and use rsass rather than sass-rs and sass-sys.
Static files are now kept in the binary (no more need to access the
build directory at runtime). Also, there is an admin command to save
the static files to a directory, for the benefit of fronting web
servers and backwards compatibility.
2017-01-29 19:03:35 +01:00
Rasmus Kaj
698fb2c23b
Update dependencies.
...
No direct build dependency on syntex and dotenv makes things easier.
2017-01-20 07:10:40 +01:00
Rasmus Kaj
fa60b6e1f8
No need to defind CSSLINK in main.
2016-12-19 07:19:26 +01:00
Rasmus Kaj
18f15d53d6
Some fooling around with stats.
2016-11-27 18:00:34 +01:00
Rasmus Kaj
eccbf9a1cf
Avoid unnessecary string copying.
...
Unleash the power of rust checked borrows! :-)
2016-11-27 01:05:03 +01:00
Rasmus Kaj
d10343e0cb
Include readkpa in rphotosadm.
2016-11-27 00:54:08 +01:00
Rasmus Kaj
7b2cb158ac
Use match, not nested if.
2016-11-26 12:32:16 +01:00
Rasmus Kaj
7354707486
Include findphotos in rphotosadm.
2016-11-26 11:31:21 +01:00
Rasmus Kaj
5afd58086d
Include makepublic in rphotosadm.
...
Another separate binary merged into the general adm binary.
2016-11-24 22:42:59 +01:00
Rasmus Kaj
e5b5c28d5e
Move user administration into rphotosadm.
2016-11-21 08:45:54 +01:00
Rasmus Kaj
b38ac8c661
Start moving towards a single adm command.
2016-11-20 21:33:16 +01:00
Rasmus Kaj
e0ce981b8d
Merge branch 'master' into feature/memcached-rs
2016-11-20 16:58:46 +01:00
Rasmus Kaj
a18daeac7c
Change photo order.
2016-11-20 15:52:38 +01:00
Rasmus Kaj
ae5cb673ab
Fix some code style issues.
...
Mainly the proper ordering of use statements.
2016-11-20 00:33:31 +01:00
Rasmus Kaj
754fa51efe
Use a middleware to access cache.
...
The proper way to get easy access to a configured memcached client in
a request handler is to have a middleware method to get it.
2016-11-19 23:55:13 +01:00
Rasmus Kaj
171b29cd6c
Better logging re caching.
2016-11-19 20:49:44 +01:00
Rasmus Kaj
3fc702d859
Merge branch 'master' into feature/memcached-rs
2016-11-12 20:51:16 +01:00
Rasmus Kaj
5b57b7de88
Put nulls last in some orderings.
2016-11-11 21:49:58 +01:00
Rasmus Kaj
4b6b927640
More natural year order.
...
Most recent years first, old pictures and pictures without a date last
on the frontpage.
2016-11-09 07:53:04 +01:00
Rasmus Kaj
08ade16c02
Avoid single-digit request times.
2016-11-08 23:51:00 +01:00
Rasmus Kaj
a7960f5569
Refactor caching.
...
Separate the caching logic from how to the actual image scaling.
2016-11-08 23:48:08 +01:00
Rasmus Kaj
0d1285da37
Try memcached-rs.
2016-11-03 17:18:07 +01:00
Rasmus Kaj
704c930010
Fix ordering.
2016-11-03 16:01:20 +01:00
Rasmus Kaj
e2784cc75c
Update dependencies.
2016-10-28 00:44:30 +02:00
Rasmus Kaj
8291b91bcf
Show slightly larger pics.
2016-09-28 14:36:03 +02:00
Rasmus Kaj
6d8eff3015
Remove unused code.
2016-09-27 20:42:22 +02:00
Rasmus Kaj
0597b636dc
Don't drop camera info.
2016-09-26 22:38:22 +02:00
Rasmus Kaj
0b0877e54d
Better handling of dates with no images.
2016-09-23 23:12:22 +02:00
Rasmus Kaj
c6672181d6
Covert all templates to ructe.
2016-09-23 22:03:04 +02:00
Rasmus Kaj
b79cbc7714
More ructe templates.
2016-09-23 16:40:54 +02:00
Rasmus Kaj
9a038765b9
Initial ructe experiment.
2016-09-20 07:35:28 +02:00
Rasmus Kaj
583f492cae
Update nickle-jwt-session use.
2016-09-20 07:35:01 +02:00
Rasmus Kaj
8b60679c44
Add public photos if the file exists.
2016-08-28 22:07:42 +02:00
Rasmus Kaj
ab35c4bc49
Add a year-listing playground.
2016-08-28 22:06:45 +02:00
Rasmus Kaj
ef968f4b81
Cast before transfer.
2016-08-21 13:31:25 +02:00
Rasmus Kaj
6a254db792
Add a view for photos without a date.
2016-08-20 13:27:27 +02:00
Rasmus Kaj
6ed42c0be7
Add camera support.
...
Store and show which camera each picture was taken with (if present in
exif data).
2016-08-09 01:41:46 +02:00
Rasmus Kaj
97f299b54f
Public/private tags, people and places.
2016-08-08 00:24:15 +02:00
Rasmus Kaj
fd5fb423ec
Add flag to make photos public.
2016-08-07 22:41:00 +02:00
Rasmus Kaj
961e04d257
Better avoiding of raw images.
...
And get rid of some 'use ...::*'.
2016-08-07 20:38:42 +02:00
Rasmus Kaj
b8f671c7bf
rustfmt + type consistency.
2016-08-05 23:21:24 +02:00
Rasmus Kaj
4f4a1e2345
Conditional query is BoxedQuery.
...
Yep, Diesel supports conditional queries.
2016-08-05 18:58:50 +02:00
Rasmus Kaj
10392df72c
One line, not two, to get a connection.
2016-08-05 18:11:25 +02:00
Rasmus Kaj
64ec5f9c18
Fix simple ordering.
2016-08-05 03:19:14 +02:00
Rasmus Kaj
7f8d5350cc
Inline an ugly utility method.
2016-08-04 18:16:17 +02:00
Rasmus Kaj
7e3c892e9c
Merge sassify.rs into build.rs.
...
Simpler with only a one-file build program, and it is still less than
100 lines.
2016-08-04 01:06:15 +02:00