Bug 470824 - balooshow should indicate the type of a file
Summary: balooshow should indicate the type of a file
Status: RESOLVED NOT A BUG
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.106.0
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords: junior-jobs, usability
Depends on:
Blocks:
 
Reported: 2023-06-09 08:15 UTC by skierpage
Modified: 2023-11-10 14:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description skierpage 2023-06-09 08:15:42 UTC
SUMMARY
You can search for files by type (`baloosearch --type audio Beatles`), but it's not obvious what the types are.
If `balooshow` showed this type it would be easier to figure out what's going on.

STEPS TO REPRODUCE
1. Enable baloo indexing
2. In a terminal, `echo pointieststick > $HOME/baloo_test.txt`
3. `balooshow $HOME/baloo_test.txt`

OBSERVED RESULT
There's no indication what type of file it is.

EXPECTED RESULT
 Showing the type would be useful, because it would guide you as to what to search for with `baloosearch --type WHATGOESHERE pointeststick`

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9 on Wayland

ADDITIONAL INFORMATION
The output of `baloosearch -x  $HOME/baloo_test.txt` includes
     Internal Info
    Terms: Mplain Mtext T5 T8 X20-1 pointieststick

and the 'M' terms hint that the file type for baloosearch's --type option is "text." But `--type plain` doesn't work, and this technique is useless for a Open Document Format file, e.g. a .odt file has
    Internal Info
    Terms: Mapplication Moasis Mopendocument Mtext Mvnd  ...
you can't use baloosearch --type to find .odt documents by any of these type terms, you must use --type document. Using `kmimetypefinder to determine the mime type of a file likewise may not match the type that baloo assigns.
Comment 1 Stefan Brüns 2023-07-05 17:12:31 UTC
balooshow is a debugging aid, not an end user tool. It lists internal database values.

Searching is (somewhat) documented here:
https://invent.kde.org/frameworks/baloo/-/blob/master/docs/user/searching.md

That also lists the keyword "mimetype", which can be used for searching ODT files:
$> baloosearch mimetype:application/vnd.oasis.opendocument.text
or
$> baloosearch mimetype:text/plain

"Types" are more abstract, the valid values are documented by KFileMetaData:
https://api.kde.org/frameworks/kfilemetadata/html/types_8h_source.html
Comment 2 Stefan Brüns 2023-11-10 14:21:35 UTC
No response from reporter, consider given guidance as sufficient.