pgn4web project

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

aceplayer
Posts: 4
Joined: Fri Jun 29, 2018 11:59 pm
Full name: John Johnson

pgn4web project

Post by aceplayer »

With the intent of improving pgn4web a new "download in PGN format" feature will be added to it.

As it is right now, pgn4web only offers what is, in my opinion, a rather awkward HTML pop up window, where you have to highlight, copy, and then, finally, paste the PGN data somewhere. I've experienced annoying problems when I'm trying to download a large file because, for starters, not even the highlighting wants to work - let alone the copying, and pasting into a text editor, which might also have trouble handling all of the text.

With this regular PGN format download all of the above unnecessary steps will be avoided. And what you will obtain is a normal PGN file download experience.

I'm a programmer myself, but I don't specialize in web programming. Would any of you be willing to participate in this fun project to improve pgn4web? This function has to work in all of the major browsers and platforms. It has to be written in native JavaScript code, it should be able to handle big and small PGN files Of course, you've got to have web programming experience in JavaScript.

PM me if you're interested and I'll get back to you with further details.

Thanks,

Ivan
aceplayer
Posts: 4
Joined: Fri Jun 29, 2018 11:59 pm
Full name: John Johnson

Re: pgn4web project

Post by aceplayer »

OK. Don't you all raise your hands at the same time! I only need one volunteer. :-)

Seriously, if you are not interested in this kind of project, could you direct me to a place where I would be likely to find a volunteer to write this PGN download function? Or, do any of you people know of someone who might be able to do this kind of thing (in JS)?

Please reply. I'd really appreciate it.

Ivan
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: pgn4web project

Post by hgm »

Well, I am not really interested in pgn4web, because it cannot do Xiangqi, Shogi, Gothic Chess etc...

But if I understood you correctly, what you want is rather straightforward: You want to add a button that pops up the browser's Download Dialog (the one where you have to tick 'open with' or 'save'), and then puts the data pgn4web was acting on there.

I have never done that, but when I googled for how to open the download dialog from JavaScript I got a lot of hits describing how to do it. It seems to me that you just have to copy one of these examples, and paste it into pgn4web (changing the name of the data to save accordingly).
Sesse
Posts: 300
Joined: Mon Apr 30, 2018 11:51 pm

Re: pgn4web project

Post by Sesse »

aceplayer wrote: Thu Jul 26, 2018 8:23 pmSeriously, if you are not interested in this kind of project, could you direct me to a place where I would be likely to find a volunteer to write this PGN download function? Or, do any of you people know of someone who might be able to do this kind of thing (in JS)?
If you're a programmer, you're likely to be able to pick up JavaScript fairly easily. That's going to be a lot easier than looking for someone to implement a pet feature for you. :-)
aceplayer
Posts: 4
Joined: Fri Jun 29, 2018 11:59 pm
Full name: John Johnson

Re: pgn4web project

Post by aceplayer »

Yes, I could. However, I was hoping I would find a seasoned web programmer here (chess or otherwise) who could write this function for us, especially since it's not so difficult and time consuming. Plus, I think it would be nice if the function that's put together is secure, that is, not easily hackable, and with error handlers and all.

Edit: There is, also, the issue that it has work in all major browsers. Better to assign an experienced JS programmer to this. If there aren't any here, I'll look somewhere else.
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: pgn4web project

Post by hgm »

Well, I am not an experienced JavaScript programmer anyway. But that usually doesn't stop me from getting things done without having others do them for me. E.g. the 'interactive diagrams' work pretty nice:

theme=MV firstRank=1 symmetry=mirror
Pawn::::a2-h2
Mortar::AG:Canon:f1
Elephant::FA::c1
Phoenix::WA:Hawk:b1
Knight:N:::g1
Unicorn::WN::a1
Cobra::NmpafsmafF::h1
Aanca::WyafsW:Archbishop:d1
King::::e1
casaschi
Posts: 164
Joined: Wed Dec 23, 2009 1:57 pm

Re: pgn4web project

Post by casaschi »

aceplayer wrote: Tue Jul 24, 2018 11:45 pm With the intent of improving pgn4web a new "download in PGN format" feature will be added to it.
While I appreciate the positive intent of contributing to the pgn4web project, please do not make public statement that could imply you have anything to do with what will happen with the pgn4web project.

For the sake of clarity, I assume you are the same person that asked me in email to add the feature, to whom I replied that I would consider any javascript code you could submit, provided that a few conditions are met: cross-browser support, working with any data file size and native javascript without any library requirements. Incidentally, those are the stumbling block that made me give up on the idea some time ago: cross-browser support is particularly tricky, kind of easy to make something work for chrome, but if you throw in MSIE and Safari on a variety of OS things get difficult.

I'll give you the benefit of the doubt, probably English is not your first language, so I'll assume that instead of "a new download in PGN format feature will be added to it" you meant "I'm trying to submit new code for evaluation to the pgn4web project in view of possibly adding a direct download option for the PGN data".

The author of pgn4web
Last edited by casaschi on Thu Aug 02, 2018 9:07 pm, edited 1 time in total.
casaschi
Posts: 164
Joined: Wed Dec 23, 2009 1:57 pm

Re: pgn4web project

Post by casaschi »

aceplayer wrote: Fri Jul 27, 2018 5:24 pm Yes, I could. However, I was hoping I would find a seasoned web programmer here (chess or otherwise) who could write this function for us, especially since it's not so difficult and time consuming.
Who is "us" in this sentence?

Please do not roam the internet giving the impression that the pgn4web project is begging for code that is "not so difficult and time consuming" but for some reason we (this means me, the only programmer of pgn4web so far) can not produce.

It is not a trivial function and has nothing chess specific that would make me ask in this forum.
casaschi
Posts: 164
Joined: Wed Dec 23, 2009 1:57 pm

Re: pgn4web project

Post by casaschi »

Sesse wrote: Thu Jul 26, 2018 11:35 pm
aceplayer wrote: Thu Jul 26, 2018 8:23 pmSeriously, if you are not interested in this kind of project, could you direct me to a place where I would be likely to find a volunteer to write this PGN download function? Or, do any of you people know of someone who might be able to do this kind of thing (in JS)?
If you're a programmer, you're likely to be able to pick up JavaScript fairly easily. That's going to be a lot easier than looking for someone to implement a pet feature for you. :-)
The problem is quite tricky; few tries with google leads you to this solution for example:
http://danml.com/download.html
Quite a lot of code, still not working on all combinations of browsers/os and very little confidence of compatibility with future browsers.
Sesse
Posts: 300
Joined: Mon Apr 30, 2018 11:51 pm

Re: pgn4web project

Post by Sesse »

Well, even if the problem is difficult, I'd say it's usually easier to do it oneself than to get random people to do it. (I mean, witness the complete lack of interest from anybody on the forum.)