Nyre221 / Kiview

GNU General Public License v3.0
50 stars 1 forks source link

Markdown files not supported? #8

Closed RedBearAK closed 2 months ago

RedBearAK commented 2 months ago

I just installed the latest Kiview on openSUSE Tumbleweed with the current instructions in the README (nice native install option). It's working but I found it curious that some Markdown files in a folder wouldn't display anything, instead saying "File type not supported".

Since Markdown and a host of other types of files are actually just plain ASCII or UTF-8 text, I feel like a lot of them could be shunted to the viewer that already displays text files, even before getting into anything more advanced like attempting to have rendered Markdown previews or syntax highlighting in code files like Python. (Which would be really nice.)

Kiview is happy to show me the contents of a file with no extension, like "LICENSE", but won't show me the text inside the files with the ".md" extension.

It may be wise to check files for validity as ASCII or UTF-8/16 text before actually trying to send them to the text previewer, but otherwise it should be possible to send a whole host of common text-based file types directly to the text viewer until there is a more specific handler for them (like the aforementioned syntax highlighter for "code" files, which could include Markdown if you want to display them "raw" with syntax highlighting instead of rendered).

Nyre221 commented 2 months ago

it should be possible to send a whole host of common text-based file types directly to the text viewer until there is a more specific handler for them

Hmm, somehow I forgot to put the .md extension in the list of files to display as plain text. It's strange because I copied the list from quickview... In any case, I made the changes and they are present on Invent: https://invent.kde.org/danagost/Kiview

Since Kiview is about to become an official KDE application I have to move everything to their infrastructure (invent, bugzilla, etc) and this Github repository will become a mirror of the one on KDE invent. So, I suggest you write the issues on KDE Invent (for now) and Bugzilla (later).

Question: Would you like me to write your name or some identifier in the project credits? I'm not sure if it will be possible since you're not officially part of the project, but if I can I'd like to give you some credit since you helped me.

RedBearAK commented 2 months ago

@Nyre221

Since Kiview is about to become an official KDE application I have to move everything to their infrastructure (invent, bugzilla, etc) and this Github repository will become a mirror of the one on KDE invent.

That's fantastic. Looking forward to it being better integrated with Dolphin eventually.

Hmm, somehow I forgot to put the .md extension in the list of files to display as plain text. It's strange because I copied the list from quickview...

Makes sense that it was just an oversight. Seemed quite odd that it wasn't working.

I'm not sure if it will be possible since you're not officially part of the project, but if I can I'd like to give you some credit since you helped me.

You can put a link to my GH profile somewhere if you like (not that there's much of anything there), but I'm not too bothered by not being credited when I haven't contributed a single line of code. I appreciate the thought either way.

I think I'm really going to be moving away from GNOME to Plasma on my main system at some point (probably when 6.1 comes out), rather than just testing in VMs. So I'll be continuing to keep an eye on the state of this project, and hoping the Dolphin devs allow it to be invoked with the Space bar. But I'll bet they will object to that, to avoid inconveniencing the users who still use single-click to open files and got used to the Space bar invoking selection mode. Unfortunately.

Wonder if we could convince them to change selection mode to using a double-tap of the Space bar, leaving a single-tap Space available for previewing. Or perhaps vice versa. There has to be some way to work it in. They need to at least acknowledge at some point that many users don't just use KDE, and multiple other desktop environments have chosen the Space bar for this purpose. So it would be nice to have an alignment among all the desktop environments that have this feature (macOS with Quick Look, Windows with Quick Look from the MS Store, GNOME with Sushi in Nautilus, Cinnamon with Nemo-preview).

So, I suggest you write the issues on KDE Invent (for now) and Bugzilla (later).

I'll see if I can get my KDE account working on that site. Thanks.

Nyre221 commented 2 months ago

@RedBearAK

So it would be nice to have an alignment among all the desktop environments that have this feature (macOS with Quick Look, Windows with Quick Look from the MS Store, GNOME with Sushi in Nautilus, Cinnamon with Nemo-preview).

Good point.

I can try to ask them but I don't think it will happen. In any case, one of the dolphin maintainers told me that he was thinking of using the "ALT" key to launch Kiview. It's not the "Space" key, but it's still close and doesn't require changing the selection mode shortcut.

from one of the mantainers (a few hours ago):

Nice we can make start making a POC PR for dolphin. Space shortcut is already used, so maybe Alt could be the default for kiview.

RedBearAK commented 2 months ago

@Nyre221

Space shortcut is already used, so maybe Alt could be the default for kiview.

That seems a bit awkward, since it's a frequent menu activation shortcut. But I suppose as long as Kiview can become something that is available inside Dolphin's shortcuts as an action that can have a shortcut assigned, and the shortcuts can either be remapped or just changed by the user, it doesn't particularly matter.

Just unfortunate that all the other platforms where a previewer is available all settled on Space so far, so Dolphin will be the odd man out. It would be good to at least make them aware of the mismatch. They recently changed the menu shortcut to the F10 key instead of using it for "new folder", so I know they are open to the idea of cross-platform standardizations in some cases.

I'm having trouble with my KDE account and don't really have time to mess with it right now, but you may see me sometime on the Invent repo.