Updatesmanager.koplugin
Updates Manager is a plugin for KOReader that helps you manage updates for patches and plugins from multiple GitHub repositories
Install / Use
/learn @advokatb/Updatesmanager.kopluginREADME
Updates Manager Plugin for KOReader
Updates Manager is a plugin for KOReader that helps you manage updates for patches and plugins from multiple GitHub repositories.
<a id="features"></a>
Features
✅ Implemented Features
- Multi-Repository Updates: Automatically check for updates from multiple GitHub repositories
- Selective Updates: Choose which patches/plugins to update with checkboxes
- Smart Caching: Repository data is cached to reduce API calls and improve performance
- Rate Limit Handling: Automatically handles GitHub API rate limits with intelligent retry logic
- Progress Display: Real-time progress updates during update checks
- Safe Installation: Backs up existing files before updating
- Preserve files on plugin update: Optional
preserve_filesin repo config keeps user config/API keys etc. when updating a plugin (paths with subfolders supported) - MD5 Verification: Validates file integrity using MD5 checksums
- Patch Descriptions: Automatic extraction from comments, local editing
- Plugin Version Management: Automatic version comparison for plugins
- Network Management: Automatic Wi-Fi connection handling
- Error Handling: Graceful handling of network errors and API limits
🚧 Future Features
- Repository Management UI: Add/remove repositories through the plugin interface
- Update Notifications: Automatic background checks for updates
<a id="installation"></a>
Installation
- Download the latest release from the Releases page
- Extract the
updatesmanager.kopluginfolder to your KOReaderpluginsdirectory - Restart KOReader
<a id="usage"></a>
Usage
<a id="menu-structure"></a>
Menu Structure
The plugin menu is organized into three main sections:
- Patches: Manage patch updates
- Check for Updates
- Force Refresh (ignore cache)
- Installed Patches
- Plugins: Manage plugin updates
- Check for Updates
- Force Refresh
- Installed Plugins
- Settings: Configuration options
- Repository Settings
- Clear Cache
<a id="force-refresh"></a>
Force Refresh
Force Refresh bypasses the cache and fetches fresh data from all repositories. Use it when:
- You suspect the cache is outdated
- You want to check for updates immediately after a repository change
- You're experiencing issues with update detection
Note: Force Refresh will make more API calls and may take longer, especially with many repositories.
<a id="managing-patches"></a>
📝 Managing Patches
<a id="patches-for-users"></a>
For Users
<a id="patch-warnings"></a>
Important Warnings
<details> <summary><strong>⚠️ Your custom patch modifications will be overwritten!</strong></summary>When you update a patch, any local modifications you made to the patch file will be completely replaced with the version from the repository.
- The plugin creates a backup (
.oldfile) before updating - If you've modified a patch, consider:
- Creating your own repository with your modified version
- Documenting your changes before updating
- Restoring from the
.oldbackup if needed
<a id="checking-patch-updates"></a>
Checking for Patch Updates
- Open KOReader menu
- Navigate to Updates Manager → Patches → Check for Updates
- The plugin will scan all configured patch repositories for updates
- Select which patches you want to update using checkboxes
- Long-press on any patch to view detailed information
- Click Update Selected to install updates
<a id="viewing-installed-patches"></a>
Viewing Installed Patches
- Navigate to Updates Manager → Patches → Installed Patches
- View list of all installed patches with description previews
- Tap on a patch to see detailed information
- Use Edit Description to customize the patch description
<a id="editing-patch-descriptions"></a>
Editing Patch Descriptions
- View patch details (from update list or installed patches)
- Click Edit Description
- Enter or modify the description
- Click Save
Descriptions are saved locally and take priority over repository descriptions.
<a id="ignoring-patch-updates"></a>
Ignoring Patch Updates
If you've modified a patch and don't want it to appear in the update list, you can add it to the ignore list.
How to ignore a patch:
- Create or edit the file:
KOReader/settings/updatesmanager_ignored_patches.txt - Add one patch name per line (without
.luaextension) - Lines starting with
#are treated as comments - Empty lines are ignored
Example file:
# Patches I've modified and don't want to update
2-custom-folder-fonts
2-percent-badge
# Another modified patch
my-custom-patch
Notes:
- Patch names should be without the
.luaextension - The file is read each time you check for updates
- Ignored patches will not appear in the update list
- You can still manually update ignored patches by removing them from the ignore list
<a id="patches-for-authors"></a>
For Patch Authors
<a id="adding-patch-repository"></a>
Adding Your Patch Repository
- Create a GitHub repository with your patches (e.g.,
KOReader.patches) - Add your repository to the plugin configuration (see Repository Configuration)
Want to add your repository to the default list?
You can create a pull request to add your repository to the plugin's default repository list. This way, all users will have access to your patches without manual configuration.
- Fork the Updates Manager plugin repository
- Add your repository to
config.luain theDEFAULT_PATCH_REPOStable - Create a pull request with a description of your patches repository
- Your PR will be reviewed and merged, making your patches available to all users
<a id="patch-descriptions"></a>
Patch Descriptions
The plugin automatically extracts descriptions from comments at the beginning of patch files:
-- This patch allows customizing folder fonts
-- You can set different fonts for different folders
-- Supports both system and custom fonts
local ok, guard = pcall(require, "patches/guard")
-- ... rest of patch code
The plugin will:
- Extract comment lines (starting with
--) - Skip metadata comments (version checks, requirements, etc.)
- Skip decorative lines (========, ----, etc.)
- Stop at the first non-comment line
<a id="description-priority"></a>
Description Priority
Patch descriptions are loaded in the following priority order:
-
Local user-edited descriptions (highest priority)
- Stored in
KOReader/settings/updatesmanager_patch_descriptions.json - Can be edited through the plugin UI
- Stored in
-
Comments in patch files (lowest priority)
- Parsed from comment lines at the beginning of patch files
<a id="managing-plugins"></a>
🔌 Managing Plugins
<a id="plugins-for-users"></a>
For Users
<a id="checking-plugin-updates"></a>
Checking for Plugin Updates
- Open KOReader menu
- Navigate to Updates Manager → Plugins → Check for Updates
- The plugin will check all configured plugin repositories for updates
- Select which plugins you want to update using checkboxes
- Long-press on any plugin to view detailed information (version, release notes)
- Tap the small changelog label or icon next to a plugin to preview the release notes for that specific version without leaving KOReader
- Click Update Selected to install updates
<a id="viewing-installed-plugins"></a>
Viewing Installed Plugins
- Navigate to Updates Manager → Plugins → Installed Plugins
- View list of all installed plugins with versions
- Tap on a plugin to see detailed information (version, description, path)
Note: Default KOReader plugins (like archiveviewer, autodim, etc.) are hidden from this list as they are updated with KOReader itself.
<a id="plugins-for-authors"></a>
For Plugin Authors
<a id="version-management"></a>
Version Management
How version checking works:
- The plugin reads the
versionfield from your plugin's_meta.luafile - It compares this version with the latest GitHub Release tag
- If the release version is newer, an update is shown
Important: You must specify a version in _meta.lua for the plugin to work correctly!
<a id="adding-version-to-plugin"></a>
Adding Version to Your Plugin
Edit your plugin's _meta.lua file and add a version field:
return {
name = "myplugin",
fullname = "My Plugin",
description = "Description of my plugin",
version = "1.0.0", -- ← Add this line!
}
Version Format:
- Use semantic versioning (e.g.,
"1.0.0","1.2.3","2.0.0-beta.1") - The plugin supports versions with or without
vprefix (e.g.,"v1.0.0"or"1.0.0") - Versions are compared using semantic versioning rules
⚠️ Important Warning:
- If your
_meta.luadoesn't have aversionfield, the plugin will show"unknown"as the current version - The plugin will always show an update available if the version is
"unknown", even if you're already on the latest release - Always add a version to your
_meta.luato avoid false update notifications
<a id="creating-github-releases"></a>
Creating GitHub Releases
- Create a GitHub Release in your plugin repository
- Use version tags that match your
_meta.luaversion (e.g.,v1.0.0,1.0.0) - Attach a ZIP file containing your plugin folder (e.g.,
myplugin.koplugin.zip) - The plugin will automatically detect a
