Hi,
First of all, let me tell you that I'm not at all a programmer.
I would like to know if it is possible to have a batch file to run automatically Bayeselo (version Jan 30 2007).
ususally, I launch Bayeselo manually like that :
a) readpgn xxxxxx.pgn
b) elo
c) mm
d) exactdist
e) offset 2600 Ruffian 1.0.5
f) ratings
g) ratings>Elo.txt
It would be very user friendly and less time consuming to have that automated for my rating list.
Many thanks for helping.
Arnaud Lohéac
Need a batch file with Bayeselo
Moderator: Ras
-
Charly
- Posts: 1091
- Joined: Wed Jul 23, 2014 4:30 pm
- Location: Bretagne
Need a batch file with Bayeselo
Brittany from the sky :
https://youtu.be/nR9eU_tVbxE
https://youtu.be/nR9eU_tVbxE
-
nionita
- Posts: 181
- Joined: Fri Oct 22, 2010 9:47 pm
- Location: Austria
- Full name: Niculae Ionita
Re: Need a batch file with Bayeselo
This is what I use:
But results.pgn (after readpgn) could also be made a parameter.
Code: Select all
#!/usr/bin/env bash
(
echo readpgn results.pgn
echo elo
echo mm
echo ratings
echo x
echo x
) | bayeselo
-
Evert
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: Need a batch file with Bayeselo
I use the following Perl script:
Don't know if that helps at all though...?
Code: Select all
#!/usr/bin/perl
use strict;
if ($#ARGV >= 0) {
open ELO, "| bayeselo";
print ELO "prompt off\n";
foreach (@ARGV) { print ELO "readpgn $_\n"; }
print ELO "elo
mm
offset 2100
ratings
los
";
close ELO;
}
-
tpetzke
- Posts: 686
- Joined: Thu Mar 03, 2011 4:57 pm
- Location: Germany
Re: Need a batch file with Bayeselo
Hi,
just enter all your bayeselo commands in a plain file and then pipe it into bayeselo as input.
if you name the file input.txt then you would simply run
bayeselo < input.txt
just enter all your bayeselo commands in a plain file and then pipe it into bayeselo as input.
if you name the file input.txt then you would simply run
bayeselo < input.txt
-
Robert Pope
- Posts: 572
- Joined: Sat Mar 25, 2006 8:27 pm
- Location: USA
- Full name: Robert Pope
Re: Need a batch file with Bayeselo
Nice trick -- I've always had input.txt ready, and then copied and pasted into bayeselo.
-
Ferdy
- Posts: 4855
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: Need a batch file with Bayeselo
Here is another method.Charly wrote:Hi,
First of all, let me tell you that I'm not at all a programmer.
I would like to know if it is possible to have a batch file to run automatically Bayeselo (version Jan 30 2007).
ususally, I launch Bayeselo manually like that :
a) readpgn xxxxxx.pgn
b) elo
c) mm
d) exactdist
e) offset 2600 Ruffian 1.0.5
f) ratings
g) ratings>Elo.txt
It would be very user friendly and less time consuming to have that automated for my rating list.
Many thanks for helping.
Arnaud Lohéac
Required files:
1. bayeselo.exe
2. your pgn file say zzz.pgn
Have a look at the comments after :: in the batch file.
Create a batch file say get_elo.bat then paste the following.
Code: Select all
:: (1) Modify your pgn filename here, say zzz.pgn
set "PGNFILE=zzz.pgn"
:: (2) Set your output rating file, say Elo.txt
set "OUTFILE=Elo.txt"
:: (2.1) Set the reference engine and its offset
set "REF_ENGINE_AND_OFFSET=offset 2600 Ruffian 1.0.5"
:: (3)Create the temp file elo_param.txt and write commands to this file
echo. 2>elo_param.txt
echo readpgn %PGNFILE%>elo_param.txt
echo elo>>elo_param.txt
echo mm>>elo_param.txt
echo exactdist>>elo_param.txt
echo %REF_ENGINE_AND_OFFSET%>>elo_param.txt
echo ratings>>elo_param.txt
echo ratings ^>%OUTFILE%>>elo_param.txt
echo x>>elo_param.txt
echo x>>elo_param.txt
:: (4) Run bayeselo
bayeselo <elo_param.txt
:: (5) Delete the temp file
if exist elo_param.txt del elo_param.txt
:: (6) See the output in console before exiting
pauseI tested this on windows 7.