(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 23 Sep 2020, 16:18
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Building MMview, a universal file viewer
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 21 of 24 [348 Posts]   Goto page: Previous 1, 2, 3, ..., 19, 20, 21, 22, 23, 24 Next
Author Message
rockedge


Joined: 11 Apr 2012
Posts: 1874
Location: Connecticut, United States

PostPosted: Sun 01 Sep 2019, 13:03    Post subject:  

hey MochiMoppel

really cool...and the eyeglasses changing color when mm_view is running is actually very helpful

nice!
Back to top
View user's profile Send private message Visit poster's website 
josejp2424


Joined: 01 Aug 2010
Posts: 558

PostPosted: Sun 01 Sep 2019, 13:51    Post subject: MMviem  

MochiMoppel wrote:
Special desktop edition
Promised to perdido and based on above update I tried to set an icon for MMview that would change according to the color of the fat guy's glasses. When he is not viewing anything glasses are light gray.
Affected are icons on the pinboard and in ROX-Filer window

This is a special edition of MMview and I'm not sure if I will ever include this gimmick into future official versions though I admit that I'm starting to like it. It may even be useful: I often have multiple instances open and it happens that I forget an instance on a different desktop. The icon color tells me if there is still an instance open somewhere.

Uncompress and make executable as usual. For most fun drag the script from ROX-Filer to the desktop. Don't add an icon manually, just click and see what happens.


Excellent work MochiMoppel thanks

_________________
Shiba Inu | Pupjibaro jessie | My Blog
Back to top
View user's profile Send private message Visit poster's website 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Tue 29 Oct 2019, 02:16    Post subject:  

Update 2019-10-29 (see also initial post)
While hexdumps (see update 2019-04-09) can be useful for power users, this update adds a more gentle way to display "octet streams" and other binaries. Accessible from View menu or ASCII button.

Display printable ASCII strings
Uses busybox strings command to extract plain text strings (=printable characters) from binary files. Control characters and extended ASCII characters (see ASCII table) are eliminated and only text strings that are at least 4 characters long are displayed. This value can be changed. Note that the control character 09 (=tab) is treated as printable.

This function is particularly useful to
- get an idea what an unknown "octet stream" is used for
- search for specific strings in binaries (practically impossible with other tools like grep or hexdump)
- recover code from corrupted shell scripts
- find version or usage info in files unable to run with current OS
- extract body text from binary wordprocessor files (e.g. MS Word 2.0)

Set minimum length
The minimum length of displayed ASCII strings can be adjusted and will be saved.
Personally I find that the default of 4 produces too much garbage and therefore I prefer something around 8. Only in extreme cases it can be useful to set the limit to 1, e.g. when dealing with corrupted scripts.

Display decimal offsets
Prepends each string with its decimal offset. This makes it easy to find the string in MMview's hexdump, which also uses decimal offsets.

ASCII table
A little extra tool discussed here. Useful mostly for programmers.

Support for additional image formats
CURSOR: Xcursor image files; no extension, MIME image/x-xcursor. Requires xcur2png (probably present in all Puppies)
QIF/QTIF: QuickTime image files; extension ".qif" or ".qtif"
ICNS: Apple icon image files; extension ".icns")

Bugfixes
Fixed: MMview may not restart in last used folder
Fixed: Right-to-left characters (e.g Arabic) in table "CHARACTERS (Unicode codepoints and bytestrings)" result in inverted lines (not a bug but annoying)

Other changes
More color variations for the main icon.
Various performance improvements.
ASCIIstrings.jpg
 Description   
 Filesize   85.77 KB
 Viewed   838 Time(s)

ASCIIstrings.jpg

Back to top
View user's profile Send private message 
dancytron

Joined: 18 Jul 2012
Posts: 1555

PostPosted: Tue 29 Oct 2019, 13:45    Post subject:  

Just downloaded the latest version.

Once again, this is really excellent work. I've got to try to actually use it more.

