MCPcopy Create free account

hub / github.com/dicej/tagger / functions

Functions176 in github.com/dicej/tagger

↓ 115 callersMethodget
Retrieve the lock for the specified resource. If no such lock already exists, it will be created and added to the map.
server/src/lock_map.rs:25
↓ 33 callersFunctiontag
(tag: &str)
shared/src/tag_expression.rs:382
↓ 22 callersFunctionopen
Open or create an SQLite database using the specified filename.
server/src/lib.rs:187
↓ 14 callersFunctionand
(a: TagExpression, b: TagExpression)
shared/src/tag_expression.rs:386
↓ 13 callersFunctionresponse
Abbreviation for `Response::builder()`
server/src/lib.rs:255
↓ 11 callersFunctiontest_tree
(expression: Option<TagExpression>, tree: TagTree)
shared/src/tag_expression.rs:443
↓ 9 callersFunctionor
(a: TagExpression, b: TagExpression)
shared/src/tag_expression.rs:390
↓ 7 callersFunctioninit
( )
server/src/lib.rs:745
↓ 7 callersFunctionsync
Synchronize the Tagger database with the filesystem. This includes: Checking for new files not yet recorded in the database and adding them Checkin
server/src/sync.rs:686
↓ 6 callersFunctioncontent
(file_name: &str)
server/src/bin/tagger_server.rs:20
↓ 5 callersFunctioncontent
Collect the contents of the specified file into a `Vec<u8>` and return it.
server/src/media.rs:737
↓ 5 callersFunctionmake_token
(auth_key: &[u8])
server/src/lib.rs:874
↓ 5 callersMethodpatch_tags
Send a PATCH /tags request to the Tagger server to add or remove tags to/from media items. The request is sent using the specified `client`, using `t
client/src/client.rs:143
↓ 4 callersMethodkey
Create an `ImageKey` from the `hash` and `datetime` of this `ImageData`. TODO: It would be more idiomatic to implement `From<&ImageData>` for `ImageK
shared/src/lib.rs:258
↓ 4 callersFunctionnot
(a: TagExpression)
shared/src/tag_expression.rs:394
↓ 4 callersFunctionthumbnail
Find the still image preview for the specified media item and specified size, generating it from the original if it doesn't already exist. The return
server/src/media.rs:1093
↓ 4 callersMethodwatch_tags
Return a `ReadSignal` which tracks the latest response to GET /tags requests from the server `filter` represents the tag expression used to query a s
client/src/client.rs:180
↓ 3 callersFunctionbind_filter_clause
Bind the specified arguments to the placeholder category and tag parameters used by [append_filter_clause].
server/src/lib.rs:237
↓ 3 callersMethodbuild
Convert this object into an `ImagesResponse` object. This should be called after all available items have been passed to the [consider] method.
shared/src/lib.rs:389
↓ 3 callersFunctionget_variant
Return a handle to the file containing the requested artifact, which will be generated on the fly from the original media item if it doesn't already e
server/src/media.rs:674
↓ 3 callersFunctionhash_password
Hash a user password using using the PBKDF2_HMAC_SHA256 algorthim and return the Base64-encoded result.
server/src/auth.rs:27
↓ 3 callersFunctionis_immutable_category
Attempt to find the specified `category` in `tags`, and if it is present, return whether it is flagged as immutable (i.e. the server says it will not
client/src/toolbar.rs:27
↓ 3 callersFunctionmake_routes
( conn: &Arc<AsyncMutex<SqliteConnection>>, image_locks: &Arc<LockMap<Arc<str>, ()>>,
server/src/lib.rs:845
↓ 3 callersFunctionmaybe_wrap_filter
If the specified `auth` claims include a non-empty `Authorization::filter` field, modify the supplied `filter` in place, either replacing it with the
shared/src/lib.rs:532
↓ 3 callersMethodopen_login
Set `self.user_name`, `self.password`, `self.log_in_error`, and `self.show_log_in` to empty, empty, `None`, and `true`, respectively.
client/src/client.rs:341
↓ 3 callersFunctionpreload_cache_all
Generate any missing thumbnail and preview artifacts for each of the specified items. If an error is produced while generating artifacts for a given
server/src/media.rs:608
↓ 3 callersMethodwatch_images
Return a `ReadSignal` which tracks the latest response to GET /images requests from the server See [tagger_shared::ImagesQuery] for the meanings of t
client/src/client.rs:188
↓ 2 callersFunctionas_stream
Convert the specified `AsyncRead` into a `Stream` of `Bytes`. The latter is what Warp needs when sending a binary response which we don't want to loa
server/src/media.rs:1184
↓ 2 callersFunctionaverage_absolute_difference
Calculate an approximation of the average absolute difference between the bytes of the specified arrays.
server/src/media.rs:246
↓ 2 callersFunctioncopy_from_offset
Create a temporary file containing the suffix of the file at `path` starting at `offset` bytes from the beginning.
server/src/media.rs:915
↓ 2 callersFunctiondeduplicate
Query the database for items for which we have not yet calculated a perceptual hash (e.g. files that have been newly added), calculate their p-hashes,
server/src/sync.rs:571
↓ 2 callersFunctionfilter_state
Attempt to find the specified `tag` in the subtree of `filter` reachable via `filter_chain` and determine whether it is included, excluded, or not pre
client/src/tag_menu.rs:206
↓ 2 callersFunctionfold
Create a new `Signal` called `signal`, intializing it with `init`, and call `fun` with the current value of `signal` and new value of `handle` wheneve
client/src/main.rs:115
↓ 2 callersFunctionget_video_data
Extract relevant metadata from the specified `context`. This function tries to identify at least one audio track which is encoded with a codec suppor
server/src/media.rs:820
↓ 2 callersMethodimages_and_tag_counts
Calculate an `ImagesResponse` and `TagCounts` according to the same logic the Tagger server uses. The `ImagesResponse` is calculated by starting with
client/src/client.rs:539
↓ 2 callersMethodis_similar_to
Indicates whether the two `PerceptualOrdinal`s are similar enough that the corresponding `PerceptualHash`es from which they were derived might also be
server/src/media.rs:453
↓ 2 callersMethodlog_in
Attempt to log in to the server using the credentials provided by the user (see [HttpClient::user_name] and [HttpClient::password]). This operation r
client/src/client.rs:260
↓ 2 callersMethodlogin_status
Return the current [LoginStatus] of the user. The tagger server may be configured to allow anonymous access (i.e. with empty credentials), in which c
client/src/client.rs:316
↓ 2 callersFunctionmark_bad
Move any and all paths for the specified item from the `paths` table to the `bad_paths` table and delete the item from the `images` table. This is th
server/src/sync.rs:929
↓ 2 callersMethodon_unauthorized
Handle a 401 Unauthorized response from the server by attempting to log in again, prompting the user for credentials if necessary.
client/src/client.rs:355
↓ 2 callersFunctionperceptual_hash
Calculate the perceptual hash of the media item at the specified `path`. The resulting value may be used to group items by similarity prior to dedupl
server/src/media.rs:550
↓ 2 callersFunctionpreload_cache
Generate any missing thumbnail and preview artifacts for each of the specified item.
server/src/media.rs:636
↓ 2 callersFunctionresolve_mut
Return a unique reference to the subtree of `filter` reachable via the list of tags in `filter_chain`, if any.
client/src/tag_menu.rs:182
↓ 2 callersFunctionroutes
Build a Warp routing filter based on the specified configuration. `conn`: used to access the Tagger database `image_locks`: used to control concurre
server/src/lib.rs:271
↓ 2 callersFunctiontags_for_category
Identify which tags (if any) in `tags` are appropriate to list at the next level of the tree, i.e. which tags could be used to further filter a set of
client/src/tag_menu.rs:112
↓ 2 callersMethodtry_anonymous_login
Attempt to log in to the server anonymously, and if that fails, prompt the user for credentials.
client/src/client.rs:247
↓ 2 callersMethodtry_anonymous_login_with_fn
Attempt to log in with empty credentials, setting `token` to the resulting access token on success, or else calling `on_unauthorized` on 401 Unauthori
client/src/client.rs:447
↓ 2 callersFunctionvideo_track_data
Parse the specified MPEG-4 file and extract its metadata.
server/src/media.rs:228
↓ 2 callersMethodwatch
Create a `ReadSignal` which resolves to the JSON response body returned from the specified URI. The request will include an HTTP "Bearer" authorizati
client/src/client.rs:374
↓ 1 callersFunctionapply
Handle a PATCH /tags request, which adds and/or removes tags to/from media items. This function first verifies the user identified by `auth` has perm
server/src/tags.rs:48
↓ 1 callersMethodas_reply
Convert this `HttpError` to a Warp `Reply`, i.e. an HTTP response.
server/src/warp_util.rs:58
↓ 1 callersFunctionauthenticate
Attempt to authenticate a user based on the credentials specified in `request`. `conn`: used to query the "users" table in the Tagger database `key`
server/src/auth.rs:52
↓ 1 callersFunctionauthenticate_anonymous
Like [authenticate], except use the anonymous account in the database if it exists -- no credentials, bottlenecking, or delay required
server/src/auth.rs:116
↓ 1 callersFunctionauthorize
Validate the specified access `token`, verifying it was signed with the specified `key`, has not expired, etc.
server/src/auth.rs:166
↓ 1 callersFunctionbound
Calculate the resized dimensions for an image using the specified bounding box, preserving aspect ratio (to within integer precision) and respecting `
server/src/media.rs:175
↓ 1 callersFunctionbuild_images_query
Build an SQL query based on the specified `filter` which retrieves metadata for all matching media items, appending the result to `buffer`. If `filte
server/src/images.rs:28
↓ 1 callersFunctioncatch_unwind
Wrapper for `panic::catch_unwind` which converts the panic payload to a human-readable `anyhow::Error`
server/src/lib.rs:508
↓ 1 callersMethodclean
Remove any unused locks from the map. A lock is considered unused if there are no strong or weak references to it outside of the map itself.
server/src/lock_map.rs:49
↓ 1 callersFunctioncompare_numeric
Compare two strings, numerically when applicable. If both strings can be parsed as `u64`s, then compare them numerically. Otherwise, compare them le
client/src/tag_menu.rs:304
↓ 1 callersFunctioncontains_category
Return whether the specified `category` can be found in `tags` or a sub-response thereof.
client/src/client.rs:647
↓ 1 callersFunctiondeduplicate
Group `potential_duplicates` according to which ones appear to be duplicates of each other. Each group in the result will be sorted from highest qual
server/src/media.rs:340
↓ 1 callersFunctiondeduplicate_dirty
Scan the collection of media items in `all`, grouping them by similarity and deduplicating each group with at least one `dirty` item in it, recording
server/src/sync.rs:428
↓ 1 callersFunctiondimensions
(number: u32)
server/src/lib.rs:681
↓ 1 callersFunctionentry
Recursively search for or create a subresponse within `response` belonging to the specified `category` (which may be an arbitrarily-nested subcategory
server/src/tags.rs:142
↓ 1 callersMethodevaluate
Evaluate this boolean expression to determine whether it matches the specified `tag`.
shared/src/tag_expression.rs:116
↓ 1 callersMethodevaluate_set
Evaluate this boolean expression to determine whether it matches the specified `tags`.
shared/src/tag_expression.rs:126
↓ 1 callersFunctionexif_metadata
Extract relevant metadata from the EXIF content found in the file at `path`.
server/src/sync.rs:138
↓ 1 callersFunctionfile_data
Find and return `FileData` for one of the files where the item with the specified `hash` was found. There may be more than one such file in the datab
server/src/media.rs:141
↓ 1 callersFunctionfilter_tags
Return a clone of `tags`, except with the tag counts replaced by those found in `tag_counts`. This may lead to some entries being removed entirely wh
client/src/client.rs:657
↓ 1 callersFunctionfind_categories
Given a `filter_chain`, which denotes a path of ANDed-together tags in a filter tree, identify any categories of tags which could be used to further f
client/src/tag_menu.rs:33
↓ 1 callersFunctionfind_category
Return a reference to the first `Tag` found in `filter_chain` which matches the specified `category`, if present.
client/src/tag_menu.rs:156
↓ 1 callersFunctionfind_new
Recursively search the specified `dir` directory for JPEG and MPEG-4 media items, identifying any that aren't already in the database and attempting t
server/src/sync.rs:312
↓ 1 callersFunctionfind_tag
Return a reference to the first `Tag` found in `filter_chain` which matches the specified `tag` name and `category`, if present.
client/src/tag_menu.rs:135
↓ 1 callersFunctionfold_changes
Call `fun` with the current value of `signal` and new value of `handle` whenever latter changes, setting `signal` to the result. See also [watch_chan
client/src/main.rs:99
↓ 1 callersMethodfold_tags
Visit each leaf node (i.e. `TagExpression::Tag`) in the expression, left to right, folding over them using `value` as the initial value and `fold` as
shared/src/tag_expression.rs:101
↓ 1 callersFunctiongenerate_media
(image_dir: &Path, info: &HashMap<u32, MediumInfo>)
server/src/lib.rs:688
↓ 1 callersFunctiongoogle_datetime
Attempt to find the timestamp for the specified `path` in a Google Photo export metadata file. See also [GooglePhotoMetadata].
server/src/sync.rs:210
↓ 1 callersFunctiongroup_similar
Group the specified media items according to transitive similarity. `similar` represents a mapping such that each key item is considered "similar" to
server/src/media.rs:293
↓ 1 callersFunctiongroup_similar
Group the specified `items` according to transitive similarity. Here we define two items to be similar if their `PerceptualHash`es are either directl
server/src/sync.rs:386
↓ 1 callersFunctionhash
Calculate the SHA-256 hash of the specified `input` and return the result as a hex-encoded string.
server/src/sync.rs:92
↓ 1 callersMethodhash
(&self, state: &mut H)
server/src/media.rs:102
↓ 1 callersFunctionimage
( conn: &AsyncMutex<SqliteConnection>, image_lock: &AsyncRwLock<()>, image_dir: &str, cache_di
server/src/media.rs:1198
↓ 1 callersFunctionimages
Handle a GET /images request by converting the specified `query` to the equivalent SQL query and collecting the result as an `ImagesResponse` object.
server/src/images.rs:64
↓ 1 callersMethodmay_select
Return a `ReadSignal` which tracks whether the user has permission to add and remove tags to/from media items on the server. This is based on the lat
client/src/client.rs:115
↓ 1 callersFunctionmetadata_for
Generate a [Metadata] object for the specified file. We attempt to determine the creation timestamp in the following order: 1. Check the metadata in
server/src/sync.rs:242
↓ 1 callersFunctionmp4_metadata
Extract relevant metadata from the MPEG-4 content found in te file at `path`.
server/src/sync.rs:184
↓ 1 callersMethodordinal
(&self)
server/src/media.rs:496
↓ 1 callersFunctionorthagonal
Return true iff the specified `orientation` is a 90 degree rotation in any direction.
server/src/media.rs:163
↓ 1 callersFunctionpage_back
Go to the previous page of the sequence, if there is one
client/src/pagination.rs:17
↓ 1 callersFunctionpage_forward
Go to the next page of the sequence, if there is one
client/src/pagination.rs:24
↓ 1 callersFunctionquality
Produce a quality rating for the specified image, useful for comparing two duplicates and choosing the "best" one.
server/src/media.rs:261
↓ 1 callersFunctionraw_cat_tag
(category: &str, tag: &str)
shared/src/tag_expression.rs:364
↓ 1 callersFunctionraw_tag
(tag: &str)
shared/src/tag_expression.rs:375
↓ 1 callersFunctionrecurse
(tags: &TagsResponse, category: &str)
client/src/toolbar.rs:28
↓ 1 callersFunctionrecurse
( filter_chain: &List<Tag>, filter: &'a TagTree, tree: TagTree, )
client/src/tag_menu.rs:70
↓ 1 callersFunctionresolve
Return a shared reference to the subtree of `filter` reachable via the list of tags in `filter_chain`, if any.
client/src/tag_menu.rs:172
↓ 1 callersFunctionserve
Run a Warp server using a filter created by [routes], bound to the address(es) specified in `options`. `conn`, `image_locks`, and `default_auth_key`
server/src/lib.rs:524
↓ 1 callersFunctionstill_image
Produce a still image from the first frame of the specified video.
server/src/media.rs:192
↓ 1 callersFunctionsync_loop
( options: Arc<Options>, conn: Arc<AsyncMutex<SqliteConnection>>, image_locks: Arc<LockMap<Arc<str
server/src/bin/tagger_server.rs:31
↓ 1 callersFunctiontags
Handle a GET /tags request, which retrieves an optionally filtered list of tags currently applied to at least one media item. Note that tags may belo
server/src/tags.rs:162
next →1–100 of 176, ranked by callers