Add instructions how to use Gonito when writing a paper
This commit is contained in:
parent
c633d2a327
commit
688b7bfc60
@ -1,3 +1,5 @@
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
|
||||
module Handler.Presentation where
|
||||
|
||||
import Import
|
||||
@ -95,3 +97,12 @@ getSampleLeaderboard name = do
|
||||
presentationLayout widget = do
|
||||
pc <- widgetToPageContent widget
|
||||
withUrlRenderer $(hamletFile "templates/presentation-layout.hamlet")
|
||||
|
||||
getWritingPapersWithGonitoR :: Handler Html
|
||||
getWritingPapersWithGonitoR = do
|
||||
app <- getYesod
|
||||
let tab :: String = "\t"
|
||||
let rootAddress = appRoot $ appSettings app
|
||||
defaultLayout $ do
|
||||
setTitle "Writing papers with Gonito"
|
||||
$(widgetFile "writing-papers")
|
||||
|
@ -74,3 +74,4 @@
|
||||
/presentation/datech-2017 PresentationDATeCH2017R GET
|
||||
/presentation/psnc-2019 PresentationPSNC2019R GET
|
||||
/gonito-in-class GonitoInClassR GET
|
||||
/writing-papers WritingPapersWithGonitoR GET
|
||||
|
@ -86,3 +86,4 @@ Update: Update
|
||||
ChallengeDeadlineDay: challenge deadline day
|
||||
ChallengeDeadlineTime: challenge deadline time
|
||||
ChallengeDeadlineTooltip: no submissions will be accepted after the deadline; this can be used for organizing competitions set in time
|
||||
WritingPapers: writing papers with Gonito
|
||||
|
@ -6,9 +6,3 @@ packages:
|
||||
- '.'
|
||||
extra-deps: [../geval,wai-handler-fastcgi-3.0.0.2,murmur3-1.0.3,random-strings-0.1.1.0,naturalcomp-0.0.3,Munkres-0.1,Chart-1.9.1,Chart-cairo-1.9.1,multiset-0.3.4.1,pwstore-fast-2.4.4,yesod-table-2.0.3,esqueleto-3.0.0]
|
||||
resolver: lts-12.26
|
||||
image:
|
||||
container:
|
||||
name: filipg/gonito
|
||||
base: fpco/stack-run
|
||||
add:
|
||||
executables: /usr/local/bin/gonito-bin
|
||||
|
@ -21,6 +21,7 @@
|
||||
<a id="about" href="#" class="dropdown-toggle" data-toggle="dropdown">_{MsgAbout}<span class="caret"></span>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="@{PresentationPSNC2019R}">_{MsgPresentation}</a>
|
||||
<li><a href="@{WritingPapersWithGonitoR}">_{MsgWritingPapers}</a>
|
||||
<li><a href="@{GonitoInClassR}">_{MsgGonitoInClass}</a>
|
||||
<li><a href="@{ListChallengesR}">_{MsgListChallenges}</a>
|
||||
<li><a href="@{TagsR}">_{MsgListTags}</a>
|
||||
@ -45,7 +46,11 @@
|
||||
<li><a href="@{AuthR LogoutR}">_{MsgLogOut}</a></li>
|
||||
$nothing
|
||||
<ul class="nav navbar-nav navbar-top navbar-collapse collapse">
|
||||
<li><a href="@{PresentationPSNC2019R}">_{MsgAbout}</a>
|
||||
<li class="dropdown">
|
||||
<a id="about" href="#" class="dropdown-toggle" data-toggle="dropdown">_{MsgAbout}<span class="caret"></span>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="@{PresentationPSNC2019R}">_{MsgPresentation}</a>
|
||||
<li><a href="@{WritingPapersWithGonitoR}">_{MsgWritingPapers}</a>
|
||||
<li><a href="@{ListChallengesR}">_{MsgListChallenges}</a>
|
||||
<li><a href="@{TagsR}">_{MsgListTags}</a>
|
||||
<li><a href="@{DashboardR}">_{MsgDashboard}</a>
|
||||
|
71
templates/writing-papers.hamlet
Normal file
71
templates/writing-papers.hamlet
Normal file
@ -0,0 +1,71 @@
|
||||
<p>If you write a paper, Gonito can make your life a little bit easier: you won't need to copy&paste evaluation results manually and all your results will referenced in a proper manner.
|
||||
|
||||
<p>Just add the following piece of LaTeX code to your paper:
|
||||
|
||||
<pre>
|
||||
\\usepackage{hyperref}
|
||||
\\usepackage{xstring}
|
||||
% Format a reference to a Gonito submission
|
||||
\\newcommand{\gonitoref}[1]{\{\href{#{rootAddress}/q/#1}{\StrMid{#1}{1}{6}}\}}
|
||||
% A score from Gonito along with a reference
|
||||
\\newcommand{\gonitoscore}[1]{\minput{scores/#1.txt} \gonitoref{#1}}
|
||||
% A reference and a score as two cells in a table
|
||||
\\newcommand{\gonitoentry}[1]{\gonitoref{#1} & \minput{scores/#1.txt}}
|
||||
|
||||
<p>Now you will be able to reference your Gonito submissions using its git commit hash, e.g.: <tt>\gonitoref{433e8cfdc4b5e20e276f4ddef5885c5ed5947ae5}</tt>. The hash will be printed in a shorter form (just first 6 digits) and it will be clickable leading to the Gonito entry describing the submission (information how to get the data will be presented there).
|
||||
|
||||
<p>You can explain the idea like this:
|
||||
|
||||
<pre>
|
||||
\\gonitoscore{433e8cfdc4b5e20e276f4ddef5885c5ed5947ae5}%
|
||||
\\footnote{Reference codes to repositories stored at
|
||||
Gonito.net~\cite{gonito2016} are given in curly brackets. Such a repository may be also accessed by going
|
||||
to \url{http://gonito.net/q} and entering the code there.}
|
||||
|
||||
<p>Here is the BiBTeX entry referenced in the above snippet:
|
||||
|
||||
<pre>
|
||||
@incollection { gonito2016,
|
||||
\ title = {Gonito.net -- Open Platform for Research Competition, Cooperation and Reproducibility},
|
||||
\ author = "Grali{\'n}ski, Filip and Jaworski, Rafa{\l} and Borchmann, {\L}ukasz and Wierzcho{\'n}, Piotr",
|
||||
\ editor = "Branco, António and Calzolari , Nicoletta and Choukri, Khalid",
|
||||
\ booktitle = {Proceedings of the 4REAL Workshop: Workshop on Research Results Reproducibility and Resources Citation in Science and Technology of Language},
|
||||
\ year = "2016",
|
||||
\ pages = "13-20"
|
||||
}
|
||||
|
||||
<p>But, wait, with Gonito you can give evaluation scores without manual copy&paste. The <tt>\gonitoscore</tt> command gives a score and a reference. The score is taken from a file <tt>scores/HASH.txt</tt>. You need to get it from Gonito, but it's not difficult to set it up in such a way that the scores could be downloaded automatically. For instance, if you use Makefile for building your papers, you could use the following snippet:
|
||||
|
||||
<pre>
|
||||
SCOREFILES=$(shell ./extract-score-files.pl main.tex)
|
||||
\
|
||||
paper.pdf: paper.tex main.tex $(SCOREFILES)
|
||||
#{tab}... building instructions ...
|
||||
\
|
||||
scores/%.txt:
|
||||
#{tab}mkdir -p scores
|
||||
#{tab}wget "https://gonito.net/api/txt/score/"$* -O $@
|
||||
|
||||
<p>The script <tt>extract-score-files.pl</tt> is like this:
|
||||
|
||||
<pre>
|
||||
#!/usr/bin/perl
|
||||
\
|
||||
use strict;
|
||||
\
|
||||
open(my $ih, '<', $ARGV[0]);
|
||||
binmode($ih, ':utf8');
|
||||
\
|
||||
my %found = ();
|
||||
\
|
||||
while (my $line=<$ih>) {
|
||||
\ while ($line =~ m<\\gonito(?:score|entry)\{([^\}]+)\}>g) {
|
||||
\ $found{$1} = 1;
|
||||
\ }
|
||||
}
|
||||
\
|
||||
print join(" ", map { "scores/${_}.txt" } sort keys %found);
|
||||
|
||||
<p>The <tt>\gonitoentry</tt> command is very similar to <tt>\gonitoscore</tt>, it just formats the infromation as two cells in a table (i.e. <tt>\gonitoentry</tt> can be used <strong>only</strong> in tables).
|
||||
|
||||
<p>Note that you can commit score files to your repository, so that everything is OK when your paper is edited at Overleaf or a similar service.
|
Loading…
Reference in New Issue
Block a user