Skip to content

tux234/readwiseAnalyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Readwise Analyzer

Readwise Analyzer is a Python application designed to help users manage their reading lists by fetching, analyzing, and categorizing articles from the Readwise Reader feed. It integrates with an AI tool called Fabric to rate each article, making it easier to decide which articles to prioritize for reading.

Features

  • Fetch Articles: Retrieve articles from the Readwise Reader API.
  • Scrape Content: Extract content from article URLs.
  • AI Analysis: Use Fabric AI to analyze and rate articles.
  • Categorize Articles: Automatically sort articles into categories based on their ratings:
    • S Tier: Shortlist
    • A Tier: Read This Week
    • B & C Tier: Weekend List
    • D Tier: Archive

Project Structure

readwise-analyzer/
│
├── src/
│   ├── __init__.py
│   ├── readwise.py            # Interact with Readwise API
│   ├── scraper.py             # Scrape content from URLs
│   ├── fabric_integration.py  # Analyze content with Fabric
│   ├── analysis.py            # Main analysis logic
│   └── run.py                 # Entry point for the application
│
├── config/
│   └── config.yml             # Configuration settings
│
├── docs/                      # Documentation
│   ├── README.md              # Project overview (this file)
│
├── pytest.ini                 # Pytest configuration file
├── tests/                     # Test suite
├── .gitignore                 # Git ignore file
├── requirements.txt           # Python dependencies (includes pytest)
├── .env                       # Environment variables file

Installation

Prerequisites

  • Python 3.7+: Ensure Python is installed on your system.
  • Fabric AI: The Fabric application must be installed and accessible from your command line.

Setup Instructions

  1. Clone the Repository:

    git clone https://github.com/yourusername/readwise-analyzer.git
    cd readwise-analyzer
  2. Create a Virtual Environment:

    python -m venv venv
    source venv/bin/activate  # For Windows: venv\Scripts\activate
  3. Install Dependencies:

    pip install -r requirements.txt
  4. Set Up Environment Variables:

    Create a .env file in the project root directory with your Readwise API key:

    READWISE_API_KEY=your_readwise_api_key
    
  5. Configure Settings:

    Edit the config/config.yml file to customize settings, if necessary.

Usage

To run the application, execute the following command:

python src/run.py

The application will:

  • Fetch articles from the Readwise Reader feed.
  • Scrape and analyze each article using Fabric.
  • Categorize articles based on their ratings into different reading lists.

Testing

To run tests, use the following command:

pytest tests/

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.

  2. Create a new branch (git checkout -b feature/your-feature).

  3. Commit your changes (git commit -m 'Add new feature').

  4. Push to the branch (git push origin feature/your-feature).

  5. Open a pull request.

  6. Ensure tests pass by running:

    pytest tests/

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Contact

For questions or feedback, please open an issue.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages