Right click options for lupu-525 , lupu-520 , Wary , Slacko

Miscellaneous tools
Post Reply
Message
Author
User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#91 Post by SFR »

don570 wrote:For instance does anybody know where there's a script to rename
files in a given folder according to modification date

fileX fileY fileZ to fileX000 fileY001 fileZ003

(the sorting depends on modification date of the file
rather than alphabetical)
It'd be very useful, I'm using it sometimes under Windowze ("FileMenu Tools" application).
Could be something like this?

Code: Select all

#!/bin/bash

# batchaddnum by SFR'2012
# Usage: batchaddnum <folderpath> (DO NOT USE ENDING / PLEASE!)

FOLDERPATH=$1

# Dump all filenames from FOLDERPATH into temporary file
# 'ls -t' option sorts filenames in date order ('-tr' for reversed date order)
# 'tail -n +2' removes "Total..." line
# 'egrep -v '^d' removes directories and '^l' removes links
# next 'cut's to leave only filename

ls "$FOLDERPATH" -A -o -t | tail -n +2 | egrep -v '^d' | egrep -v '^l' | cut -f2- -d ':' | cut -b 4- > /tmp/batchfileslist

# And finally rename all files adding numeric suffix

CNT=1
while read LINE; do
  OLDNAME=$FOLDERPATH"/"$LINE
  if [ ${#CNT} -eq 1 ]; then CNT="00"$CNT; fi
  if [ ${#CNT} -eq 2 ]; then CNT="0"$CNT; fi  
  NEWNAME=$OLDNAME$CNT
  mv "$OLDNAME" "$NEWNAME"
  let CNT=10#$CNT+10#1
done < /tmp/batchfileslist

rm -f /tmp/batchfileslist
exit
It's just an example, not optimized nor extensively tested, but works with hidden files as well as spaces in file- and foldernames, excludes folders and symlinks, and should be easy to expand.

Also, I've been thinking about using find FOLDERNAME -maxdepth 1 -type f, then stat -c %Y FILENAME and then join times and filenames and use sort...

Hope I saved you some time.
Greetings!
[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]

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#92 Post by don570 »

Thanks for the info. I didn't see it in time so I used
my own crude method. :oops:

You can test it here.



http://murga-linux.com/puppy/viewtopic. ... 812#612812

I have prepared a nice right click option package
to do renaming of filenames with lots of features
but I found a nasty bug so I can't release it!!
I'll continue to work on it.

___________________________

aarf

#93 Post by aarf »

can we have fsck in right click?

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

New version 5.9.1

#94 Post by don570 »

New version 5.9.1 of right-click

I added or changed three apps

1) Baconrecorder 2.7 - just cosmetic changes

2) Rename-files 1.3 - I wrote this to make some simple changes
to filenames when the files are in a folder

3) dependency check by RSH - version .3 -- uses ldd command

It is still being improved by RSH. There is a better version that will
check libraries.
http://murga-linux.com/puppy/viewtopic. ... ca7aaaa650
________________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

new Version 5.9.2

#95 Post by don570 »

Version 5.9.2 (march 22) dependency check and rename-files upgraded again

The numbering of files in a folder works correctly now

file_000 is the oldest :wink:

___________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#96 Post by don570 »

version 5.9.3

Update:
I'm continuing to work on Rename-files.
The warning messages (about similar file names)
still need improvement. :oops:

_________________________________________

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#97 Post by pemasu »

http://www.murga-linux.com/puppy/viewto ... 451#615451

Not sure if postscript viewer rox right click has been included. The above url provides small pet to do it. It has just small script and rox right click stuff. It should work with epdf and evince.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#98 Post by don570 »

To Pemasu:
I'll look into how PDF files are opened.
I don't think I assumed that evince was installed.

__________________________________________

new version of right click 5.9.4

I am continuing to work on rename-files.

I think I have any nasty bugs fixed but I will still changea couple of
summary windows in the next week.

_______________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

new version 5.9.5

#99 Post by don570 »

new version 5.9.5

New features:

1) rename-files fixed (yet again) :oops:
2 empty-files added ---- this right click option creates empty files
-very useful for a programmer or databases :lol:
3 added pemasu right click for postscript files

User avatar
Pete22
Posts: 264
Joined: Fri 08 May 2009, 22:59
Location: Utah, USA

Saluki

#100 Post by Pete22 »

Does this program work with Saluki?

Pete

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#101 Post by don570 »

Does this program work with Saluki?
No I don't know the method to put options on the
right click menu.

I tried here with rename-files

http://www.murga-linux.com/puppy/viewto ... 004#618004

but it shows on the 'Send to' menu for all files when
what I want is for rename files to show only for folders.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

Yad right click file search

