Life In 19x19 http://www.lifein19x19.com/ |
|
Looking for a mass-renamer go software http://www.lifein19x19.com/viewtopic.php?f=10&t=10009 |
Page 1 of 1 |
Author: | cgbspender [ Fri Mar 14, 2014 5:25 am ] |
Post subject: | Looking for a mass-renamer go software |
Hi ! I have those sgf files, downloaded while I was wandering on go websites, and not necessarily english ones... They are sometimes named as numbers.sgf or by using acronyms LCHvsGL.sgf I wish I could rename them by using their tags to give a proper name : LeeChangHo-GuLi-Event-Date-Result.sgf for instance. I found this project on senseis : http://senseis.xmp.net/?SGFOrganizer but the project is obviously abandonned (too bad !) So do you know other freewares that would allow me to do this ? renaming them one by one is too time-consuming... especially when you have to rewrite the whole syntax again and again. Please help ! cgb |
Author: | DrStraw [ Fri Mar 14, 2014 5:30 am ] |
Post subject: | Re: Looking for a mass-renamer go software |
I don't know of any, but it seems like it would be a trivial matter to write a short program to do it for anyone with a minimal amount of programming knowledge. I'm sure I could do it in 5 minutes in VB if I knew the syntax of the file. |
Author: | cgbspender [ Fri Mar 14, 2014 5:40 am ] |
Post subject: | Re: Looking for a mass-renamer go software |
The syntax looks like this in sgf files : (;GM[1]FF[4]SZ[19]CA[UTF-8]PW[Akedo Kazumi]PB[Hamanaka Takamitsu]WR[6p]BR[4p]KM[0]RE[B+R]EV[Oteai]PC[Nihon Ki-in, Central Japan Branch]DT[1986-05-29]RO[Round1] With those tags I would like to rename the file(s) so that it becomes : PW[X]WR[6p] VS PB[Y]BR[4p] - EV[ZZZ]RO[] - DT[YYYY-MM-DD].sgf For this example, it would give this : AkedoKazumi 6P VS Hamanaka Takamitsu 4P - Oteai R1 - 19860529.sgf Best would be to able to rename all the sgf files in a directory, all at once If someone can help :p |
Author: | xed_over [ Fri Mar 14, 2014 6:23 am ] |
Post subject: | Re: Looking for a mass-renamer go software |
DrStraw wrote: I'm sure I could do it in 5 minutes in VB if I knew the syntax of the file. http://www.red-bean.com/sgf/ |
Author: | kivi [ Fri Mar 14, 2014 6:30 am ] |
Post subject: | Re: Looking for a mass-renamer go software |
Are you familiar with godrago and kombilo? They organize sgf files into a searchable database. So you don't need to care about filenames to find a game between your favorite pro's. |
Author: | DrStraw [ Fri Mar 14, 2014 7:12 am ] |
Post subject: | Re: Looking for a mass-renamer go software |
xed_over wrote: DrStraw wrote: I'm sure I could do it in 5 minutes in VB if I knew the syntax of the file. http://www.red-bean.com/sgf/ I did not say "if I could find a site which tells me what it is and which I would need to spend some time digesting and understanding." What I meants was if I knew it off the top of my head and did not need to give it any thought. I was merely trying to say it would be very easy for someone fully conversant with the forat. |
Author: | oca [ Fri Mar 14, 2014 7:22 am ] |
Post subject: | Re: Looking for a mass-renamer go software |
I have done something very similare for my self. The problem is that I did that with a script written in groovy (and groovy need java to be installed on the computer)... So two solutions here : 1) you have java on your computer and then I can send you a program and instruction to rename you files. 2) I can do the work for you, but you will then need to send me a zip file with your sgf files. |
Author: | cgbspender [ Fri Mar 14, 2014 7:43 am ] |
Post subject: | Re: Looking for a mass-renamer go software |
I do use Kombilo, which doesn't allow mass-renaming of the files. You are right to say it does display the tags, but my original files names are kinda nonsense sometimes, so I'd like to rename them all. If it were just for me, I wouldn't mind using nonsensical names for those files, as I can view the tags via kombilo, but those files are meant to be sent to macelee (go4go.net) so that he can add them on the website. For convenience issues, I have to have them rewritten, so that macelee won't have to spend months renaiming them. (there is likely to be a few thousands) cgb |
Author: | lemon [ Fri Mar 14, 2014 7:57 am ] |
Post subject: | Re: Looking for a mass-renamer go software |
cgbspender wrote: I do use Kombilo, which doesn't allow mass-renaming of the files. You are right to say it does display the tags, but my original files names are kinda nonsense sometimes, so I'd like to rename them all. If it were just for me, I wouldn't mind using nonsensical names for those files, as I can view the tags via kombilo, but those files are meant to be sent to macelee (go4go.net) so that he can add them on the website. For convenience issues, I have to have them rewritten, so that macelee won't have to spend months renaiming them. (there is likely to be a few thousands) cgb I'll whip something together tomorrow. I'm currently working on some software that does sgf parsing so it would be easy enough to adapt it to your needs. |
Author: | RobertJasiek [ Fri Mar 14, 2014 8:16 am ] |
Post subject: | Re: Looking for a mass-renamer go software |
Batch renaming of file names: ReNamer http://www.den4b.com/?x=products&product=renamer Replacing strings within a file: Use some software with batch processing of Regular Expressions. Since Pascal script can be added to ReNamer, you might try to use it to create exactly what you want (extract contents of a file to create file names), but I am not sure. |
Author: | oca [ Fri Mar 14, 2014 9:20 am ] |
Post subject: | Re: Looking for a mass-renamer go software |
just for curious, a quick and dirty groovy script for renaming files |
Author: | Stefany93 [ Fri Mar 14, 2014 9:22 am ] |
Post subject: | Re: Looking for a mass-renamer go software |
I wonder whether it will be possible this to be done with Perl? Short program that is rum from the shell/CMD... |
Author: | cgbspender [ Fri Mar 14, 2014 9:50 am ] |
Post subject: | Re: Looking for a mass-renamer go software |
That sounds very helpful to my newb ears, oca... but as a newbie, my silly question will be, how to use this ? I create a text file which I rename as .go and paste all this in it ? and then run it ? just like for a .sh ? |
Author: | oca [ Fri Mar 14, 2014 10:10 am ] |
Post subject: | Re: Looking for a mass-renamer go software |
I will post the procedure next week Bon week end |
Author: | Rowen [ Sun Mar 16, 2014 2:37 pm ] |
Post subject: | Re: Looking for a mass-renamer go software |
I've used Advanced Renamer before, it works nicely. I think it might do what your wanting. Here is the URL (its free): http://www.advancedrenamer.com/ |
Author: | macelee [ Sun Mar 16, 2014 11:57 pm ] |
Post subject: | Re: Looking for a mass-renamer go software |
cgbspender wrote: I do use Kombilo, which doesn't allow mass-renaming of the files. You are right to say it does display the tags, but my original files names are kinda nonsense sometimes, so I'd like to rename them all. If it were just for me, I wouldn't mind using nonsensical names for those files, as I can view the tags via kombilo, but those files are meant to be sent to macelee (go4go.net) so that he can add them on the website. For convenience issues, I have to have them rewritten, so that macelee won't have to spend months renaiming them. (there is likely to be a few thousands) cgb cgb, thanks for this. Sorry I have a big backlog of emails so I haven't got a chance to reply your email. As someone already pointed out, it won't take a long time to write such a script to extract information from files and then rename them. I can do this fairly easily. So thanks a lot but you don't have to rename them for me. I can supply you a script if you need to have the file organised better. And when compiling old games for my database, I normally need to go through each game and manually check the game information, compare the data against literatures. So it really doesn't matter how they are named. I can do this fairly efficiently (I processed about 8000 manually last year). Thanks again for your help! |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |