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.
- 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
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
- Python 3.7+: Ensure Python is installed on your system.
- Fabric AI: The Fabric application must be installed and accessible from your command line.
-
Clone the Repository:
git clone https://github.com/yourusername/readwise-analyzer.git cd readwise-analyzer -
Create a Virtual Environment:
python -m venv venv source venv/bin/activate # For Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Set Up Environment Variables:
Create a
.envfile in the project root directory with your Readwise API key:READWISE_API_KEY=your_readwise_api_key -
Configure Settings:
Edit the
config/config.ymlfile to customize settings, if necessary.
To run the application, execute the following command:
python src/run.pyThe 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.
To run tests, use the following command:
pytest tests/Contributions are welcome! To contribute:
-
Fork the repository.
-
Create a new branch (
git checkout -b feature/your-feature). -
Commit your changes (
git commit -m 'Add new feature'). -
Push to the branch (
git push origin feature/your-feature). -
Open a pull request.
-
Ensure tests pass by running:
pytest tests/
This project is licensed under the MIT License. See the LICENSE file for more information.
For questions or feedback, please open an issue.