38e9b796fe
Use spinal.hash_file instead of redefining here.
2021-01-25 14:59:40 -08:00
d1148d85db
A few linting fixes.
2021-01-05 17:35:10 -08:00
11b846a3e0
Move random_hex function to voussoirkit/passwordy.
2021-01-05 12:38:04 -08:00
ea5f22bae1
Remove unused unicodedata.
...
Relevant function got moved to stringtools.
2021-01-01 17:02:03 -08:00
01f85d41b6
Use voussoirkit.stringtools for remove_characters.
2020-11-16 00:13:35 -08:00
469103e0ac
Use voussoirkit.stringtools for comma_space_split.
2020-11-15 22:20:36 -08:00
98b6d93094
Use voussoirkit.stringtools for collapse_whitespace.
2020-11-15 22:20:36 -08:00
9ca40c6ae7
Use voussoirkit.gentools for chunk_generator.
2020-11-15 22:20:36 -08:00
1a6abf00b9
Use voussoirkit hms instead of local function.
2020-11-15 17:44:10 -08:00
c7eda36133
Add decollide_names, prefer simplified names in album exports.
2020-09-27 23:36:15 -07:00
06340d03da
Dedent these loops via comprehensions of questionable clarity.
2020-09-27 13:50:35 -07:00
fa512eff28
Add argument once_each, set to False if you want every permutation.
2020-09-27 13:28:03 -07:00
18e1849fcf
Fix video_thumbnail not checking if probe failed before using it.
2020-09-20 18:31:55 -07:00
2accb5c961
Use pathclass.Path.open.
2020-09-20 18:31:31 -07:00
7412ef5162
Let parse_unit_string try int before float.
2020-09-19 04:01:49 -07:00
b223691107
Add helpers.collapse_whitespace.
2020-09-19 03:50:55 -07:00
7b7015125e
Add period to all exception messages.
2020-09-19 03:32:16 -07:00
50ecc4c1c1
Let digest_directory act as a generator, yielding photos & albums.
2020-09-15 13:48:06 -07:00
f3bceb4688
Remove get_cached_flat_dict, add get_cached_tag_export.
2020-09-14 05:49:24 -07:00
a8fa621f01
Rewrite helpers.comma_space_split with a simple regex.
2020-09-04 17:00:01 -07:00
e774b5f101
Fix zip_photos attempting to add deleted files.
2020-08-30 18:48:08 -07:00
b15beb73eb
Rewrite chunk_sequence to work with generators.
2020-08-12 11:21:48 -07:00
930960e22a
Move this config prep code into voussoirkit as configlayers.
2020-04-03 17:09:01 -07:00
e94e35c98c
Add option to natural_sort filenames before digesting.
2020-04-02 21:57:54 -07:00
b88d577ddd
Use voussoirkit.imagetools for fit_into_bounds function.
2020-02-04 19:35:46 -08:00
1b308d7921
Fix seconds_to_hms bug!
...
Embarrassing. If M was zero then you got HH:SS.
2020-01-06 20:21:41 -08:00
3bd8fe6392
Raise FileNotFound from read_filebytes.
2019-12-10 12:48:28 -08:00
9fa49bbddf
Add parameter only_shrink to fit_into_bounds.
2019-08-14 13:48:22 -07:00
d66dc53215
Require voussoirkit 0.0.28 for sqlhelpers.listify.
...
Instead of defining that within etiquette.
2019-01-01 18:08:47 -08:00
5d7bc1ff4b
Somewhat improve prettiness of hyphen range parse code.
2018-12-27 15:31:56 -08:00
dbdd509cd2
Rearrange imports so voussoirkit is right after lib imports.
...
Added a styleguide.md file to refer back to.
Since voussoirkit is a library it feels better to have it below
the rest of the library and above the local project imports.
2018-11-04 19:27:20 -08:00
25a27e6241
Move dict_to_params to flask-specific helpers.py.
...
The rest of etiquette has nothing to do with URLs so this
doesn't belong in the backend helper file.
2018-11-04 13:30:08 -08:00
0ccfa74709
Let helpers.generate_*_thumbnail raise FileNotFoundError.
2018-08-17 22:05:47 -07:00
bea9f905bd
Support downloading .zip of arbitrary photos, clipboard.
...
Now that creating zips of any photo set is easier, we can
let the user download whatever is on their clipboard.
2018-08-14 23:02:06 -07:00
bc6a0aa907
Improve & generalize zipfile code.
...
Moved some heavy lifting out of the flask album.zip endpoint
and into helpers.py.
Renamed some things for clarity.
2018-08-14 22:58:26 -07:00
53c86c30a1
Improve clarity of the recursive_dict_ helper functions & usage.
2018-08-11 18:19:55 -07:00
30e3aa9c6f
Simplify and improve rollback logic.
2018-07-29 16:28:57 -07:00
bbf07f4401
Fix image thumbnail wrong variable bug.
...
How long has that been there?
2018-07-22 20:19:05 -07:00
d740e6d686
Oops, fix read_filebytes not stopping at the range_max properly.
2018-07-22 20:18:58 -07:00
4c65ccaf68
Big! Liberate Groupables from strict heirarchy. Multiple parents.
...
I found that the strict heirarchy was not satisfying the situation
where one tag is the intersection of two others, but we can only
pick one as the parent
For example, does red_jacket belong under clothes.red_clothes or
clothes.jackets? A search for "red_clothes AND jackets" might
give us someone wearing red pants and a black jacket, so this
definitely needs to be a separate tag, but picking only one
parent for it is not sufficient. Now, a search for red_clothes
and a search for jackets will both find our red_jacket photo.
The change also applies to Albums because why not, and I'm sure
a similar case can be made.
Unfortunately this means tags no longer have one true qualname.
The concept of qualnames has not been completely phased out but
it's in progress.
This commit is very big because I was not sure for a long time
whether to go through with it, and so much stuff had to change
that I don't want to go back and figure out what could be grouped
together.
2018-07-20 13:09:06 -07:00
4987db4bd0
Switch to f-string formatting in many places.
2018-07-18 18:36:36 -07:00
38bac41eb9
Add helpers.split_easybake_string for prelim parsing.
...
Helps to remove some distractions from the main easybake method.
2018-07-15 14:23:43 -07:00
97e1f881d0
Move video thumbnailing code to helpers.
2018-04-28 20:36:33 -07:00
5bc2bbdacb
Move image thumbnailing code to helpers.
2018-04-28 20:33:05 -07:00
cca8837863
Move helpers.select_generator to PDB.sql_select.
2018-03-25 16:32:17 -07:00
0e3ae11610
Improve normalizers, use less None; Add author search box.
...
It was getting difficult to remember which of the normalizers
use None and which don't. So let's try to be a little more consistent
and just use empty sets, etc, so the caller can rely on receiving a
set instead of having to check for None.
Also renamed search parameter authors->author to be more in line
with the singular form of extension.
2018-03-22 21:09:21 -07:00
9a1caee412
Add helper function hash_file.
2018-03-18 20:56:29 -07:00
2d73e59abf
Let helpers.read_filebytes operate on pathclass Paths.
2018-03-18 20:56:08 -07:00
1cd78a678b
Minor linter appeasements.
2018-03-11 01:54:59 -08:00
d653673277
Update truthystring to return bool, not given int.
2018-02-24 23:01:44 -08:00