Latest Updates:
Normal Topic Cannot import pgns from this forum to my software (Read 7942 times)
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1672
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Cannot import pgns from this forum to my software
Reply #2 - 07/19/19 at 13:34:11
Post Tools
Forget about my script method. Stigma just posted a far simpler solution:

Stigma wrote on 07/19/19 at 10:46:54:
Michael Ayton wrote on 07/19/19 at 10:01:31:
One problem: none of your pgn downloads (e.g. in 41, 45, 98, 99, 109) works from my PC. Is that just me, or is the 'workaround' yet to be discovered?


I've had problems with pgn downloads here for a long time now. Seems to be a sitewide issue.

My workaround is to press "Quote" on the post containing the pgn, then copying and pasting the pgn string from there.

  
Back to top
 
IP Logged
 
an ordinary chessplayer
God Member
*****
Offline


I used to be not bad.

Posts: 1672
Location: Columbus, OH (USA)
Joined: 01/02/15
Re: Cannot import pgns from this forum to my software
Reply #1 - 03/21/18 at 22:52:18
Post Tools
Yes, well you will need to convert the html-escaped characters back to valid PGN characters. For example, %20 would be replaced by a space. Just use copy/replace in a text editor. An ascii chart will help you. https://ascii.cl/

After doing it that way a few times, I decided to let the computer do the work, so I wrote a script. The attached script will do the job, provided you have an awk interpreter handy. I suppose a perl interpreter might also work. Depending on the source data, my script might leave some characters still escaped. In that case, you can add more definitions to the array in the BEGIN block.

Edited:
I forgot to mention a detail. The script is expecting the pgndata to be on a single line, and starting with a single-quote character. This is the "inner html" as it appears on brabo's English blog. The chesspub pgndata is a little different, but if you add the single-quote at the beginning of the line, the script works fine.
« Last Edit: 03/22/18 at 01:05:15 by an ordinary chessplayer »  

pgndata2pgn_awk.txt ( 3 KB | 210 Downloads )
Back to top
 
IP Logged
 
VGA
Junior Member
**
Offline


I Love ChessPublishing!

Posts: 97
Joined: 08/13/17
Cannot import pgns from this forum to my software
03/21/18 at 16:18:29
Post Tools
I see the pgns posted, I press the download link but the problem is that the text my browser receives has these html characters, like %A2970 etc

So I can't import them into ScidVsPC or Lucas Chess.
  
Back to top
 
IP Logged
 
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo