browner87
Newbie
Offline
Posts: 3
|
 |
« on: February 13, 2009, 04:31:02 pm » |
|
I found myself looking at a very unpleasant task the other day - manually importing 131 custom emotes from MSN. I read around on the Internet and only found some spanish website that expected me to give them a copy of everything in a zip file and who knows what it would do then, so I started reading about doing it manually. Simple enough stuff, rename the MCOs to CABs, extract them all to seperate folders, then just rename the PNG and GIF files to the names you want and put a bit of simple XML in a config file. YOU try doing that for 131 emoticons by hand! So me, being a programmer, started looking for a way to automate such a redundant process. I found some simple scripting ideas online, and made up a few simple CSH scripts to do all this work for me  My Question here is: if I were to compile all my separate bits and pieces that I used to do all this into one simple CSH script that anyone can run on Linux, would people be interested? The ONLY thing that I haven't managed to automate is the extracting which I used WinRAR for, but I expect I could find some way to extract them from CSH without too much effort. The only thing that I don't imagine would be easy would be the obtaining of the MCO files. But I found MSN Backup worked great (although it IS a Windows program. I'm not sure if there are any good linux ones). So, would this be worth a bit of my time to do?
|
|
|
|
|
Logged
|
|
|
|
|
kakaroto
|
 |
« Reply #1 on: February 13, 2009, 08:01:21 pm » |
|
Hi, This sucks that you had to do all this manually... actually, if you search the forums, you'll find a couple of scripts that actually do this for you already. First, having a Tcl script.. more specifically, having an aMSN plugin would be a much better solution, it would make things much easier for everyone (you would just need to call amsn's internal function and the emoticon would be added automatically), there would be no need for 'you have to close amsn first' or for the 'here are the config keys, now paste that xml into your config.xml file', etc... and more importantly, having it as an amsn plugin would make everyone happy not just linux users... there are some windows and mac users who want to batch add their smileys too... but every script there is for bash only... About the .mco, you could have used 'cabextract' to extract the files.. you can look at how the winks plugin does to detect cabextract and use it, etc... for windows, there's a native alternative, which is extrac32.exe Hope that helps! 
|
|
|
|
|
Logged
|
KaKaRoTo
|
|
|
browner87
Newbie
Offline
Posts: 3
|
 |
« Reply #2 on: February 13, 2009, 08:26:51 pm » |
|
So, there are other scripts written? Has anyone written it as a plugin though? If not, what language or scripting are aMSN plugins written in? I know VB, C, C++, PHP, and some random different scripting languages.
OK - they're written in TCL, I can deal with that guess, but to make sure I'm not missing something and doing this for nothing, is there already a plugin for this?
|
|
|
|
|
Logged
|
|
|
|
|
|
|
kakaroto
|
 |
« Reply #4 on: February 17, 2009, 03:07:27 am » |
|
Maybe consider this : http://www.amsn-project.net/forums/viewtopic.php?t=6319If there are some 'emoticon packs' available, maybe having the plugin use the same format would be beneficial for everyone! btw, how's the plugin development going? EDIT: by the way, I just wrote the skeleton for the plugin!! Here's the code : http://amsn.svn.sourceforge.net/viewvc/amsn/trunk/amsn-extras/plugins/emoticons_importer/Basically, all that's needed now is to add the UI in the populareframe function to actually let the user browse a directory and have it autoload the files from there... I might do that later tonight if I feel bored! EDIT2 path updated, I renamed the plugin and also added a "importSmileys" function that will batch import them all either by using the kopete compatible emoticon pack, or by searching for files in the directory.. it still needs work, like in case an error happens, tell the user and let him fix it somehow, etc... and yes, there is still no UI for it. The only way to test now is to load the plugin, open amsn's console (ctrl-shift-C) and type : ::emoticons_importer::importSmileys /path/to/some/directory EDIT3: I was more bored than expected.. and now the plugin is usable by mere mortals... there's a small UI to choose a path and allow you to import smileys from it, there's no feedback (unless you look at the plugins log), but in theory you click 'import smileys' and after a little while your smileys are added.
|
|
|
|
|
Logged
|
KaKaRoTo
|
|
|
browner87
Newbie
Offline
Posts: 3
|
 |
