Inventitech/AbstractFormatter

View on GitHub
index.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<!-- Copyright (C) 2014  Moritz Beller

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. -->
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="A website that helps scientists format and do sanity checks on their abstracts for papers or journals.">
    <meta name="keywords" content="abstract, abstract formatter, formatting, remove line, remove markup, easy chair, easychair, latex, pdf, paper, journal, conference">
    <meta name="author" content="Moritz Beller">
    <link rel="icon" type="image/png" href="paper_16.png" />
    <title>Abstract Formatter</title>

    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">


    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <style>
#formattedAbstract:hover { background: #eee; }
.active { background: #eee; }
</style>
  </head>
  <body>
    <!-- Main jumbotron for a primary marketing message or call to action -->
    <div class="jumbotron">
      <div class="container">
        <h1><span class="glyphicon glyphicon-file"></span> Abstract
          Formatter</h1>
    <a href="https://github.com/Inventitech/AbstractFormatter" class="github-corner"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#fff; color:#151513; position: absolute; top: 0; border: 0; right: 0;"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
        <div class="media"><iframe width="336" height="210" src="https://www.youtube.com/embed/crBEGh7ZXdI" frameborder="0" allowfullscreen class="media-object pull-left" style="margin-right:20px"></iframe>
      <div class="media-body">
        <p>Whenever I wrote a paper, I hated having to reformat my abstract
        upon submission.  Why couldn't I  simply copy the abstract  from my
        PDF or LaTeX sources into EasyChair's, CyberChair's, or PeerJ's text
        field  without  a lot  of  manual  work, like  removing  erroneous,
        hard-to-spot linebreaks and special  markup? Thanks to the Abstract
        Formatter, now you and I can!</p>
        <p><button class="btn btn-primary btn-lg" role="button" data-toggle="collapse" href="#collapseOne" onClick="toggleCollapse();" id="collapseButton">Learn more &raquo;</button></p>
      </div>
    </div>
    <div id="collapseOne" class="panel-collapse collapse" style="margin-top:20px">
      <div class="media">
        <img src="unformatted_abstract.png" class="media-object pull-right img-rounded" alt="That's not what you want: truncated line endings with bad hyphenation problems." style="margin-right:20px">
        <div class="media-body">
          <p> So, in the past, I had to manually delete all these stupid
          line breaks. With hy-phe-na-tion in the PDF, things got really
          ugly. And you overlook a lot of these in the small textbox that
          EasyChair, CyberChair, and PeerJ provide you with.</p>
      <p>As it happens, I have no time for these things when I submit a paper. If you feel the same, well, despair no more, because my frustration led to the Abstract Formatter. It not only removes all those unwanted line breaks for you, but it also does some nice sanity checking on your abstract, giving you that comfy feeling of a really tiny tool that just does what it should do. And it can handle TeX code, too.</p>  </div>  </div><p>Here are my promises:</p>
<ol><li>Nothing bad will ever happen with the text you put into Abstract Formatter. In fact, it will not even leave your computer, because the formatting is done via a JavaScript locally executed on only your machine.</li>
<li>Abstract Formatter will forever stay free to use, redistribute, and modify (under the GPL).</li>
<li>If you have a bug or feature request, I'll try my best to implement it. Just <a href="http://www.inventitech.com">drop me a line.</a> Or, <a href="https://github.com/Inventitech/AbstractFormatter">create an issue/fork/pull request</a> on GitHub. A few people have already done this, thanks a lot (especially to Thomas Kinnen and Daniel StrĂ¼ber)!</li> 
</ol><p></p>
    </div>
      </div>
    </div>

    <div class="container">
      <!-- Example row of columns -->
      <div class="row">
        <div class="col-md-6">
          <h2>Your Raw Abstract.</h2>
      <textarea placeholder="Your abstract
                                                                                                                                                                                                        
copied from the PDF or LaTeX source!" id="abstractTextarea" class="form-control"></textarea>
<p><div class="control-group"><button type="button" class="btn btn-default" onClick="clearAbstract();">Clear Abstract.</button></div></p>
        </div>
        <div class="col-md-6">
    <div id="prepared">
          <h2>Your Prepared Abstract.</h2>
      <div id="dangerMessages"></div><div id="warningMessages"></div><div id="infoMessages"></div>
          <div id="formattedAbstract">Your formatted abstract from the PDF or LaTeX source!</div>
        </div>
    <br>  <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://abstractformatter.inventitech.com" data-text="I just formatted a scientific paper abstract with @Inventitech's Abstract Formatter." data-size="large">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
    </div>
      </div>
      </div>

      <hr>

      <footer><p style="text-align:center;">
      <small>Made with &nbsp;<i class="glyphicon glyphicon-heart"></i>&nbsp; on <a href="https://github.com/nightraven/AbstractFormatter">GitHub</a>&nbsp; by <a href="http://www.inventitech.com">Moritz Beller</a>.</small>
    </p>
      </footer>
    </div> <!-- /container -->

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-49032236-2', 'inventitech.com');
  ga('send', 'pageview');

</script>
    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script src="js/libs/bootstrap.min.js"></script>
    <script src="js/libs/jquery-2.1.0.min.js"></script>
    <script src="js/libs/jquery.autosize.min.js"></script>
    <script src="js/libs/afinn-111.js"></script>
    <script src="js/src/sentiment.js"></script>    
    <script src="js/src/htmlHelper.js"></script>    
    <script src="js/src/abstractFormatting.js"></script>
  </body>
</html>