#102 Post by Geoffrey »

I came across a zenity search script meant for Thunar custom actions, I have modified it for yad and changed some of the code so it now works as it supposed to.

I won't make a pet of it, as it won't uninstall correctly, maybe someone will find some use for it.

It is a basic search, type in the name click ok, then double click the result to open the containing directory.

Code: Select all

#!/bin/bash 
#search-for-files 

maxresults=500 

window_icon="mini-zoom" 

# this script will work for any environment that has bash and yad, so the filemanager is entirely down to you! you can add extra arguments to the string as long as the last argument is the path of the folder you open 
filemanager="rox" 

window_title="Search for Files" 

srcPath="$*" 

if ! [ -d "$srcPath" ] ; then 
cd ~/ 
srcPath=`yad --file-selection --directory --title="$window_title - Look in folder" --window-icon="$window_icon"` 
fi 

if [ -d "$srcPath" ] ; then 

fragment=`yad --entry --title="$window_title - Name contains:" --window-icon="$window_icon" --text="Search strings less than 2 characters are ignored"` 
if ! [ ${#fragment} -lt 2 ] ; then 

( 

echo 10 
O=$IFS IFS=$'\n' files=( `find "$srcPath" -iname "*$fragment*" -printf \"%Y\"\ \"%f\"\ \"%k\ KB\"\ \"%t\"\ \"%h\"\\\n | head -n $maxresults` ) IFS=$O 
echo 100 

selected=`eval yad --list --title=\"${#files[@]} Files Found - $window_title\" --window-icon="$window_icon" --width="600" --height="400" --text=\"Search results:\" --print-column=5 --column \"Type\" --column \"Name\" --column \"Size\" --column \"Date modified\" --column \"Path\" ${files[@]}` 

if [ -e "${selected%|}" ] ; then "$filemanager" "${selected%|}" ; fi 

) | yad --progress --auto-close --pulsate --title="Searching..." --window-icon="$window_icon" --text="Searching for \"$fragment\"" 

fi 

fi 

exit 0
Attachments
Screenshot-2.png
(13.13 KiB) Downloaded 711 times
Screenshot-3.png
(84.17 KiB) Downloaded 719 times
Right-click-yad-file-search.tar.gz
(1.26 KiB) Downloaded 567 times

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#103 Post by don570 »

Note to Geoffrey : You should read the script by SFR called
Large file finder which also makes a list of files that
can be double clicked. It doesn't use YAD

http://murga-linux.com/puppy/viewtopic.php?t=77779


Actually what I want is a simple utility to find a file based on date.

For instance I want to find all documents written in past week.

I can't get pfind to work correctly doing this even though it
appears to have this functionality.

_______________________________________________

_________________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

New version 5.9.

#104 Post by don570 »

New version 5.9.6

Added split-file to split up mp3 or txt files in smaller chunks
that might be more manageable.

Upgraded rename-files 4.8

Added in SFR's Large file finder
which can be useful to track down larger files.

_______________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

fast find

#105 Post by don570 »

I made another right click app to find a file fast
but it needs YAD to be installed
so I won't put it in this pet package

http://murga-linux.com/puppy/viewtopic. ... 963#624963

_____________________________________________________

User avatar
oldyeller
Posts: 889
Joined: Tue 15 Nov 2011, 14:26
Location: Alaska

#106 Post by oldyeller »

Hello,

Will this work on Slacko 533

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#107 Post by don570 »

I've tested it on Slacko 531 so it should work with
future versions. Occasionally developers change a link
or the wording of a right click menu item and that
causes a dead menu item to appear . That can
be fixed by the user by just dragging it to the trash can .

______________________________________________

User avatar
vicmz
Posts: 1262
Joined: Sun 15 Jan 2012, 22:47

#108 Post by vicmz »

It didn't work for me on latest Slacko 5.3.3 menus remain as usual. Works in Wary 5.3 though. Maybe UTF-8 has something to do, I know there's espanol-right-click but I find it outdated compared to the original, which is more fulfeatured.
[url=http://murga-linux.com/puppy/viewtopic.php?t=76948]Puppy Linux en español[/url]

User avatar
oldyeller
Posts: 889
Joined: Tue 15 Nov 2011, 14:26
Location: Alaska

#109 Post by oldyeller »

I did have success on Slacko 533

I have already used it to make sfs

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

New version 1.9.7

#110 Post by don570 »

New version 5.9.7

Download available on first page


I checked on Slacko 533 which has been just released.

I noticed that Slacko doesn't have a method to check MD5sum
so I added my version of Check MD5sum.

It will only be seen when Slacko is used.
A comparison of MD5sums can be made to see if download was successful.

______________________________________________

Post Reply