Дима Рубинштейн ([info]dimrub) wrote in [info]lj_nifty,
@ 2007-12-18 12:54:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
merge_tags.exe
Due to a popular demand, I produced an executable version of the script that merges tags. It can be downloaded from here. While at that, I've made some minor changes, hopefully it works better now.

P.S. If, for some reason, you want to remove a tag from all the posts it appears on, without actually deleting it (for example, if you want to create new tags without going under the 1000 tags limit, by recycling the old ones), put it alone on a line, preceded by a coma.


(17 comments) - (Post a new comment)


[info]happinessiseasy
2007-12-18 07:24 pm UTC (link)
Thanks, man. It's been working wonderfully so far, except for one time it bombed on the tag deutsche küche (a german restaurant). It must've been the "ü" character.

(Reply to this) (Thread)


[info]dimrub
2007-12-18 07:26 pm UTC (link)
Yes, I suspected I have a problem with accented characters. Unfortunately, I got rid of them before I've written the script, thus had no chance to encounter this problem.

(Reply to this) (Parent)(Thread)


[info]happinessiseasy
2007-12-18 07:29 pm UTC (link)
So is this new version different than v0.2?

(Reply to this) (Parent)(Thread)


[info]dimrub
2007-12-18 07:33 pm UTC (link)
Yes, I added handling of the case where a tag defined in the tags file does not exist. The script now just skips over and continues, instead of terminating.

(Reply to this) (Parent)(Thread)


[info]happinessiseasy
2007-12-18 07:39 pm UTC (link)
Great! Another nice feature would be if you try to merge tags into a new tag that doesn't exist, either print an error, or rename one of the old tags into the new one, because it can't create the new one if you're over 1000.

(Reply to this) (Parent)(Thread)


[info]dimrub
2007-12-18 07:48 pm UTC (link)
Maybe I will indeed. So far I only merged into one of the existing tags, so this was not required.

(Reply to this) (Parent)


[info]tango
2007-12-19 12:12 am UTC (link)
Thank you. I've now emailed myself a link to the entry so I can download this when I get home.

(Reply to this)


[info]qem_chibati
2007-12-19 02:30 am UTC (link)
This is awesome, thank you!

(Reply to this)


[info]icrush
2008-01-04 12:14 am UTC (link)
I thought that's great, but how do I use it? I downloaded it and then I clicked at merge_tags.exe but nothing happened. there is a tutorial or something?

(Reply to this) (Thread)


[info]dimrub
2008-01-04 12:21 am UTC (link)
http://community.livejournal.com/lj_nifty/155984.html?thread=4850256#t4850256

(Reply to this) (Parent)(Thread)


[info]icrush
2008-01-04 12:24 am UTC (link)
I saw that comment, but that works to executable too? so that means I have to download this too?

(Reply to this) (Parent)(Thread)


[info]dimrub
2008-01-04 12:25 am UTC (link)
Yes, it works pretty much in the same way for the executable, as it is for the original version. And no, you only need the executable.

(Reply to this) (Parent)(Thread)


[info]icrush
2008-01-04 12:28 am UTC (link)
thank you :)

(Reply to this) (Parent)


[info]defconn1
2008-06-09 05:00 am UTC (link)
Thanks for the tool. I hope it works for me. ^^;

(Reply to this)

Okay
[info]caitaro
2008-09-01 03:07 am UTC (link)
I'm pretty much a computer nerd, but I honestly have no idea how to run this. o_O I haven't messed around with scripts hardly at all, but this is just.. not looking right.


I downloaded it, extracted it, and I got this.

D:\merge_tags\
=============
_hashlib.pyd
_socket.pyd
_ssl.pyd
bz2.pyd
library.zip
merge_tags.exe
MSVCR71.dll
python25.dll
tags.txt
unicodedata.pyd
w9xpopen.exe


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Total 0 folder(s); 11 file(s)

Total files size: 5 MB; 5112 KB; 5234973 Bytes


If i try to run merge_tags.exe, it flashes something in a DOS screen then immedietly shuts off.

Finally got it screenshotted and it says something like..

Usage: merge_tags.exe [options]

Options:
--h, --help show this help message and exit
-u USER, --user=USER Username to log in as
etc.

If i try to run w9xpopen.exe, it says this program was not designed for standalone use.


I dont see any instructions at all, so I'm pretty lost.

If someone could, you know, walk me through how to use this or write a readme or something, that would be awesome.

Contact info in my journal :3

Thanks so much! :D

~Cait

(Reply to this) (Thread)

Re: Okay
[info]dimrub
2008-09-01 02:44 pm UTC (link)
1. Open up a console window (Win-R, cmd, Enter)
2. CD to the directory, that the script was extracted into.
3. Run it (merge_tags.exe) with no arguments
4. Now that you have the instructions on screen, run it again with the various options specified.

(Reply to this) (Parent)(Thread)

Re: Okay
[info]caitaro
2008-09-06 03:40 pm UTC (link)
Okkkay I finally got it working.. ><

Im gunna write "Idiots guide to this program"


1. Extract the zip to someplace easy to get to. (C:/merge_tags for example)

2. To actually change the tags, you must go to tags.txt and type out the tags you want replaced with what. (you must put it in the format of TAG_YOU_WANT_TO_STAY,Tag_you_want_merged. So I'd put video games,xbox,ps2,gc,DS. This would merge all the system tags into just video games tag) Save it.


3. Open a command prompt. [Start]->Run->cmd

4. Navigate to the folder.. type "cd .." until you get to the "C:/" then type "cd merge_tags" if your files are in C:/merge_tags

5. Now type "merge_tags.exe -u USERNAME -p PASSWORD -f tags.txt" (without the quotes, and of course replace username with your username, etc.) and hit enter. If you did it right it will process the tags and you will see URLs from your journal being processed!

Notes:
-If you put your username and password in wrong, it will NOT tell you, so if it gives you a message such as "0 URLS found" you did something wrong. Try making your username lowercase.
-This process takes quite awhile.. took me ~5 minutes for 41 tags (on dialup) So do a rest run to make sure everything works before making a huge amount of tag merges.

(Reply to this) (Parent)


(17 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…