Page 1 of 3
Tag Manager
Posted: 08 Jun 2009 08:45
by Muroph
Tag Manager v2.2
Now powered by DHTML.
No more worries about formatting and tag ids.
What this script can do:
- Reorder your tags.
- Change their names and colors (a color picker is included).
- Add and remove tags in any position.
TO DO:
DONE-Better "up" and "down" buttons OR sorting by drag'n'drop.
DONE-If you add a new tag and then cilck to delete it, remove it from the list.
-Maybe use a more powerful color picker.
DONE??-Improve the HTML code.
Re: Tag Manager
Posted: 08 Jun 2009 14:27
by admin
I seem to see these two a lot in your scripts:
Code: Select all
#182; //save settings
#190; //restart
Looks bad in scripts I think so I will give them literal equivalents. Please provide a list of commonly needed "numerical" commands.
Re: Tag Manager
Posted: 08 Jun 2009 19:34
by Muroph
i woke up this morning with a fresh idea.
now it's possible to delete tags using the script.
admin wrote:Please provide a list of commonly needed "numerical" commands.
for me they are mostly restart and the "file->settings->save xxx" commands.
Re: Tag Manager
Posted: 09 Jun 2009 15:24
by TheQwerty
admin wrote:I seem to see these two a lot in your scripts:
Code: Select all
#182; //save settings
#190; //restart
Looks bad in scripts I think so I will give them literal equivalents. Please provide a list of commonly needed "numerical" commands.
I really hope you were planning on taking SaveSettings() a step further to be:
SaveSettings(Items);
Where items can be some combination of the following: Conf|Cat|UDC|CKS|FVS|TaC|Servers|Panes*
And the default is obviously all.
*When this inevitably gets added to the list.
I prefer to save as little as possible in my scripts to reduce the time it takes.
But then the number 1 reason I am saving the config in the first place is so I can ascertain the current state of an option, which is why I repeat we need a GetCurrentSetting function.
Re: Tag Manager
Posted: 09 Jun 2009 15:27
by admin
TheQwerty wrote:admin wrote:I seem to see these two a lot in your scripts:
Code: Select all
#182; //save settings
#190; //restart
Looks bad in scripts I think so I will give them literal equivalents. Please provide a list of commonly needed "numerical" commands.
I really hope you were planning on taking SaveSettings() a step further to be:
SaveSettings(Items);
Where items can be some combination of the following: Conf|Cat|UDC|CKS|FVS|TaC|Servers
And the default is obviously all.
I prefer to save as little as possible in my scripts to reduce the time it takes.
But then the number 1 reason I am saving the config in the first place is so I can ascertain the current state of an option, which is why I repeat we need a GetCurrentSetting function.
I will take it further later.
A GetCurrentSetting function would be an enormous work. Frankly I don't think I will ever do this.
Re: Tag Manager
Posted: 09 Jun 2009 15:31
by TheQwerty
admin wrote:A GetCurrentSetting function would be an enormous work. Frankly I don't think I will ever do this.
Really? I guess I'll have to continue to dream of a better world where I can replace SaveSettings();GetKey(...); with a single command and no disk writes.

Re: Tag Manager
Posted: 09 Jun 2009 15:46
by admin
TheQwerty wrote:admin wrote:A GetCurrentSetting function would be an enormous work. Frankly I don't think I will ever do this.
Really? I guess I'll have to continue to dream of a better world where I can replace SaveSettings();GetKey(...); with a single command and no disk writes.

Actually, now that you talk about disk writes, it comes to my mind that there is a workable way: I could write all settings into a string variable instead to a file (but identical to that file), and also read keys/values from that string without touching the disk once. Just to give you a little hope.

Re: Tag Manager
Posted: 25 Jun 2009 19:33
by Muroph
admin wrote:I could write all settings into a string variable instead to a file (but identical to that file), and also read keys/values from that string without touching the disk once. Just to give you a little hope.

so we would be able to use SC getkey on an up-to-date virtual ini file?
something like:
Code: Select all
getkey $var,key,sec,<cursettings>;
PS. wow, what a late reply...

Re: Tag Manager
Posted: 25 Jun 2009 19:36
by admin
Muroph wrote:admin wrote:I could write all settings into a string variable instead to a file (but identical to that file), and also read keys/values from that string without touching the disk once. Just to give you a little hope.

so we would be able to use SC getkey on an up-to-date virtual ini file?
something like:
Code: Select all
getkey $var,key,sec,<cursettings>;
PS. wow, what a late reply...


yes (sorry for the early reply)
Re: Tag Manager
Posted: 25 Jun 2009 21:17
by Muroph
admin wrote: 
yes (sorry for the early reply)
great!
that should be enough to get most relevant settings.
would panes setting be available as well?
now if only we could change key values in xy memory on-the-fly...
how does xy store settings in the memory?
if they are simple variables named like their respective keys then it shouldn't be so hard to do it.
however, adding a test to check if the new value is valid for every setting
does sound hard.
of course, this is only an non-programmer's POV.

Re: Tag Manager
Posted: 25 Jun 2009 21:23
by admin
Muroph wrote:admin wrote: 
yes (sorry for the early reply)
great!
that should be enough to get most relevant settings.
would panes setting be available as well?
now if only we could change key values in xy memory on-the-fly...
how does xy store settings in the memory?
if they are simple variables named like their respective keys then it shouldn't be so hard to do it.
however, adding a test to check if the new value is valid for every setting
does sound hard.
of course, this is only an non-programmer's POV.

I said "I
could write..." so this is not really planned.
And your POV was right:
forget about setting values this way without a restart of the app! No way.
Re: Tag Manager
Posted: 25 Jun 2009 22:34
by Muroph
admin wrote:I said "I could write..." so this is not really planned.
And your POV was right: forget about setting values this way without a restart of the app! No way.
i knew you would say that!
i was just imagining it, since it was an interesting idea.
i don't really mind writing to disk and restarting.
it doesn't take more than a couple seconds, anyway.
Re: Tag Manager
Posted: 27 Jun 2009 20:41
by Muroph
new version.
this is only my second time using html, and first using javascript, so please be gentle.
the color picker i used is from
http://www.free-color-picker.com.
the move function was taken from some random forum and modified to better fit the script.
everything else was done by me.
not very elegantly done, BTW.
there are quite a few changes i want to make in the html code, but it seems to do the job pretty well.
i tested many times, and fixed all the bugs i could find, but who knows... (maybe i should get myself a html editor

)
the script backups your tag.dat it automatically, so if anything goes wrong you can undo it.
P.S.: i seriously hope whoever decided javascript should be case-sensitive will die a slow, gruesome and
very painful death.
now if you'll excuse me, i have to go amputate my left pinky.

Re: Tag Manager
Posted: 27 Jun 2009 22:02
by admin
Muroph wrote:P.S.: i seriously hope whoever decided javascript should be case-sensitive will die a slow, gruesome and
very painful death.
now if you'll excuse me, i have to go amputate my left pinky.

Hey, I just loaded that script, added a new tag, colored it, and saved, and...
it worked! 
Could you next time please write
Undo as a script, so that I don't have to do it.
Re: Tag Manager
Posted: 28 Jun 2009 03:35
by serendipity
Muroph wrote:new version.
Hey Muroph, this is very nice indeed .