Dan
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 1874
Location: Connecticut, United States

PostPosted: Tue 29 Oct 2019, 14:58    Post subject:  

using the latest version on a Void Linux WeeDog.....works very well
Back to top
View user's profile Send private message Visit poster's website 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Thu 31 Oct 2019, 04:53    Post subject:  

Many thanks.
For friends of the "Special desktop edition" I have updated this edition. It is now based on the newest MMview version.
Back to top
View user's profile Send private message 
perdido


Joined: 09 Dec 2013
Posts: 1601
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: Fri 01 Nov 2019, 07:02    Post subject:  

MochiMoppel wrote:

For friends of the "Special desktop edition" I have updated this edition. It is now based on the newest MMview version.


Thanks for this Smile

.
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 1874
Location: Connecticut, United States

PostPosted: Fri 01 Nov 2019, 10:40    Post subject:  

Quote:
"Special desktop edition"


beyond cool!! Thank you
Back to top
View user's profile Send private message Visit poster's website 
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Sun 03 Nov 2019, 22:15    Post subject:  

MochiMoppel, I think that most of us are friends of the "Special desktop edition". Very clever, extremely cool! Very Happy
_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Fri 20 Dec 2019, 08:56    Post subject:  

Tips & Tricks No.2

I'll try to explain a feature that is not exclusive to MMview. It exists in every "Open..." dialog (e.g. Geany) were it probably is never used - for good reasons. In MMview it can be extremely useful.

The built-in "Search" function
"Search" is the first item in the Places pane. When clicked it opens an entry field where the user can enter a search string. Pushing Enter then populates the list pane with all matching filenames

After some trial & error I figured out how this thing works:

1) "Search" only finds files/directories in the directory listed after "Search" and "Recently Used". For most Puppy users this will "root".
2) Hidden files/directories are ignored. For example no files in /root/.config will be found.
3) Symlinks are not followed , which means that the search scope can not be expanded by symlinking "non root" directories, e.g /usr, to /root .
4) Wildcards are not allowed. Search strings are taken literally.
5) Search is not case sensitive


Despite all these restrictions "Search" can be pretty useful in MMview for users who keep their personal files in directories like /root/my-documents and /root/my-applications.
A possible use case: User stores mp3 albums in /root/my-music, each album in its own directory. Some song titles are covered by different artists and therefore appear in different mp3 albums (directories). Searching for the title (or parts of it) would list all matching mp3 files. MMview makes it possible to play and compare them and even would find duplicates. And now the best part:

6) The search string and the resulting matches will not be erased after closing the "Search" entry box.

This means that the user can continue to operate MMview as usual and can always go back to the previous search results by clicking "Search".

Searching external directories
Above functionality may be great for people using a pupsave file, but for me who doesn't use one and keeps all personal files outside of Puppy there is not much to search under /root (see screenshot). Frankly, "Search" is completely useless.

There is however a way to include external directories or even whole filesystems in the search:

7) Mountpoints under /root are searched as well

This will give real power to "Search".
Example: I start Puppy from a USB stick, which appears as sdb1. All personal files, photos,scripts etc are stored on this stick outside of Puppy in /mnt/home, which is a symlink to /mnt/sdb1.
If I create a new directory under root, say /root/MP, I can mount the whole stick to this directory with the command
mount /dev/sdb1 /root/MP
Now "Search" will search all files/directories in /root and on the stick and present the result in a nice flat list, ideal for browsing with MMview.
I also tried to mount /dev/sda1, which happens to be the harddisk partition where I keep all my photos in hundreds of directories. Searching for "jpg" took a while but eventually produced a huge list of all my photos. It's like having them all in one big directory, ready to be sorted and "mmviewed". I'm not aware of any other tool that would be able to do that.
GTK-Search.png
 Description   
 Filesize   58.09 KB
 Viewed   449 Time(s)

GTK-Search.png

Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Thu 13 Feb 2020, 04:12    Post subject:  