« Reply #5 on: March 13, 2009, 07:10:21 pm » |
|
Well, I'll get to it then. I didn't see responses for a little bit, so I passed on it, but I'll look at your skeleton code and get started on it as soon as I can find time. If only I was still in high school and getting March break next week... 
|
|
|
|
|
Logged
|
|
|
|
|
kakaroto
|
 |
« Reply #6 on: March 13, 2009, 07:31:44 pm » |
|
hehe, i know the 'if i was still in high school' feeling!  Anyways, yes you can use my current code, it's not really a 'skeleton' code anymore, but it still has room for improvement! Thanks 
|
|
|
|
|
Logged
|
KaKaRoTo
|
|
|
Smart
Newbie
Offline
Posts: 5
|
 |
« Reply #7 on: March 18, 2009, 08:43:20 pm » |
|
I have installed amsn-plugins-svn but I don't see in aMSN
Account / Select Plugins
emoticons-updater
but it is in /usr
ls -l /usr/share/amsn/plugins | grep emoticons drwxr-xr-x 3 root root 4096 2009-03-18 11:10 emoticons_importer
Use Gentoo
|
|
|
|
|
Logged
|
|
|
|
|
kakaroto
|
 |
« Reply #8 on: March 19, 2009, 09:45:51 pm » |
|
It shouldn't be in /usr/share/amsn/plugins... anyways, make sure you download the amsn-extras/plugins repository correctly and install the plugins in ~/.amsn/plugins It should work.
|
|
|
|
|
Logged
|
KaKaRoTo
|
|
|
Smart
Newbie
Offline
Posts: 5
|
 |
