A GitHub Action that exports WikiSource documents to various formats (txt, pdf, epub, mobi, rtf) using the ws-export tool.
- Export WikiSource documents to multiple formats (txt, pdf, epub, mobi, rtf)
- Support for multiple languages
- Optional credits list inclusion
- Caching support for faster exports
- Artifact upload support
- uses: ruslanbay/wikisource-exporter@v3.1.0
with:
title: Constitution_of_the_United_States_of_America
lang: en
format: txtname: Export WikiSource Document
on:
workflow_dispatch:
inputs:
title:
description: 'Page title'
required: true
default: 'Constitution_of_the_United_States_of_America'
lang:
description: 'Language code'
required: true
default: 'en'
type: choice
options: ['ru', 'en', 'de', 'fr']
format:
description: 'Output format'
required: true
default: 'txt'
type: choice
options: ['txt', 'pdf', 'epub', 'mobi', 'rtf', 'epub-3', 'epub-2', 'htmlz', 'pdf-a4', 'pdf-a5', 'pdf-a6', 'pdf-letter']
jobs:
export:
runs-on: ubuntu-latest
steps:
- name: Export document
uses: ruslanbay/wikisource-exporter@v3.1.0
with:
title: ${{ github.event.inputs.title }}
lang: ${{ github.event.inputs.lang }}
format: ${{ github.event.inputs.format }}
nocredits: true
nocache: false
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: wikisource-document
path: output| Input | Description | Required | Default |
|---|---|---|---|
title |
Page title (e.g. Constitution_of_the_United_States_of_America) | Yes | - |
lang |
Language code (e.g. en, ru, de, fr) | Yes | en |
format |
Output format (txt, pdf, epub, mobi, rtf) | Yes | txt |
nocredits |
Do not include the credits list | No | true |
nocache |
Do not cache anything (re-fetch all data) | No | false |
| Output | Description |
|---|---|
output-path |
Path to the exported document |
- uses: ruslanbay/wikisource-exporter@v3.1.0
with:
title: Конституция_Российской_Федерации
lang: ru
format: pdf- uses: ruslanbay/wikisource-exporter@v3.1.0
with:
title: Don_Quixote
lang: en
format: epub
nocredits: false
nocache: falseThe action is built using:
- Ubuntu 24.04 as the base image
- PHP and required extensions
- Calibre for PDF conversion
- GitHub Actions toolkit
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
- ws-export - The core tool used for exporting WikiSource documents
- Wikisource - The free library that is providing the content
- Created by ruslanbay
- v3.1.0 (2025-03-12)
- Initial release
- Support for txt, epub, and pdf formats
- Multiple language support
- Optional credits and caching
