SlocateGUI with apptree
SlocateGUI with apptree
This is my update to slocategui, which depends on yad and slocate. Find files dirs easily. Per partition/drive functionality. Use slocate to read .packages/app.files list to feed into apptree to rebuild app in dir tree. Also combine several related installs together. Then create pet or sfs. Select multiple media files and send to player as playlist. Use slocate to remove/copy/move files and/or dirs recursively no prompt.
https://mega.co.nz/#!dcZmEZqB!8vyWC9kGi ... ZDBRqt31yU
https://mega.co.nz/#!dcZmEZqB!8vyWC9kGi ... ZDBRqt31yU
Last edited by stemsee on Wed 24 Aug 2016, 12:27, edited 2 times in total.
So here is an update. Slocate-GUI-3.2-apptree
Added the ability to link -s file
Rename file.
Replace e.g. replace space in file name with something else: syntax is 'thing-to replace'replace-with-this' only three apostrophees:replace space ' '_' with underscore.
for files from windows machines. Replace any string/symbol except apostrophe and backslash.
With apptree, which lets you rebuild a pet from install file list ~/.packages/*.files or from multiple individually selected files fed to apptree as a playlist. Gives choice to build sfs or pet or 'both'. And rename folder before building package so that search term need not be the package name term.
Added the ability to link -s file
Rename file.
Replace e.g. replace space in file name with something else: syntax is 'thing-to replace'replace-with-this' only three apostrophees:replace space ' '_' with underscore.
for files from windows machines. Replace any string/symbol except apostrophe and backslash.
With apptree, which lets you rebuild a pet from install file list ~/.packages/*.files or from multiple individually selected files fed to apptree as a playlist. Gives choice to build sfs or pet or 'both'. And rename folder before building package so that search term need not be the package name term.
- Attachments
-
- SlocateGUI-AppTree-3.2.pet
- (34.88 KiB) Downloaded 357 times
Last edited by stemsee on Fri 29 May 2015, 21:39, edited 2 times in total.
There are some problems I a experiencing. To have all partitions indexed in main db i do this inn term/etc/updatedb.conf must be edited to remove /mnt from exluded dirs. Then all conneted partitions will be mounted and indexed. If you wish to idex only system then the command isIn fact if /initrd is in the updatedb.conf ten no need to specify initrd. But for devs sseeing initrd files might be useful.
I was really trying to get it to build a databse per partition and choose to search only that db for that partition, but I am not making much headway.
I want to acheive all of this with one single script and binary and configfile.
Code: Select all
slocate -u -e /initrd
Code: Select all
slocate -u -e /initrd,/mnt,
I was really trying to get it to build a databse per partition and choose to search only that db for that partition, but I am not making much headway.
I want to acheive all of this with one single script and binary and configfile.
This is my most used program ever. It is absolutely the most useful utility ever.
Now it works per partition. It checks if the db exists first. it makes sure correct permissions for reading the db are set. it updates each db that had files altered with the script.
Now it works per partition. It checks if the db exists first. it makes sure correct permissions for reading the db are set. it updates each db that had files altered with the script.
- Attachments
-
- slocateGUI-x86_64.pet
- 64bit
- (28.59 KiB) Downloaded 327 times
-
- SlocateGUI-AppTree-3.2.pet
- (34.88 KiB) Downloaded 334 times
So I ran into this problem. After plugging in a 500gb usb hdd with media files on it, slocate did its thing and built a db for that drive only. However on removing the drive and later plugging it back in it ws assigned a different tag: sdc instead of sdb ... so now the db is incorrect because it still thinks the files are stored on sdb*. To deal with this I added code to automatically add all partitions to fstab by UUID if they are not already added. Working fine so far. Also added reset function for deleting all slocate.db files on a ll attached partitions.
It is surprising how difficult it is to find definitive fstab entries for various filesystems. However all is well enough. Original fstab gets backed-up first before entries are made. Just plug in all the drives you want indexed and added to fstab.
I have made some features into functions, to improve the flow of the progrm for enhanced user experience. One script does everything. ' slocategui reset' in term deletes all slocate.db files and restores fstab.
If anyone wants this and is able to provide useful feedback please pm me.
I have made some features into functions, to improve the flow of the progrm for enhanced user experience. One script does everything. ' slocategui reset' in term deletes all slocate.db files and restores fstab.
If anyone wants this and is able to provide useful feedback please pm me.
gui
- Attachments
-
- capture10327.jpg
- (7.96 KiB) Downloaded 538 times
-
- capture10923.jpg
- (8.87 KiB) Downloaded 532 times
-
- capture11743.jpg
- (9.54 KiB) Downloaded 524 times
-
- capture14850.jpg
- (31.37 KiB) Downloaded 522 times
-
- capture15348.jpg
- (32.22 KiB) Downloaded 529 times
gui
- Attachments
-
- capture4628.jpg
- (11.64 KiB) Downloaded 521 times
-
- capture26135.jpg
- (21.67 KiB) Downloaded 529 times
-
- capture26965.jpg
- (33.96 KiB) Downloaded 527 times
-
- capture27919.jpg
- (8.95 KiB) Downloaded 528 times
-
- capture28898.jpg
- (11.78 KiB) Downloaded 534 times
-
- capture30010.jpg
- (53.12 KiB) Downloaded 536 times
And finally I went through the code and optimized. Now it is fast as well as comprehensive. The only glitch I have found is that sometimes results are shown for the partition db and some results for the system db ... bleed over or crosstalk so to speak. Either both DBs are being searched or the items are logged in both DBs. Not a deal breaker by any means! And I am very happy to have successfully coded the script to auto add all partitions to fstab correctly, only once. Not all filesystem types are catered for though; only ext[2-4], ntfs, vfat, and hfsplus. But I will continue to add others. Aslo I will continue to add preset commands handling, in addition to ; replace, cp, mv, rm, ln, rename. I have just realised that the rm section could be used for all multiple execs, such as petget (install many pets), or dpkg -i, rpm, or anything requiring a simple loop. I would only need to add M after the command with options e.g. rm -rf M ... as long as the M came at the end the command would send it to the loop section and loop through the results list.
This is my most used and favourite app...it's just so useful once you get familiar with its use. Slocate-GUI-4.pet made by itself! When input box for app/command to use enter apptree for building pet or sfs or both from .packages/file list. I hope you enjoy it as much as I do.
- Attachments
-
- capture12488.jpg
- (64.61 KiB) Downloaded 415 times
-
- capture12975.jpg
- (9.96 KiB) Downloaded 418 times
-
- capture14399.jpg
- (13.12 KiB) Downloaded 414 times
-
- capture14946.jpg
- (9.87 KiB) Downloaded 415 times
-
- capture15790.jpg
- (8.82 KiB) Downloaded 413 times
-
- capture16230.jpg
- (8.83 KiB) Downloaded 416 times
-
- capture16887.jpg
- (54.69 KiB) Downloaded 430 times
-
- Slocate-GUI-4-x64.pet
- 64bit
- (30.2 KiB) Downloaded 339 times
-
- Slocate-GUI-4.pet
- 32bit
- (36.97 KiB) Downloaded 295 times
You can restore your fstab and delete all created database files with
or manually restore or edit the /etc/fstab-backup.
Code: Select all
slocategui reset
Found a bug which prevented system db from being searched under circumstances most first time users will have. Download these or run in term
Code: Select all
ln -fs /var/lib/slocate/slocate.db /var/lib/slocate/sys
- Attachments
-
- SlocateGUI-i386.pet
- (36.59 KiB) Downloaded 261 times
-
- slocateGUI-x86_64.pet
- (30.09 KiB) Downloaded 272 times
Unbelievable ... I found another bug error in a link command which meant that only sys db was available for searches. How does this happen? I cannot believe I am really so clumsy!! With add to group pinstall.
- Attachments
-
- SlocateGUI-i386.pet
- (35.76 KiB) Downloaded 226 times
-
- slocateGUI-x86_64.pet
- (28.92 KiB) Downloaded 222 times
Finally I spent some time considering how to overcome the problem of duplicates turning up in search results. This error was caused by the fact that i linked default slocate.db to sys and both got searched. Solved by grep --invert-match filtering out sys just before search.
Second problem was that default slocate.db must be searched or fatal error occurred. This meant that you could not search sda5 only, without also searching default db. Solved by renaming default db and touching slocate.db (empty file). Then restoring default db after search. This only occurs when sys is not selected as search db.
Also found missing $ symbol in link command section.
Second problem was that default slocate.db must be searched or fatal error occurred. This meant that you could not search sda5 only, without also searching default db. Solved by renaming default db and touching slocate.db (empty file). Then restoring default db after search. This only occurs when sys is not selected as search db.
Also found missing $ symbol in link command section.
- Attachments
-
- SlocteGUI-100915.pet
- (35.35 KiB) Downloaded 230 times
making a full pet easily : won'it ?
slocateGui works. please try to explain what mean codes that you type in terminal. English for us is difficult enough, but understand your linuxian language is awfull. try to make the jargon understood.
I know gnewpet, i know pfind.
Does SlocatGui will give me better résults.
My problem with gnewpet are dependancies, apptree will list them and allow me making a full pet easily : won'it ?
What is db ; database ?
Added the ability to link -s file : what is a s file ?
"/etc/updatedb.conf must be edited to remove /mnt from exluded dirs. Then all conneted partitions will be mounted and indexed. If you wish to idex only system then the command is" I want to choose what partition will be searched, not all partitions, how can i choose ?
sh-4.1# apptree
/usr/bin/apptree: line 7: /tmp/name: No such file or directory
sh-4.1#
I know gnewpet, i know pfind.
Does SlocatGui will give me better résults.
My problem with gnewpet are dependancies, apptree will list them and allow me making a full pet easily : won'it ?
What is db ; database ?
Added the ability to link -s file : what is a s file ?
"/etc/updatedb.conf must be edited to remove /mnt from exluded dirs. Then all conneted partitions will be mounted and indexed. If you wish to idex only system then the command is" I want to choose what partition will be searched, not all partitions, how can i choose ?
sh-4.1# apptree
/usr/bin/apptree: line 7: /tmp/name: No such file or directory
sh-4.1#