Skip to content

paghost/notepad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Enhanced Notepad for Linux

A powerful, feature‑rich notepad application written in Python with Tkinter.
Manage your notes as individual pages, perform full‑text search across all notes, scan documents directly into text (OCR), and keep your library organised – all in a clean, customisable interface.

Screenshot placeholder
(Screenshot of the main window with sidebar, editor, and dark theme)


✨ Features

  • Page‑based notebook – each note is a separate .txt file stored in ~/.local/share/notepad/pages
  • Sidebar with live filtering and sorting (by name or modification time)
  • Full‑text search across all pages with line‑preview and double‑click navigation
  • Find & Replace inside the current page
  • Scan & OCR – scan a document and insert recognised text (requires sane‑utils and tesseract‑ocr)
  • OCR from image file – recognise text from any image
  • Print support – send the current page directly to the default printer (lpr)
  • Dark / Light theme toggle
  • Independent font size control for the editor and for the sidebar page list
  • Inline page rename – double‑click a page name in the sidebar to edit it directly
  • Auto‑save – configurable interval (default 2 seconds)
  • Import / Export your entire library as a single ZIP file
  • Keyboard shortcuts for all common operations

📋 Requirements

  • Linux (tested on Ubuntu / Debian‑based distributions)
  • Python 3.6+ with tkinter (usually installed by default)
  • Optional but recommended external tools:
    • sane-utils (for scanning)
      sudo apt install sane-utils
    • tesseract-ocr (for OCR)
      sudo apt install tesseract-ocr
      Additional language packs: tesseract-ocr-eng, tesseract-ocr-fra, etc.
    • lpr (for printing, part of CUPS) – usually pre‑installed

All Python dependencies are part of the standard library (tkinter, json, os, subprocess, zipfile, etc.). No extra pip packages are required.


🚀 Installation

  1. Clone the repository or download the script:

    git clone https://github.com/yourusername/enhanced-notepad.git
    cd enhanced-notepad
    
  2. Make the script executable (optional): chmod +x note6.py

  3. Run the application: python3 note6.py

🧰 Usage

First start

The application creates the folders ~/.local/share/notepad/pages and ~/.config/notepad/.

A default preference file (prefs.json) is generated.

Creating a new page

Menu: File → New Page (or Ctrl+N)

Enter a name (no extension – .txt is added automatically)

Saving

Auto‑save triggers after you stop typing (default 2 seconds).

Manual save: File → Save (Ctrl+S)

Opening a page

Click on any page name in the left sidebar.

Use the filter box above the list to narrow down pages.

Sort by name or last modified time using the radio buttons.

Editing page names

Dialog: select a page, then File → Rename Page (Ctrl+R)

Inline: double‑click a page name in the sidebar and edit directly. Press Enter to confirm or Escape to cancel.

Deleting a page

Select the page and use File → Delete Page (Ctrl+D).

Searching

Find/Replace in current page: Search → Find/Replace (Ctrl+F)

Find in all pages: Search → Find in All Pages (Ctrl+Shift+F) – results appear in a new window; double‑click a result to jump to that page and line.

Scanning & OCR

Place a document on your scanner and click Scan & OCR. The recognised text is inserted at the cursor position.

To OCR an existing image, click OCR Image and select the file.

OCR language and scan resolution can be set in Edit → Preferences.

Printing

File → Print (Ctrl+P) sends the current page’s content to the default printer using lpr.

Import / Export

Export your entire library as a ZIP archive: File → Export Library...

Import pages from a previously exported ZIP: File → Import Library... – you will be prompted on name conflicts.

Preferences

Font family and editor font size

Sidebar font size (adjust via View → Increase/Decrease Sidebar Font)

Dark theme toggle

Auto‑save interval (in milliseconds)

OCR language (e.g., eng, fra, deu)

Scan resolution (DPI)

All preferences are saved automatically and applied immediately. Keyboard shortcuts Action Shortcut New Page Ctrl+N Rename Page Ctrl+R Delete Page Ctrl+D Save Ctrl+S Print Ctrl+P Find/Replace Ctrl+F Find in All Pages Ctrl+Shift+F Increase Editor Font (View menu) Decrease Editor Font (View menu) Increase Sidebar Font (View menu) Decrease Sidebar Font (View menu) Toggle Dark Mode (View menu) ⚙️ Configuration

Preferences are stored in ~/.config/notepad/prefs.json. You can edit this file manually, but it is recommended to use the Preferences dialog.

Example prefs.json: json

{ "font_family": "Courier", "font_size": 12, "listbox_font_size": 10, "dark_theme": false, "auto_save_interval": 2000, "ocr_language": "eng", "scan_resolution": 300 }

🛠️ Troubleshooting

Scanning fails – ensure scanimage is installed and your scanner is detected (scanimage -L).

OCR fails – verify tesseract is installed and the selected language pack is available (tesseract --list-langs).

Printing fails – check that lpr is installed and a default printer is configured (lpstat -d).

No pages appear – the pages folder is created automatically; if you have existing .txt files there, they will be shown.

🤝 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests on the GitHub repository. Please follow the existing code style and include updates to the README if necessary. 📄 License

This project is open source and available under the MIT License.

About

Linux notepad that works how you want it to.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages