Skip to content

enu235/reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Speed Reader

A cross-platform .NET application that displays text from PDFs or web pages one word at a time at a configurable speed.

Features

  • Load text from PDF files or web pages
  • Smart content extraction from web pages
  • Configure reading speed (words per minute)
  • Customize font family and size
  • Context view to see surrounding text while reading
  • Pause, resume, and stop reading
  • Reading progress indicator
  • Cross-platform (Windows, macOS, Linux)

Requirements

  • .NET 9.0 SDK or later

Dependencies

  • Avalonia UI (v11.0.7) - Cross-platform UI framework
  • itext7 (v8.0.2) - For PDF parsing
  • HtmlAgilityPack (v1.11.59) - For web page parsing
  • MessageBox.Avalonia (v3.1.5.1) - For dialog boxes

Getting Started

  1. Clone or download this repository
  2. Build and run the application:
    cd SpeedReader
    dotnet run
    

How to Use

  1. Select the source type (PDF or Web Page)
  2. For PDF: Click "Browse" to select a PDF file, or enter the path manually
  3. For Web Pages: Enter the full URL (e.g., https://example.com/article)
    • The application will analyze the page and identify potential content areas
    • You can select which content area to read from
  4. Configure the font family, font size, and reading speed (words per minute)
  5. Toggle the context view on/off to see surrounding text while reading
  6. Click "Start" to begin reading
  7. Use "Pause" to pause reading and "Stop" to stop completely

Context View

The application includes a context view feature that shows the surrounding text while focusing on one word at a time:

  1. The current word is displayed prominently in the center
  2. The surrounding text is shown in the background with reduced opacity
  3. The current word's position is highlighted in the context text
  4. Toggle the context view on or off using the switch in the top-right corner

Web Page Content Extraction

The application includes a smart content extraction feature for web pages:

  1. Automatically identifies main content areas using common patterns
  2. Detects articles, main content sections, and text-rich areas
  3. Allows you to preview and select which content to read
  4. Filters out navigation, headers, footers, and other non-content elements

Notes

  • For web pages, the quality of text extraction depends on the structure of the website. Some websites may not extract cleanly.
  • Very large PDF files may take some time to process.

Future Improvements

  • Add text preprocessing to improve readability
  • Support for additional file formats (e.g., EPUB, DOCX)
  • Visual selection of content regions on web pages
  • Save and load reading preferences
  • Text highlighting options
  • Themes and color customization
    <!-- WebView with selection overlay -->
    <Panel Grid.Row="0">
        <WebView x:Name="WebPreview" />
        <Canvas x:Name="SelectionOverlay" />
    </Panel>
    
    <!-- Controls -->
    <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" Margin="10">
        <Button Content="Auto-Detect Content" Margin="5" />
        <Button Content="Clear Selection" Margin="5" />
        <Button Content="Extract Selected" Margin="5" />
        <Button Content="Cancel" Margin="5" />
    </StackPanel>
</Grid>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages