It is currently Sat May 03, 2025 5:30 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 17 posts ] 
Author Message
Offline
 Post subject: Sgf downloads in eidogo broken.
Post #1 Posted: Thu Apr 29, 2010 2:04 pm 
Lives in gote
User avatar

Posts: 429
Location: Sweden
Liked others: 101
Was liked: 73
Rank: SDK
KGS: CarlJung
See Bills review here:
http://lifein19x19.com/forum/viewtopic.php?p=3134#p3134

I click "Download SGF" but the resulting file is not the correct sgf. It ends prematurely. The eidogo player on the page has the comment "End of comment" at move 143. That comment is not in the downloaded file. Please help me enjoy Bills awesomeness in a downloaded sgf.

_________________
FusekiLibrary, an opening library.
SGF converter tools: Wbaduk NGF to SGF | 440 go problems | Fuseki made easy | Tesuji made easy | Elementary training & Dan level testing | Dan Tutor Shortcut To Dan

Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #2 Posted: Thu Apr 29, 2010 2:21 pm 
Dies with sente
User avatar

Posts: 106
Location: Germany
Liked others: 64
Was liked: 7
Rank: EGF 8k
Universal go server handle: ChradH
The sgf ends prematurely after "die big " in comment for move #87.

Code:
better to live small than die big <img src="./images/smilies/icon_e_smile.gif" alt=":-)" title="Smile">

Nope. It is better to live big. See variation.

Must be the img tag.

_________________
To sig or not to sig, that is the question.

Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #3 Posted: Thu Apr 29, 2010 2:26 pm 
Lives in gote
User avatar

Posts: 429
Location: Sweden
Liked others: 101
Was liked: 73
Rank: SDK
KGS: CarlJung
Yes, looks like it. See move 87. Smileys should not be converted to images inside sgf tags. Admins, pls help.

_________________
FusekiLibrary, an opening library.
SGF converter tools: Wbaduk NGF to SGF | 440 go problems | Fuseki made easy | Tesuji made easy | Elementary training & Dan level testing | Dan Tutor Shortcut To Dan

Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #4 Posted: Thu Apr 29, 2010 2:41 pm 
Dies with sente
User avatar

Posts: 106
Location: Germany
Liked others: 64
Was liked: 7
Rank: EGF 8k
Universal go server handle: ChradH
Test: My attempt at salvaging the sgf (downloadable with one minor glitch, see below)



My analysis so far: the first sgf posted contained a smiley
Code:
:-)
at move 87. Upon downloading, it gets expanded into HTML with some angle brackets. When this gets posted again, it is not downloadable.

Another issue: The plus sign in the sgf result tag
Code:
[W+43.5]
gets converted into a space (url encoding?), resulting in a warning when opening the file in cgoban3.

_________________
To sig or not to sig, that is the question.


Last edited by ChradH on Thu Apr 29, 2010 2:54 pm, edited 1 time in total.
Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #5 Posted: Thu Apr 29, 2010 2:46 pm 
Lives in gote
User avatar

Posts: 429
Location: Sweden
Liked others: 101
Was liked: 73
Rank: SDK
KGS: CarlJung
You're awesome. How did you do that? Do you have admin powers?

_________________
FusekiLibrary, an opening library.
SGF converter tools: Wbaduk NGF to SGF | 440 go problems | Fuseki made easy | Tesuji made easy | Elementary training & Dan level testing | Dan Tutor Shortcut To Dan

Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #6 Posted: Thu Apr 29, 2010 2:59 pm 
Dies with sente
User avatar

Posts: 106
Location: Germany
Liked others: 64
Was liked: 7
Rank: EGF 8k
Universal go server handle: ChradH
No special powers here :-)
Copied it from the page's source code, then did some search-and-replace of HTML artefacts like <BR/>, &#40; and so on.

_________________
To sig or not to sig, that is the question.

Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #7 Posted: Thu Apr 29, 2010 4:57 pm 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
Looks like two bugs. One is URL encoding as ChradH suggested. That's pretty easy to fix. The other is harder. BBcodes can't be told not to mangle their contents, so the best I can do is unmangle them. I have to strip out extra <br> tags for instance. Looks like I'll have to do some others as well.

I'll add them to my todo list (probably won't be able to take care of them until the weekend).

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku

Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #8 Posted: Thu Apr 29, 2010 8:50 pm 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
OK, partial fix in place. One problem is that the download thingy passes the SGF data to the server as a GET parameter in a URL, and there is a length limit. SGF files usually come in under it, but not always. So there is a size limit on SGF files that are embedded inline as text. I plan to work around that by POSTing the data to the server, but that's going to require more work.

There are a lot less problems when you embed them by URL (no weird encoding things, no weird download hack, etc.), but I know not everybody has web space to upload SGF files to. But I just made a small change that lets you embed SGF files that are attached to your post, which should be way more convenient than loading it up in a text editor and copying and pasting the code.
Code:
[sgf-full]http://lifein19x19.com/forum/download/file.php?id=35[/sgf-full]

[sgf-full]http://lifein19x19.com/forum/download/file.php?id=35[/sgf-full]


Attachments:
muchen1999-TheCaptain.sgf [13.66 KiB]
Downloaded 744 times

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku
Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #9 Posted: Thu Apr 29, 2010 11:20 pm 
Lives in gote
User avatar

Posts: 429
Location: Sweden
Liked others: 101
Was liked: 73
Rank: SDK
KGS: CarlJung
fwiffo wrote:
OK, partial fix in place. One problem is that the download thingy passes the SGF data to the server as a GET parameter in a URL, and there is a length limit. SGF files usually come in under it, but not always. So there is a size limit on SGF files that are embedded inline as text. I plan to work around that by POSTing the data to the server, but that's going to require more work.

There are a lot less problems when you embed them by URL (no weird encoding things, no weird download hack, etc.), but I know not everybody has web space to upload SGF files to. But I just made a small change that lets you embed SGF files that are attached to your post, which should be way more convenient than loading it up in a text editor and copying and pasting the code.[code]


Thanks a lot. As you say, long sgfs will lead to problems in the future. But one can't solve all problems at the same time :)

_________________
FusekiLibrary, an opening library.
SGF converter tools: Wbaduk NGF to SGF | 440 go problems | Fuseki made easy | Tesuji made easy | Elementary training & Dan level testing | Dan Tutor Shortcut To Dan

Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #10 Posted: Fri Apr 30, 2010 1:14 am 
Gosei
User avatar

Posts: 1449
Liked others: 1562
Was liked: 140
Rank: KGS 6k
GD Posts: 892
Doesn't work for me, I get "There was a problem retrieving the game data."

_________________
a1h1 [1d]: You just need to curse the gods and defend.
Good Go = Shape.
Associação Portuguesa de Go

Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #11 Posted: Fri Apr 30, 2010 1:34 am 
Dies with sente
User avatar

Posts: 106
Location: Germany
Liked others: 64
Was liked: 7
Rank: EGF 8k
Universal go server handle: ChradH
Attached sgf works fine here (Firefox 3.6.3).

@fwiffo: How do you create these posts? Save once with attached sgf file to know the url, then edit post to add sgf tags?
It would be super-convenient if you could post in one go by writing something like
Code:
[sgf-full]ATTACHED-SGF[/sgf-full] (limited to one sgf per post)

or even more comfortable, identifying sgf by file name, thus allowing multiple sgfs:
Code:
[sgf-full]attachment:filename.sgf[/sgf-full] (probably difficult to implement)

[edit]These declarations within the sgf tags should be replaced by the actual attachment url on posting

_________________
To sig or not to sig, that is the question.

Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #12 Posted: Fri Apr 30, 2010 5:32 am 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
@Phelan: For the one I just posted? What browser are you using? Are you logged in to http://www.lifein19x19.com or the URL without the www.?

@ChradH: I add the file then click "preview" - the attachment will show up in the preview area. I copy the URL from there and then put it inside the SGF tags. I know that's not convenient, but the change to make that much possible was a pretty quick fix that I was able to do last night. I have exactly the sort of thing you have in mind, but it'll take more development. Actually, what I'd like to do is be able to use the "place inline" button with SGF files the way you would for images.

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku

Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #13 Posted: Fri Apr 30, 2010 6:02 am 
Gosei
User avatar

Posts: 1449
Liked others: 1562
Was liked: 140
Rank: KGS 6k
GD Posts: 892
fwiffo wrote:
@Phelan: For the one I just posted? What browser are you using? Are you logged in to http://www.lifein19x19.com or the URL without the www.?


Yep, for the one you just posted. Others seem to work fine. I have Firefox 3.6.3, on Windows XP, and Am logged in with the www.

_________________
a1h1 [1d]: You just need to curse the gods and defend.
Good Go = Shape.
Associação Portuguesa de Go

Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #14 Posted: Fri Apr 30, 2010 6:54 am 
Dies with sente
User avatar

Posts: 106
Location: Germany
Liked others: 64
Was liked: 7
Rank: EGF 8k
Universal go server handle: ChradH
fwiffo wrote:
@ChradH: I add the file then click "preview" - the attachment will show up in the preview area. I copy the URL from there and then put it inside the SGF tags. I know that's not convenient, but the change to make that much possible was a pretty quick fix that I was able to do last night. I have exactly the sort of thing you have in mind, but it'll take more development. Actually, what I'd like to do is be able to use the "place inline" button with SGF files the way you would for images.

Ah, preview uploads the files already. Nice trick. That's better than having to edit the post every time.
By the way, I absolutely like the attachment idea and am amazed how quick you found this solution which works really well. Big thumbs up!

_________________
To sig or not to sig, that is the question.

Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #15 Posted: Fri Apr 30, 2010 7:18 am 
Gosei

Posts: 1596
Liked others: 891
Was liked: 533
Rank: AGA 2k Fox 3d
GD Posts: 61
KGS: dfan
Phelan wrote:
fwiffo wrote:
@Phelan: For the one I just posted? What browser are you using? Are you logged in to http://www.lifein19x19.com or the URL without the www.?

Yep, for the one you just posted. Others seem to work fine. I have Firefox 3.6.3, on Windows XP, and Am logged in with the www.

The same goes for me (both the problem and the context).

Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #16 Posted: Fri Apr 30, 2010 7:57 am 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
A URL! A URL! My kingdom for a canonical URL!

Should be good now.

One potential problem is that I don't think guests can download attachments. I don't know if this is something we should care about though.

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku


This post by fwiffo was liked by: Phelan
Top
 Profile  
 
Offline
 Post subject: Re: Sgf downloads in eidogo broken.
Post #17 Posted: Fri Apr 30, 2010 8:22 am 
Gosei
User avatar

Posts: 1449
Liked others: 1562
Was liked: 140
Rank: KGS 6k
GD Posts: 892
Works now. :)

I don't think guests can download attachments on any forum that I know of.

_________________
a1h1 [1d]: You just need to curse the gods and defend.
Good Go = Shape.
Associação Portuguesa de Go


This post by Phelan was liked by: fwiffo
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group