Metadata-Version: 2.1
Name: i-hate-papers
Version: 0.2.1
Summary: Create easily readable versions of academic papers via OpenAI
Home-page: https://github.com/adamcharnock/i-hate-papers
License: MIT
Author: Adam Charnock
Author-email: adam@adamcharnock.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Text Processing
Requires-Dist: arxiv (>=1.4.8,<2.0.0)
Requires-Dist: html2text (>=2020.1.16,<2021.0.0)
Requires-Dist: markdown (>=3.4.4,<4.0.0)
Requires-Dist: openai (>=0.27.10,<0.28.0)
Requires-Dist: python-markdown-math (>=0.8,<0.9)
Description-Content-Type: text/markdown

# I "Hate" Papers

**Create easily readable versions of papers via OpenAI**

I often need to read a paper to provide background on a related topic. 
In these cases the technical depth of a paper can be a major obstacle.
So I created I Hate Papers to create easily digestible versions of 
academic research.

Currently works with:

* An arXiv paper ID
* A local `.tex` file
* A local `.md` file
* A local `.html` file (experimental)

# Installation

    pip install i-hate-papers

# Example use
    
    # First set your OpenAI API key
    ❱ export OPENAI_API_KEY=...
    
    # Summarise a arXiv paper ID
    ❱ i_hate_papers 2106.09685
    
    # Summarise a latex file
    ❱ i_hate_papers path/to/some-paper.tex
    
    # Summarise a html file
    ❱ i_hate_papers path/to/some-paper.html

# Example output

* [Example HTML](https://adamcharnock.github.io/i-hate-papers/examples/summary-2106.09685-d1-gpt-3.5-turbo-16k.html) (includes rendered math using MathJax)
* [Example Markdown](https://github.com/adamcharnock/i-hate-papers/blob/main/examples/summary-2106.09685-d1-gpt-3.5-turbo-16k.md)

# Reference

    ❱ i_hate_papers --help
    usage: i_hate_papers [-h] [--verbosity {0,1,2}] [--no-input] [--no-html] [--no-open] [--no-footer] 
                         [--no-glossary] [--detail-level {0,1,2}] [--model MODEL] INPUT
    
    Summarise an academic paper
    
    You must set the OPENAI_API_KEY environment variable using your OpenAi.com API key
    
    positional arguments:
      INPUT                 arXiv paper ID (example: 1234.56789) or path to a .tex/.html/.md file
    
    options:
      -h, --help            show this help message and exit
      --verbosity {0,1,2}   Set the logging verbosity (0 = quiet, 1 = info logging, 2 = debug logging). Default is 1
      --no-input            Don't prompt for file selection, just use the largest tex file
      --no-html             Skip HTML file generation
      --no-open             Don't open the HTML file when complete (macOS only)
      --no-footer           Don't include a footer containing metadata
      --no-glossary         Don't include a glossary
      --detail-level {0,1,2}
                            How detailed should the summary be? (0 = minimal detail, 1 = normal, 2 = more detail)
      --model MODEL         What model to use to generate the summaries

# Release process

For internal use:

    export VERSION=0.1.1
    poetry version $VERSION
    git ci -a -m "Releasing version $VERSION"
    git tag "v$VERSION"
    git push origin main refs/tags/v$VERSION
    poetry publish --build