Update 2020-02-13 ( version 0.28 ) (see also initial post)
This update adds the ability to select a specific file and window location at startup. It also combines various settings in a new config file and fixes some bugs.

Config file $HOME/.config/mm_view/config
This file is a bucket for all settings that should survive a reboot. Some preferences can be changed by directly editing this file. Future versions will include more preference settings.

Start with a specific file
Requires xdotools. Depending on the value of RESTORE_LAST_SELECTION in the config file this feature can be enabled, disabled or - as default - enabled only when using MMview's new menu item "Restart". For details about limits and caveats of using xdotools see here.

Start with the last saved window position
Requires wmctrl. Depending on the value of RESTORE_LAST_WINPOSITION in the config file this feature can be enabled, disabled or enabled only when using Menu File -> Restart (which is the default). Enabling this feature for *every* start can be a bit annoying as the window is always positioned by the window manager , after which wmctrl corrects the position to the last saved value. I don't like this visible relocation and therefore didn't make it the default.

"Restart" menu item
This function can be useful for testing aforementioned 2 new feature. After selecting "Restart" and if all goes well, MMview will restart with exactly the same dimensions, postion and file selection as the just closed window. Internally this function is used whenever a new setting requires a restart (e.g the vertical layout switch).

"New Window" menu item
This function can be accessed from Menu File -> New Window and allows to open another MMview window with the same selection as the already existing window - almost a clone (position is not retained to avoid covering the old window completely by the new window).

Bug fixes
Fixed: "Open With" middle-click dialog does not open selected program
Fixed: Rename/Delete dialog does not work for filenames starting with '-'
Fixed: Content of gzipped shellscripts not displayed when pressing F1

Other changes
- MMview now comes with a version number, displayed in the title bar.
- /proc and /sys and all their subfolders now reported as virtual file system, which can speed up scrolling
- "Quit" behavior changed back to original. A new tooltip for "Quit" button and menu explains the behavior.
- Apart from completely empty directories now directories containing only empty subdirectories, files or symlinks are also labeled as EMPTY. This "EMPTY" is hard to overlook and prevents accidental opening of directories with no viewable content.

Have fun!
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 1352

PostPosted: Fri 14 Feb 2020, 02:47    Post subject:  

Thank you for this update.
_________________
Fatdog64-810|+Packages|Kodi|gtkmenuplus
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 1874
Location: Connecticut, United States

PostPosted: Fri 14 Feb 2020, 09:27    Post subject:  

excellent! I am using it as a main feature in EasyPup.
The program is very helpful
Back to top
View user's profile Send private message Visit poster's website 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Sat 22 Feb 2020, 07:57    Post subject:  

Thanks for the encouragement to continue this project. There is still work to do. Probably by the next update you will see an improved Find function with a very fast text search across directories. To my knowledge this doesn't yet exist in any Puppy. There is one in zigbert's pFind but there the focus is on finding files while mine will focus on finding (and of course displaying) text. If there is any other program I missed, please let me know.

The "Special desktop edition" got its obligatory update.

Beware that colored glasses are not a reliable indicator for a running instance nor are they an indicator for increased intelligence . Glasses stay colored if MMview is killed or run from a console that has been killed. A restart will fix that.
Back to top
View user's profile Send private message 
perdido


Joined: 09 Dec 2013
Posts: 1601
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: Sat 22 Feb 2020, 16:42    Post subject:  

MochiMoppel wrote:

The "Special desktop edition" got its obligatory update.

Still using MMview every day. I may have collected the whole set!

Quote:
Beware that colored glasses are not a reliable indicator for a running instance nor are they an indicator for increased intelligence.

Keep on keeping-on MochiMoppel, thanks & rest assured you are appreciated Exclamation

.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 21 of 24 [348 Posts]   Goto page: Previous 1, 2, 3, ..., 19, 20, 21, 22, 23, 24 Next
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2410s ][ Queries: 13 (0.1833s) ][ GZIP on ]