« Reply #9 on: March 20, 2009, 02:07:23 am » |
|
I have all Plugins in /usr and all works only emoticons_importer isn't in "Select Plugins"
I have all copied to ~/.amsn/plugins
Restarted aMSN but the same, emoticons_importer is'not in Select Plugin. :oops:
I have install now the newest SVN Repository.
ls -l /usr/share/amsn/plugins total 184 drwxr-xr-x 4 root root 4096 2009-03-20 02:22 actionsmenu drwxr-xr-x 4 root root 4096 2009-03-20 02:22 address_book drwxr-xr-x 2 root root 4096 2009-03-20 02:22 advancedconfigviewer drwxr-xr-x 4 root root 4096 2009-03-20 02:22 amsnplus drwxr-xr-x 3 root root 4096 2009-03-20 02:22 bugbuddy drwxr-xr-x 2 root root 4096 2009-03-20 02:22 camserv drwxr-xr-x 3 root root 4096 2009-03-20 02:22 chameleon drwxr-xr-x 2 root root 4096 2009-03-20 02:22 changeit drwxr-xr-x 3 root root 4096 2009-03-20 02:21 ColoredNicks drwxr-xr-x 3 root root 4096 2009-03-20 02:22 colorize drwxr-xr-x 3 root root 4096 2009-03-20 02:22 countdown drwxr-xr-x 2 root root 4096 2009-03-20 02:22 dbusviewer drwxr-xr-x 2 root root 4096 2009-03-20 02:22 desktop_integration drwxr-xr-x 2 root root 4096 2009-03-20 02:22 devel drwxr-xr-x 2 root root 4096 2009-03-20 02:22 DualDisplayPicture drwxr-xr-x 2 root root 4096 2009-03-20 02:22 emotes drwxr-xr-x 3 root root 4096 2009-03-20 02:22 emoticons_importer drwxr-xr-x 4 root root 4096 2009-03-20 02:22 FPSstats drwxr-xr-x 4 root root 4096 2009-03-20 02:22 games drwxr-xr-x 2 root root 4096 2009-03-20 02:22 gename drwxr-xr-x 3 root root 4096 2009-03-20 02:22 glogs drwxr-xr-x 4 root root 4096 2009-03-20 02:22 gnotify drwxr-xr-x 4 root root 4096 2009-03-20 02:22 growl drwxr-xr-x 4 root root 4096 2009-03-20 02:21 inkdraw drwxr-xr-x 2 root root 4096 2009-03-20 02:22 keepalive drwxr-xr-x 4 root root 4096 2009-03-20 02:22 LilyPondIM drwxr-xr-x 2 root root 4096 2009-03-20 02:22 movewin drwxr-xr-x 4 root root 4096 2009-03-20 02:21 MSNGameTTT drwxr-xr-x 5 root root 4096 2009-03-20 02:22 music drwxr-xr-x 2 root root 4096 2009-03-20 02:21 Notes drwxr-xr-x 2 root root 4096 2009-03-20 02:22 notify drwxr-xr-x 3 root root 4096 2009-03-20 02:21 Nudge drwxr-xr-x 2 root root 4096 2009-03-20 02:22 organize_received drwxr-xr-x 3 root root 4096 2009-03-20 02:22 pop3 drwxr-xr-x 3 root root 4096 2009-03-20 02:21 remind drwxr-xr-x 2 root root 4096 2009-03-20 02:21 Restore drwxr-xr-x 2 root root 4096 2009-03-20 02:22 sayit drwxr-xr-x 4 root root 4096 2009-03-20 02:21 SearchContact drwxr-xr-x 3 root root 4096 2009-03-20 02:22 SkinColor drwxr-xr-x 4 root root 4096 2009-03-20 02:22 SpellCheck drwxr-xr-x 4 root root 4096 2009-03-20 02:22 TeXIM drwxr-xr-x 3 root root 4096 2009-03-20 02:22 transparent drwxr-xr-x 2 root root 4096 2009-03-20 02:22 userstatus drwxr-xr-x 3 root root 4096 2009-03-20 02:21 WebcamShooter drwxr-xr-x 2 root root 4096 2009-03-20 02:22 whatis drwxr-xr-x 4 root root 4096 2009-03-20 02:21 winks
svn update At revision 11102.
ls -l /usr/portage/distfiles/svn-src/amsn-plugins/plugins/emoticons_importer total 16 -rw-rw-r-- 1 paludisbuild paludisbuild 8149 2009-03-15 11:24 emoticons_importer.tcl drwxrwsr-x 3 paludisbuild paludisbuild 4096 2009-03-15 11:24 lang -rw-rw-r-- 1 paludisbuild paludisbuild 1453 2009-03-15 11:24 plugininfo.xml
I think is something with Plugin Name in files perhaps?
Regards,
|
|
|
|
|
Logged
|
|
|
|
|
kakaroto
|
 |
« Reply #10 on: March 20, 2009, 08:53:14 am » |
|
humm.. I don't know why it wouldn't work.. the directory name doesn't really matter, the plugin will appear as "Emoticons importer" or something like that (the real name is set in plugininfo.xml). make sure permissions are correct and you can read the files correctly.
|
|
|
|
|
Logged
|
KaKaRoTo
|
|
|
redeath
Newbie
Offline
Posts: 1
|
 |
« Reply #11 on: March 24, 2009, 04:42:40 am » |
|
Hi actually the xml is written incorrectly that why it is not showing up. One of the </lang> is missing. 
|
|
|
|
|
Logged
|
|
|
|
|
BaaaZen
|
 |
« Reply #12 on: March 24, 2009, 11:02:50 am » |
|
Thanks, it's fixed.
|
|
|
|
|
Logged
|
There are only 10 types of people in the world: Those who understand binary, and those who don't.
|
|
|
|
kakaroto
|
 |
« Reply #13 on: March 24, 2009, 05:02:59 pm » |
|
ouh, nice catch! I wonder why i could see it.. oh, maybe someone committed that <lang> thing after I wrote the plugin! Thanks for finding the cause! And welcome to the forums by the way (very nice first post!  )
|
|
|
|
|
Logged
|
KaKaRoTo
|
|
|
|