Building MMview, a universal file viewer
This is a REALLY nice utility.
I think should be in every puppy!
I can understand that you may not want to have it in woof-CE (you might reconsider though...) but maybe have it as a pet to facilitate the build process.
A couple of issues that you might consider addressing is the appearance of /mnt/home as (the proper mount point name) "dev_save", that may be a bit confusing. It is also a duplication since the relevant partition is also shown.
There is also no indication if a partition is mounted. Partitions auto-mount if clicked upon but provide no way to unmount them. BTW not sure how partitions are ordered in the side panel. Reverse volume-forward partition?
Anyway, is still super.
I think should be in every puppy!
I can understand that you may not want to have it in woof-CE (you might reconsider though...) but maybe have it as a pet to facilitate the build process.
A couple of issues that you might consider addressing is the appearance of /mnt/home as (the proper mount point name) "dev_save", that may be a bit confusing. It is also a duplication since the relevant partition is also shown.
There is also no indication if a partition is mounted. Partitions auto-mount if clicked upon but provide no way to unmount them. BTW not sure how partitions are ordered in the side panel. Reverse volume-forward partition?
Anyway, is still super.
- Attachments
-
- quickview.jpg
- (50.77 KiB) Downloaded 549 times
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==
Thanks for sorting the encoding handling - /usr/share/usbids now displays correctly on my system. (This file is a very interesting list of known usb device ids - a good reference)
If I close the mmquickview window by using the "close" radio button it will remember (and display) the last_viewed_directory (or item) when I next start the utility. Alternatively if I terminate the window by clicking the X button it does not remember the directory or item I was viewing during the previous run. Is there any way to allow mmquickview to remember it's last viewed directory when X is clicked?
One thing I like about having a viewer is that I can investigate the code within my scripts just by clicking them - no more risk of the code being actually executed when I click. (how often have I clicked on various text files to read them then accidentally clicked an executable script and started to panic about what it is doing...)
cheers!
If I close the mmquickview window by using the "close" radio button it will remember (and display) the last_viewed_directory (or item) when I next start the utility. Alternatively if I terminate the window by clicking the X button it does not remember the directory or item I was viewing during the previous run. Is there any way to allow mmquickview to remember it's last viewed directory when X is clicked?
One thing I like about having a viewer is that I can investigate the code within my scripts just by clicking them - no more risk of the code being actually executed when I click. (how often have I clicked on various text files to read them then accidentally clicked an executable script and started to panic about what it is doing...)
cheers!
+1jamesbond wrote:Very nice code. Do you mind if I get this included in Fatdog?
Told ya, Mochi, it was just a matter of time. Quickview has worked great in all the dpup-stretch builds I'm experimenting with. Never even thought to drop it in Fatdog64, I assumed it would not work right out of the box. Gonna try now that James posted
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Your ideavovchik wrote: thanks for the scaling preference
Me? For complaints or suggestions regarding GtkFileChooserDialog you should contact https://www.gtk.org/development.php. I have no influence on what is displayed in the Places panel.mavrothal wrote:A couple of issues that you might consider addressing
Well, there is: If a partition is mounted, it is listed. If it is not mounted, it is not listed.mavrothal wrote:there is also no indication if a partition is mounted
How do you manage to click on unmounted partitions when they are not visible? And why should they automount? All entries in the left panel (except for the Search box) are mere links.mavrothal wrote:Partitions auto-mount if clicked upon
BTW: This thing behind mm_quickview in your screenshot suggests that you are using GTK+3. Gtkdialog seems to be compiled with an older version of GTK+2. Thunor has prepared switches to compile gtkdialog with GTK+3. Since the file chooser has been developed further, looks different in GTK+3 and addresses some of the issues you mentiond, it would be interesting to see how an updated gtkdialog displays the chooser widget. Results of such experiment could be posted in http://www.murga-linux.com/puppy/viewto ... ?p=941690], but not here. I will continue to use gtkdialog as is.
That's a deliberate feature. You may stray into obscure directories but may not necessarily want to restart from there.greengeek wrote:Alternatively if I terminate the window by clicking the X button it does not remember the directory
Ctrl+Q or Close button: Last directory and geometry are saved
Alt+F4 or X button: Nothing is saved
I don't mind but I have concernsjamesbond wrote:Do you mind if I get this included in Fatdog?
- Neither code nor functionality are finished
- I can't test the script sufficiently and can not provide support for different environments.
- I regard this project as a proof-of-concept, not as a polished application (hence my posting in the Programming forum). I still don't know how this will develop. Next step will be on-demand information for selected directories. Then the big topic of adding shell commands. It ain't ready yet.
@belham2,drunkjedi: Thanks for testing.
Questions:
I repeat my earlier question: In tahrpup ffprobe and ffplay are missing. Autoplay is not supposed to work. Does tahrpup offer alternatives?
New question: Could someone suggest a better name? Quickview is already taken. It's the name of a function in Total Commander and it is also the name of a famous commercial application. Internally I call it fileviewer, which is even more dull.
- perdido
- Posts: 1528
- Joined: Mon 09 Dec 2013, 16:29
- Location: ¿Altair IV , Just north of Eeyore Junction.?
Playing with the Mochi file browser on Precise5.7.1. Looks good and promising!
I like how it has total disk space used by directory when hilighting a directory.
Also good that it launches applications
Makes me smile how easy it is to review music files without launching a program. Nice!
Thanks MochiMoppel!
I like how it has total disk space used by directory when hilighting a directory.
Also good that it launches applications
Makes me smile how easy it is to review music files without launching a program. Nice!
Thanks MochiMoppel!
As the image hints to, I used Peebee’s LxPupSc-latest in this case. Is using openbox/pcmanfm and has no-gtk3-anything. Still, I ldd’ed both pcmanfm and gtkdialg just in case and have no gtk3 dependencies. gtkdialog is v 0.8.4 with support for gtk+ 2, glade and VTE. gtk2 is v2.24.MochiMoppel wrote:Well, there is: If a partition is mounted, it is listed. If it is not mounted, it is not listed.mavrothal wrote:there is also no indication if a partition is mounted
How do you manage to click on unmounted partitions when they are not visible? And why should they automount? All entries in the left panel (exept for the Search box) are mere links.mavrothal wrote:Partitions auto-mount if clicked upon
BTW: This thing behind mm_quickview in your screenshot suggests that you are using GTK+3. Gtkdialog seems to be compiled with an older version of GTK+2. Thunor has prepared switches to compile gtkdialog with GTK+3. Since the file chooser has been developed further, looks different in GTK+3 and addresses some of the issues you mentiond, it would be interesting to see how an updated gtkdialog displays the chooser widget. Results of such experiment could be posted in http://www.murga-linux.com/puppy/viewto ... ?p=941690], but not here. I will continue to use gtkdialog as is.
PCmanFM shows partitions regardless of mount status and so quickview in this setup.
Another little thing I notice regarding symlinks to folders, is that they show as “0 /path/to/symlink
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==
How about GTK_FilerMochiMoppel wrote:New question: Could someone suggest a better name? Quickview is already taken. It's the name of a function in Total Commander and it is also the name of a famous commercial application. Internally I call it fileviewer, which is even more dull.
I liked that name but google says there's a CAD data viewer with that name. Would it matter?step wrote:viewmate
Hey Mochi
Very nice script, indeed.
___________
Anyway, I'm here because Fatdog does not come with xclip pre-installed and I wanted to suggest a solution, e.g.:
I also added double quotes around $vCHOOSER, because otherwise 'echo' squeezes whitespaces, if there's more than one of them in a row.
Oh, and in order to make it more multi-user-friendly, you may want to:
Greetings!
Very nice script, indeed.
Try avprobe/avplay.MochiMoppel wrote:I repeat my earlier question: In tahrpup ffprobe and ffplay are missing. Autoplay is not supposed to work. Does tahrpup offer alternatives?
___________
Anyway, I'm here because Fatdog does not come with xclip pre-installed and I wanted to suggest a solution, e.g.:
Code: Select all
which xclip 2>/dev/null && CLIP='xclip -i' || CLIP='xsel -i'
...
echo -n "$vCHOOSER" | ${CLIP}
Oh, and in order to make it more multi-user-friendly, you may want to:
Code: Select all
TEMPDIR=/tmp/mm_quickview.${USER}
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
MochiMoppel wrote:
New question: Could someone suggest a better name? Quickview is already taken. It's the name of a function in Total Commander and it is also the name of a famous commercial application. Internally I call it fileviewer, which is even more dull.
Well, you all can call it whatever you want, but I actually in truth use "MochiView" in my menu entries, tray bars and .desktop and anyhting else. In the .desktop comment for my builds I always write "QuickView aka MochiView File Manager" so people know if they use one. The name "MochiView" lets me identify it immediately. To me it is simply, honorably, and correctly called:
MochiView File Manager
Thanks.MochiMoppel wrote:I don't mind but I have concernsjamesbond wrote:Do you mind if I get this included in Fatdog?
Ok. We don't mind waiting for a while. Anyway, once we get it in, we hope to track this as it progresses.- Neither code nor functionality are finished
That's okay - we're going to handle that (now that both step and SFR have responded )- I can't test the script sufficiently and can not provide support for different environments.
Sometimes perfect is the enemy of good. The way I see it, it already serves a good purpose. We're happy to take it as it is; and as you continue with the improvement, we'll track it.- I regard this project as a proof-of-concept, not as a polished application (hence my posting in the Programming forum). I still don't know how this will develop. Next step will be on-demand information for selected directories. Then the big topic of adding shell commands. It ain't ready yet.
I'm a bit surprised nobody has suggested this. The "glorious" name, of course:New question: Could someone suggest a better name?
- Puppy Viewer (pview, PView, Pview, pviewer, PViewer, Pviewer, pupview, PupView, pupviewer, PupViewer, PuppyView, etc)
- Puppy File Viewer (pfileview, pupfileview, pupfview, and all other caps/no-caps combinations as above)
- Puppy (File) Preview (ppreview, pfpreview, and other abbrev/caps/no-caps combinations)
- Puppy Universal Viewer (pupuview(er), puview(er), etc)
- MochiView / MochiViewer / MochiFileViewer (mview(er), mfileview(er), mpupview(er), etc)
- Mother of All File Viewer (mview(er), momview(er), etc)
- I'm sure other names along this line will be easy to come up with.
EDIT: belham2 beat me to MochiView, but at least I still have other good ideas
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Building a universal file viewer
You can count me in for universal users.jamesbond wrote:That's okay - we're going to handle that (now that both step and SFR have responded )- I can't test the script sufficiently and can not provide support for different environments.
- Attachments
-
- mm_i.png
- Just a teaser
made by:
<menu label="'$(gettext geany File)'">
<menuitem label="'$(gettext geany Quit)'"
<menu label="'$(gettext geany Preferences)'"> - (72.56 KiB) Downloaded 666 times
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Building a universal file viewer
gettexted and translated using momanager.
TEXTDOMAIN is "puppyview"
TEXTDOMAIN is "puppyview"
- Attachments
-
- mm_i18n.png
- note, fatdog is full of translations
also usage messages already translated - (42.69 KiB) Downloaded 615 times
-
- mm_quickview_20170310_i18n.gz
- remove fake .gz
- (15.87 KiB) Downloaded 185 times
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
@all Thanks for joining the naming contest and lots of interesting proposals. Makes it even harder to choose. How about 'MM Inlook'? Would sound familiar - somehow.
For the time being I'll only get rid of the "quick" and change the script name to mm_view. Pure egoism. It helps me to find it in my huge script pit where all of my more serious stuff starts with 'mm_' . I'll take the liberty to refer to it as MMview for the rest of this thread. Eventually, with more input from the community, the 'MM' will have to go. Let's see.
@mavrothal Maybe I can add '(disk usage)' to the output to make it less confusing.
Line wrapping is possible but I see too many disadvantages and have no plans to implement it.
@SFR I haven't yet tried avprobe/avplay. Tahrpup doesn't run well on my current machine, so tahrpup users will have to wait or roll their own code.
Thanks for pointing out Fatdog's xclip deficiency. Makes me wonder about the reasons, but no problem. This should take care of distros with even none of the two utilities installed:
File names with consecutive whitespace? You must have seen a lot in your life. But of course you are right. I'll fix the quotation marks.
I'll add (multi) user friendliness to my next update. I will put config settings into $HOME/.config/mm_view, so they may survive a reboot, and truly temporary files into /tmp/mm_view. This should be clean enough for multi-user installations.
@greengeek How do you pronounce "viewmmer"?
@belham2 I'm flattered to see "MochiView File Manager" in such big letters. It's not yet a file manager.
@jamesbond Thanks for your interest. Don't worry, I'm not striving for perfection and I will not ride this horse to death.
@stemsee MiView? Why not "MM MiEV"? Mitsubish Motors i-MiEV. Oh, I smell trouble.
@perdido Some kind of subdirectory display is scheduled for one of the next updates though it will be on-demand only, not when you simply select a directory. The problem is that calculation can take too much time and will cause the script to temporarily freeze. Even the current display, generated by the du command, can be extremely slow, e.g. when you select an external drive with thousands of subdirectories. I will therefore add a timeout to the current display, but you will be able to see the information when hitting the F1 key.
@L18L Error messages don't look any nicer in Japanese . As you may have noticed I never gettext my scripts. I don't mind if anyone takes the trouble and adds it, but be warned that I change texts frequently, so "internationalization" should be one of the very last tasks.
For the time being I'll only get rid of the "quick" and change the script name to mm_view. Pure egoism. It helps me to find it in my huge script pit where all of my more serious stuff starts with 'mm_' . I'll take the liberty to refer to it as MMview for the rest of this thread. Eventually, with more input from the community, the 'MM' will have to go. Let's see.
@mavrothal Maybe I can add '(disk usage)' to the output to make it less confusing.
Line wrapping is possible but I see too many disadvantages and have no plans to implement it.
@SFR I haven't yet tried avprobe/avplay. Tahrpup doesn't run well on my current machine, so tahrpup users will have to wait or roll their own code.
Thanks for pointing out Fatdog's xclip deficiency. Makes me wonder about the reasons, but no problem. This should take care of distros with even none of the two utilities installed:
Code: Select all
type -p xclip && CLIP=xclip || { type -p xsel && CLIP=xsel || CLIP=: ;} ; export CLIP
...
echo -n "$vCHOOSER" | $CLIP -i
I'll add (multi) user friendliness to my next update. I will put config settings into $HOME/.config/mm_view, so they may survive a reboot, and truly temporary files into /tmp/mm_view. This should be clean enough for multi-user installations.
@greengeek How do you pronounce "viewmmer"?
@belham2 I'm flattered to see "MochiView File Manager" in such big letters. It's not yet a file manager.
@jamesbond Thanks for your interest. Don't worry, I'm not striving for perfection and I will not ride this horse to death.
@stemsee MiView? Why not "MM MiEV"? Mitsubish Motors i-MiEV. Oh, I smell trouble.
@perdido Some kind of subdirectory display is scheduled for one of the next updates though it will be on-demand only, not when you simply select a directory. The problem is that calculation can take too much time and will cause the script to temporarily freeze. Even the current display, generated by the du command, can be extremely slow, e.g. when you select an external drive with thousands of subdirectories. I will therefore add a timeout to the current display, but you will be able to see the information when hitting the F1 key.
@L18L Error messages don't look any nicer in Japanese . As you may have noticed I never gettext my scripts. I don't mind if anyone takes the trouble and adds it, but be warned that I change texts frequently, so "internationalization" should be one of the very last tasks.
Haha - you may have just given Microsoft a new idea there.MochiMoppel wrote: How about 'MM Inlook'? Would sound familiar - somehow.
Well, I was thinking it would be pronounced something like "vyoo ma". (not really sure how to do phonetic spelling)How do you pronounce "viewmmer"?
"inlook" triggered a few more thoughts:
Can't help myself...
zoomin
zzoomm
zoommin
zoommer
zoommax
immedia
viewmmedia
seemmee
showmmee
inspector
mmonitor
mmicroscope
summary
summation
medium
mmaxiview
I'm going to stop now before my head bursts.