It is currently Thu Jun 04, 2026 2:34 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Relocating scripts
PostPosted: Mon Sep 05, 2016 11:31 am  (#1) 
Offline
GimpChat Member

Joined: Jul 17, 2016
Posts: 293
Location: Arlington, TX
Is there a script or some other function that makes it easier to move scripts from one menu to another? The plug-in browser tells me I have 700+ scripts. It's going to take me forever to manually edit those to get them in the appropriate menus. It would be great if the browser offered the option of relocating the scripts to a different menu. Or if there was a stand-alone plug-in that let you drag-n-drop or something.

_________________
Just a short while ago I was a complete idiot when it comes to GIMP. Today, after many hours of practice, reading, and watching tutorials, I am proud to say I am an incomplete idiot.

Image


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Relocating scripts
PostPosted: Mon Sep 05, 2016 12:40 pm  (#2) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2599
For scripts only something.scm

Ofnuts addonCollectionManager-3.0.py
Does not relocate but keeps to a manageable number at any one time.
see: http://gimp-tools.sourceforge.net/managementtools.shtml
and: http://sourceforge.net/projects/gimp-to ... s/scripts/

I normally only have 2 script-fu scripts permanently installed, load others as needed. I have the manager set up like this, up to you how you configure it. Do not know how it would manage with 100's of scripts.

Attachment:
resourcemanager.jpg
resourcemanager.jpg [ 70.17 KiB | Viewed 5682 times ]


Then for changing script-fu menu locations without manually editing each script.
see: viewtopic.php?f=4&t=6028
A java application JGIMPOS. Drag-n-drop from one menu to another. It does make a back up of the script but not something I use, so up to you to try out.

Attachment:
scriptorganizer.jpg
scriptorganizer.jpg [ 60.17 KiB | Viewed 5682 times ]


Top
 Post subject: Re: Relocating scripts
PostPosted: Mon Sep 05, 2016 1:38 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2637
Location: Poland
Just a suggestion:
For my comfort: I add to the file name - its location in the menu.
GSO is important for the name and location - but the changes editing in notepad ++


Attachments:
GSO by Onkel Hatti.png
GSO by Onkel Hatti.png [ 24.18 KiB | Viewed 5661 times ]

_________________
Image
Top
 Post subject: Re: Relocating scripts
PostPosted: Mon Sep 05, 2016 3:39 pm  (#4) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
Sasquatch wrote:
Is there a script or some other function that makes it easier to move scripts from one menu to another? The plug-in browser tells me I have 700+ scripts. It's going to take me forever to manually edit those to get them in the appropriate menus. It would be great if the browser offered the option of relocating the scripts to a different menu. Or if there was a stand-alone plug-in that let you drag-n-drop or something.


IMHO:

- 700+ scripts is too much, you can keep many of these out of sight using some addon manager
- however the addon manager doesn't work for python scripts and plugins, but for these you can edit the pluginrc file to define new locations, as long as the executable doesn't change the registration will remain the same.
- but keeping a reasonably standard UI is best if you share techniques with other people (produce or follow tutorials, for instance, or asking and answering questions on GC and elsewhere).

_________________
Image


Top
 Post subject: Re: Relocating scripts
PostPosted: Mon Sep 05, 2016 4:07 pm  (#5) 
Offline
GimpChat Member

Joined: Jul 17, 2016
Posts: 293
Location: Arlington, TX
Rich2005, thank you! That is exactly what I am looking for. I even created a launcher on my lower taskbar so I can fire it up whenever I feel the need.

MareroQ, that is a pretty good idea. Do you just rename the scm file in the folder? Or do you change something else?

Ofnuts, I suspect it is counting the scripts in G'MIC as well. My scripts directory only has 368 items in it. And I suspect some of those are redundant. So I still have quite a bit of sorting to do. But I assure you I will be culling the herd. All of the colorizing scripts, for example, can go because all of that can be accomplished with curves and such. Same with many of the "create a..." scripts since I can do most of that with some superbly crafted path-to-shape scripts I happen to possess. :hehe

_________________
Just a short while ago I was a complete idiot when it comes to GIMP. Today, after many hours of practice, reading, and watching tutorials, I am proud to say I am an incomplete idiot.

Image


Top
 Post subject: Re: Relocating scripts
PostPosted: Tue Sep 06, 2016 7:56 am  (#6) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16009
You will be surprised to see how fast GIMP loads when you use an addon manager for patterns , brushes, and scripts. I open ONLY the ones i need for a session. Then just open the mangers again and deselect them. GIMP opens clean again.

Keep in mind though certain SCM files rely on OTHER scheme files, G'MIC filters, Python files, or executable s to work. Just something to think about before you start moving things about. ;)

_________________
Image


Top
 Post subject: Re: Relocating scripts
PostPosted: Tue Sep 06, 2016 2:03 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Mar 13, 2016
Posts: 83
The Collection Manager looks like a very useful tool that I'm not familiar with. Could someone do a short tutorial on how to install and configure for first time installation. I'm using Windows 10 x64, Gimp 2.8.18.

Larry

_________________
Image


Top
 Post subject: Re: Relocating scripts
PostPosted: Tue Sep 06, 2016 2:50 pm  (#8) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14011
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
RMDesigns wrote:
The Collection Manager looks like a very useful tool that I'm not familiar with. Could someone do a short tutorial on how to install and configure for first time installation. I'm using Windows 10 x64, Gimp 2.8.18.

Larry


There's a link posted by rich2005
click here...
Which explains what the Addon-Manager is,
it's Usage,
Configuration and Installation.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Relocating scripts
PostPosted: Tue Sep 06, 2016 3:25 pm  (#9) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2599
I did this video more than a year ago but was never very happy with it.

Too long, too slow, large boredom factor, but it does cover the basic use of Ofnuts addonCollectionManager.

Might get you started: https://www.youtube.com/watch?v=v0g0qv4YMks 14 minutes


Top
 Post subject: Re: Relocating scripts
PostPosted: Tue Sep 06, 2016 6:04 pm  (#10) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14011
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
I'm curious about something.
If I add a scripts_storage folder to manage my scripts,
using the addon-manager.
Where will the storage folder,
containing the script sets be located within Gimp's interface?
:puzzled

Edit:
Never mind.
:oops:
I watched rich2005's video and learned that scripts sets can be found under the Help Menu.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Relocating scripts
PostPosted: Tue Sep 06, 2016 7:58 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Mar 13, 2016
Posts: 83
@Wallace
I read that over but wanted more details, you know like a video! :hehe Thank you for the reply.

@ Rich
Thanks for posting the video, good information. On the Tools Menu how did you get the Tools>Resource>Scripts Sets Manager showing all of the sets?

Image

Larry

_________________
Image


Last edited by RMDesigns on Tue Sep 06, 2016 9:21 pm, edited 1 time in total.

Top
 Post subject: Re: Relocating scripts
PostPosted: Tue Sep 06, 2016 8:40 pm  (#12) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4826
Location: Bendigo Vic. Australia
Caution! before using GSO make sure you copy all your scripts in case corrupts the ones you try to shift
Below is what it did to one of my scriptswhen I tested
Image

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Relocating scripts
PostPosted: Wed Sep 07, 2016 3:40 am  (#13) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2599
Quote:
@ Rich
Thanks for posting the video, good information. On the Tools Menu how did you get the Tools>Resource>Scripts Sets Manager showing all of the sets?

Larry


AddonCollectionManager: Make sure everything works with the default setup first.

Want to customise the menu locations?

It is described in http://gimp-tools.sourceforge.net/managementtools.shtml
Create an .ini file addonCollectionManager.ini to go alongside addonCollectionManager.py in .gimp-2.8\plug-ins folder.

It might look like this

Attachment:
menu-example.jpg
menu-example.jpg [ 80.31 KiB | Viewed 2946 times ]


If you need to do any text editing in Windows then do not use 'Write'. 'Notepad' is dire, so get one of the free text editors such as notepad++

you can try this example:
Attachment:
addonCollectionManager.ini.zip [551 Bytes]
Downloaded 113 times

remember to unzip it.

Does it work with Win10 and Gimp 2.8.18? Being a linux user I thought I better give it a try.

In a Win10 64 bit VM. screenshot. http://imgur.com/VwYot61


Top
 Post subject: Re: Relocating scripts
PostPosted: Wed Sep 07, 2016 3:52 am  (#14) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4826
Location: Bendigo Vic. Australia
The AddonCollectionManager: From ofnuts works Great and I use it with in Win10, Gimp 2-8-18

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Relocating scripts
PostPosted: Wed Sep 07, 2016 5:39 am  (#15) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16009
I still use the manager from GURM (modified by MareroQ). Love this manager. :)
viewtopic.php?f=9&t=4371#p54131
Image Image
Image Image
Image

_________________
Image


Top
 Post subject: Re: Relocating scripts
PostPosted: Thu Sep 08, 2016 12:02 am  (#16) 
Offline
GimpChat Member
User avatar

Joined: Mar 13, 2016
Posts: 83
@Rich

The manager works perfectly, thank you very much for your time. I didn't realize how much stuff I've accumulated over the years. I should get done sorting and tossing by New Year's! :mrgreen: Have a great rest of the week.

Larry

_________________
Image


Top
 Post subject: Re: Relocating scripts
PostPosted: Thu Sep 08, 2016 8:02 pm  (#17) 
Offline
GimpChat Member

Joined: Jul 17, 2016
Posts: 293
Location: Arlington, TX
I'm slowly coming to understand how to do some fun things behind the scenes in Linux. I just finished this shell script which arose from this thread. It's just a handy little script that reads all the .scm files in a directory and outputs a menus.txt file that has every appearance of a menu-registry marker ("<Image>...", etc) along with the script file name and the line number in the script where the marker appears. So when you run the script you get something like this;
10pct_edge_guides.scm                     42      "<Image>/Image/Guides"       
10pct_grid_guides.scm                     77      "<Image>/Image/Guides"       
1_inch_guides.scm                         68      "<Image>/Image/Guides"       
1_motif_pattern.scm                       251     "<Image>/File/Create/Patterns/1 Motif Pattern ..."
20centfox.scm                             3       "<Image>/Script-Fu/20 Cent Fox Text"

Not necessarily the most useful tool in the world. But it does offer a convenient reference. It's essentially like having the plug-in browser available at a glance.

I'm sure the code is sub-optimal. But it does function well enough. I don't know how much editing it might need to work on other OSes. It uses grep, awk, and printf to find, parse, and print the data.
Here it is. Maybe those who know more than I do can tidy it up, port it, or enhance it somehow.
# This script uses grep to locate all the lines in a directory of
# GIMP scripts which contain menu path markers ("<Image>..." etc).
# The -nHo flags cause grep to output the line number of the marker,
# the file name, and the complete string it matched.
# The raw grep output is cluttered and difficult to read.
# So I sent it to printf via awk to be organized in tidy columns.
# While this script was specifically designed to search for menu
# paths in GIMP script files it may have other uses.
# Note that this script does not distinguish between menu registers
# and other strings that contain "<*****". So you will get multiple entries
# for some scripts. The line numbers make it easy to navigate a text
# editor to see what's going on.

# Also, at the moment this script is limited to working on the directory
# in which it is called. It wouldn't be difficult to change the code to search
# for all scm files on your system. I didn't see a need to do so since
# most of us keep our scripts in one place.

IFS=$'\n'; for f in *scm; do grep -nHo '"<[A-Z].*"' $f | awk -F: '{ printf "%-52s %-7u %-30s\n", $1, $2, $3 }' >> menus.txt; done

The code window puts a line break in the actual script code. I'm not sure how to edit the window properly to show the code in a functional way. So just know that it was written as a one-liner.

*EDIT*
Trying to fix some formatting issues caused by the code window. Not sure if it's just my browser. But I don't want to create problems for people who want to copy the code.

_________________
Just a short while ago I was a complete idiot when it comes to GIMP. Today, after many hours of practice, reading, and watching tutorials, I am proud to say I am an incomplete idiot.

Image


Top
 Post subject: Re: Relocating scripts
PostPosted: Thu Sep 08, 2016 8:24 pm  (#18) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12775
The biggest slowdown for me is the user filter. I still (often enough) use it so I tolerate the time it takes GIMP to launch. Large size (memory) brushes also slow downs GIMP's start and need for resources too. Regardless, I choose not to use a manager since I don't want to have to re-start GIMP every time. I usually just leave GIMP open most of the time anyway. To each his (or her) own. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Relocating scripts
PostPosted: Fri Sep 09, 2016 1:57 am  (#19) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
lylejk wrote:
The biggest slowdown for me is the user filter. I still (often enough) use it so I tolerate the time it takes GIMP to launch. Large size (memory) brushes also slow downs GIMP's start and need for resources too. Regardless, I choose not to use a manager since I don't want to have to re-start GIMP every time. I usually just leave GIMP open most of the time anyway. To each his (or her) own. :)

You don't need to restart Gimp with a manager... the manager will refresh the lists.

_________________
Image


Top
 Post subject: Re: Relocating scripts
PostPosted: Fri Sep 09, 2016 2:01 am  (#20) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
Sasquatch wrote:
I'm slowly coming to understand how to do some fun things behind the scenes in Linux.


Nothing is behind the scenes in Linux :) Everything is in plain view.

Awk may not be needed since there is a 'printf' command in Bash.

_________________
Image


Top
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group