Superls.Tag (superls v1.2.0)

View Source

Tokenize a media path.

Summary

Functions

extract all tokens including dates 10.16.16 and times 16:57 tokens.

Tokenize media_path volume and returns its index.

Search all tags in merged_index that match the search_str,

Functions

extract_tokens(file_path)

@spec extract_tokens(file_path :: Path.t()) :: tokens :: [String.t()]

extract all tokens including dates 10.16.16 and times 16:57 tokens.

index_media_path(media_path)

@spec index_media_path(media_path :: Path.t()) :: index :: Superls.MergedIndex.tags()

Tokenize media_path volume and returns its index.

search_matching_tags(merged_index, search_str)

@spec search_matching_tags(
  merged_index :: Superls.MergedIndex.t(),
  search_str :: String.t()
) ::
  {matches :: [
     {Superls.MergedIndex.volume(),
      [{Superls.MergedIndex.file_name(), Superls.MergedIndex.file_entry()}]}
   ], query_tags :: [Superls.MergedIndex.tag()]}

Search all tags in merged_index that match the search_str,

Returns {matches, query_tags}.