Life In 19x19 http://www.lifein19x19.com/ |
|
smart way to batch make a lot of sgf files anonymous? http://www.lifein19x19.com/viewtopic.php?f=10&t=13614 |
Page 1 of 1 |
Author: | eyecatcher [ Wed Sep 21, 2016 11:36 pm ] |
Post subject: | smart way to batch make a lot of sgf files anonymous? |
I love to replay pro-games, and to read personal stories about pro players... some pro players i like more than others, for example my most favorite players are: Go Seigen and Seo Pong-su, maybe as well Sakata Eio. But actually i think i don`t really like them because of their style, or only based on what i read about their style, not what i really saw in their games. The story goes like this: I want to make a lot of sgf files from my (gogood / go4go) database anonymous and than replay games and rate them ... in the end, after a few weeks i want to (with the fuseki search of smartgo) look by whom the games where really played and see who`s games i really liked most ... only based on the games, not distracted by any personal emotions or Sympathie. The question is here: is here anyone who can tell me if there is a smart way, to delete the players info in sgf files automated? without opening one after the other with a texteditior or smartgo windows? |
Author: | eyecatcher [ Thu Sep 22, 2016 12:25 am ] |
Post subject: | Re: smart way to batch make a lot of sgf files anonymous? |
Ohh, actually there is a quite ok way to do it in smartgo windows (not mac) without any other software... i did not knew that you can edit more player info than only one... normally i use the mac version, so i forgot how powerful the windows version is. |
Author: | macelee [ Thu Sep 22, 2016 1:56 am ] |
Post subject: | Re: smart way to batch make a lot of sgf files anonymous? |
If you can compile 'sgfutils' on your system, you can achieve what you want by looping through your SGF files and do: ./sgfstrip -t PB -t PW xxx.sgf |
Author: | mongus [ Thu Sep 22, 2016 2:03 am ] |
Post subject: | Re: smart way to batch make a lot of sgf files anonymous? |
On a Mac or other unix you could use sed : Code: sed -i .original 's/\(P[WB]\)\[[^]]*]/\1[]/g' *.sgf
|
Author: | Mike Novack [ Thu Sep 22, 2016 5:55 am ] |
Post subject: | Re: smart way to batch make a lot of sgf files anonymous? |
The question is here: is here anyone who can tell me if there is a smart way, to delete the players info in sgf files automated? without opening one after the other with a texteditior or smartgo windows? "Translation" of some of your answers: Instead of manually opening one at a time and editing manually one at a time you could use a BATCH PROCESS. A "script" selecting the files to be edited and feeding them to a batch editor. You might not have these tools available on your computer, but as they point out, any 'nix OS would with its "shell language" and the standard utility library. Obviously some learning involved if you have never done this sort of thing before. So the answer to your question (literal answer) is yes, there is such a way, but whether that is useful to you would depend on getting a 'nix OS installed and learning how to use the shell language and utilities. Of course also possible without the 'nix tools if you have ANY programming language available on your computer and know how to code in it. But that is even more learning/work. PS: Obviously also true -- some of us here might simply give you the necessary script and utility control which you could then just run. As pointed out, besides the more obvious 'nix OS's, the Macs are actually running a 'nix under the hood (I think a form of BSD) which you could access at the command line << though I know of few Mac users who ever use the command line >> |
Author: | Uberdude [ Thu Sep 22, 2016 6:16 am ] |
Post subject: | Re: smart way to batch make a lot of sgf files anonymous? |
mongus wrote: On a Mac or other unix you could use sed : Code: sed -i .original 's/\(P[WB]\)\[[^]]*]/\1[]/g' *.sgf Fun fact of the day: sed was written Lee McMahon, whose surname is probably well known to Go players for the McMahon pairing system used in many amateur Go tournaments (though his system was originally for a club ladder and then used as a tournament system by Brits). |
Author: | eyecatcher [ Thu Sep 22, 2016 3:30 pm ] |
Post subject: | Re: smart way to batch make a lot of sgf files anonymous? |
Mike Novack wrote: Obviously some learning involved if you have never done this sort of thing before. apart from having some html basic back in high school and some very very "google and copy paste" programming for my self hosted wordpress... no, i know what you are talking about, but it is too complicated for me to get into this kind of script thing. I found a way in smartgo anyway, i thought i could not be done in smartgo, but it is working. Thank you all. |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |