Skip to content

Commit 55afebf

Browse files
Add files via upload
0 parents  commit 55afebf

15 files changed

Lines changed: 1893 additions & 0 deletions

.gitattributes

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Keep scripts safe on Windows while normalizing the rest of the repository.
2+
*.bat text eol=crlf
3+
*.cmd text eol=crlf
4+
*.ps1 text eol=crlf
5+
*.py text eol=lf
6+
*.spec text eol=lf
7+
*.md text eol=lf
8+
*.txt text eol=lf
9+
*.yml text eol=lf
10+
*.yaml text eol=lf
11+
*.toml text eol=lf
12+
*.json text eol=lf
13+
*.png binary
14+
*.jpg binary
15+
*.jpeg binary
16+
*.ico binary
17+
*.pdf binary
18+
*.doc binary
19+
*.docx binary
20+
*.exe binary

.gitignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.pyo
6+
*.pyd
7+
*.egg-info/
8+
.eggs/
9+
.pytest_cache/
10+
.mypy_cache/
11+
.ruff_cache/
12+
.coverage
13+
htmlcov/
14+
15+
# Virtual environments
16+
.venv/
17+
.venv_build/
18+
venv/
19+
env/
20+
ENV/
21+
22+
# Build artifacts
23+
build/
24+
dist/
25+
*.log
26+
*.tmp
27+
*.bak
28+
*.zip
29+
*.7z
30+
*.rar
31+
32+
# PyInstaller runtime/cache
33+
*.manifest
34+
*.toc
35+
36+
# Local app output and test leftovers
37+
logs/
38+
output/
39+
out/
40+
test_output/
41+
42+
# OS/editor files
43+
.DS_Store
44+
Thumbs.db
45+
desktop.ini
46+
.vscode/
47+
.idea/

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## [1.0.0] - 2026-05-28
6+
7+
### Added
8+
9+
- Initial GitHub-ready release package.
10+
- RU / EN language switcher.
11+
- English translation for UI labels, tabs, buttons, dialogs, statuses and log messages.
12+
- Smoke tests for translation coverage, branding removal, PDF/image helpers and batch-file line endings.
13+
- GitHub-ready documentation, upload guide, build guide, release checklist and CI smoke-test workflow.
14+
15+
### Changed
16+
17+
- Main source file renamed to `office_converter.py` for a cleaner repository layout.
18+
- PyInstaller spec and build scripts updated to use the new source file name.
19+
- Windows batch files kept ASCII-only with CRLF line endings.
20+
21+
### Removed
22+
23+
- Old logo image, “Ща все сделаем!” text and Dzen link from the interface.
24+
- Logo references from the PyInstaller spec.
25+
26+
### Known limitations
27+
28+
- Word/DOC/DOCX operations require Windows with Microsoft Word installed.
29+
- PDF → DOCX conversion quality depends on source PDF layout complexity.

CONTRIBUTING.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Contributing
2+
3+
Thanks for helping improve Office Converter All-in-One.
4+
5+
## Development setup
6+
7+
On Windows:
8+
9+
```bat
10+
py -3 -m venv .venv
11+
.venv\Scripts\python.exe -m pip install --upgrade pip setuptools wheel
12+
.venv\Scripts\python.exe -m pip install -r requirements.txt
13+
```
14+
15+
Run smoke tests:
16+
17+
```bat
18+
run_smoke_tests.bat
19+
```
20+
21+
On Linux/macOS, GUI tests may require a virtual display, for example `xvfb-run` on Linux.
22+
23+
## Pull request checklist
24+
25+
- Keep the app usable on Windows.
26+
- Do not remove the RU / EN language switcher.
27+
- Add translations for both languages when adding UI text.
28+
- Keep `build_exe.bat` ASCII-only with CRLF line endings.
29+
- Run `tests/smoke_tests.py` before submitting.
30+
- Do not commit generated `build/`, `dist/`, virtual environments or local logs.
31+
32+
## Translation keys
33+
34+
UI strings live in the `TRANSLATIONS` dictionary inside `office_converter.py`. Every key must exist in both `RU` and `EN`; the smoke tests enforce this.

OfficeConvertorPortable.spec

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# -*- mode: python ; coding: utf-8 -*-
2+
3+
from PyInstaller.utils.hooks import collect_submodules
4+
5+
hiddenimports = [
6+
'win32com',
7+
'win32com.client',
8+
'pythoncom',
9+
'fitz',
10+
'pypdf',
11+
'PIL',
12+
'pdf2docx',
13+
]
14+
15+
for package_name in ('fitz', 'pypdf', 'PIL', 'pdf2docx'):
16+
try:
17+
hiddenimports += collect_submodules(package_name)
18+
except Exception:
19+
pass
20+
21+
22+
a = Analysis(
23+
['office_converter.py'],
24+
pathex=[],
25+
binaries=[],
26+
datas=[],
27+
hiddenimports=hiddenimports,
28+
hookspath=[],
29+
hooksconfig={},
30+
runtime_hooks=[],
31+
excludes=[],
32+
noarchive=False,
33+
optimize=0,
34+
)
35+
pyz = PYZ(a.pure)
36+
37+
exe = EXE(
38+
pyz,
39+
a.scripts,
40+
a.binaries,
41+
a.datas,
42+
[],
43+
name='OfficeConvertorPortable',
44+
debug=False,
45+
bootloader_ignore_signals=False,
46+
strip=False,
47+
upx=True,
48+
upx_exclude=[],
49+
runtime_tmpdir=None,
50+
console=False,
51+
disable_windowed_traceback=False,
52+
argv_emulation=False,
53+
target_arch=None,
54+
codesign_identity=None,
55+
entitlements_file=None,
56+
icon=None,
57+
)

README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Office Converter All-in-One
2+
3+
Offline Windows desktop utility for common office conversion tasks: Word ↔ PDF, DOC → DOCX, PDF ↔ PNG, PDF → DOCX, plus PDF merge and split.
4+
5+
[Русская версия README](README.ru.md)
6+
7+
## Features
8+
9+
- **Word → PDF** for `.doc` and `.docx` files via Microsoft Word automation.
10+
- **DOC → DOCX** conversion via Microsoft Word automation.
11+
- **PDF → DOCX** using `pdf2docx`.
12+
- **PDF → PNG** page export using PyMuPDF.
13+
- **PNG/JPG → PDF**, either one PDF per image or one merged PDF.
14+
- **PDF merge** and **PDF split** by pages or ranges.
15+
- Recursive folder search, optional overwrite, preserving subfolder structure, progress bar and operation log.
16+
- Runtime **RU / EN** interface switcher.
17+
- Offline workflow: no file uploads to online conversion services.
18+
19+
## Requirements
20+
21+
- Windows 10/11.
22+
- Python 3.10 or newer for building/running from source.
23+
- Microsoft Word is required only for Word/DOC/DOCX modes.
24+
- Internet access is needed only during the first dependency installation.
25+
26+
## Build a portable EXE on Windows
27+
28+
1. Download or clone this repository.
29+
2. Open the project folder in Windows Explorer.
30+
3. Run `build_exe.bat`.
31+
4. After a successful build, the executable will be here:
32+
33+
```text
34+
dist\OfficeConvertorPortable.exe
35+
```
36+
37+
The EXE name intentionally keeps the historical `OfficeConvertorPortable` spelling for compatibility with earlier local builds.
38+
39+
## Run from source on Windows
40+
41+
```bat
42+
py -3 -m venv .venv
43+
.venv\Scripts\python.exe -m pip install --upgrade pip setuptools wheel
44+
.venv\Scripts\python.exe -m pip install -r requirements.txt
45+
.venv\Scripts\python.exe office_converter.py
46+
```
47+
48+
## Smoke tests
49+
50+
On Windows:
51+
52+
```bat
53+
run_smoke_tests.bat
54+
```
55+
56+
Cross-platform developer check, for example in CI:
57+
58+
```bash
59+
python tests/smoke_tests.py
60+
```
61+
62+
The smoke tests cover the translated UI labels, absence of removed branding, basic path helpers, image/PDF conversion helpers, PDF merge/split and Windows batch-file line endings. Microsoft Word COM automation is not tested outside Windows with Word installed.
63+
64+
## Repository structure
65+
66+
```text
67+
office_converter.py Main Tkinter application
68+
OfficeConvertorPortable.spec PyInstaller build spec
69+
build_exe.bat Windows EXE build helper
70+
run_smoke_tests.bat Local smoke-test helper
71+
requirements.txt Runtime/build dependencies
72+
tests/smoke_tests.py Smoke tests
73+
docs/ Build, upload, release and license notes
74+
.github/workflows/smoke-tests.yml GitHub Actions smoke test
75+
```
76+
77+
## Notes and limitations
78+
79+
- Word automation requires installed Microsoft Word and runs only on Windows.
80+
- PDF → DOCX attempts to reconstruct document structure; complex layouts may not convert perfectly.
81+
- Unsigned PyInstaller binaries can trigger antivirus warnings. Build from source if you need maximum trust.
82+
- Before publishing binaries or choosing a project license, read [`docs/LICENSE_CHOICE.md`](docs/LICENSE_CHOICE.md) and [`docs/THIRD_PARTY_NOTICES.md`](docs/THIRD_PARTY_NOTICES.md), especially the PyMuPDF licensing note.
83+
84+
## License
85+
86+
A project license has not been selected yet. See [`docs/LICENSE_CHOICE.md`](docs/LICENSE_CHOICE.md) before making the repository public or attaching release binaries.

README.ru.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Офисный конвертер всего во всё
2+
3+
Офлайн-утилита для Windows с графическим интерфейсом: Word ↔ PDF, DOC → DOCX, PDF ↔ PNG, PDF → DOCX, а также слияние и разбивка PDF.
4+
5+
[English README](README.md)
6+
7+
## Возможности
8+
9+
- **Word → PDF** для `.doc` и `.docx` через автоматизацию Microsoft Word.
10+
- **DOC → DOCX** через Microsoft Word.
11+
- **PDF → DOCX** через `pdf2docx`.
12+
- **PDF → PNG** с экспортом страниц через PyMuPDF.
13+
- **PNG/JPG → PDF**: отдельный PDF на каждую картинку или один общий PDF.
14+
- **Слияние PDF** и **разбивка PDF** по страницам или диапазонам.
15+
- Поиск в подпапках, перезапись существующих файлов, сохранение структуры подпапок, прогресс и журнал операций.
16+
- Рабочий переключатель интерфейса **RU / EN** без перезапуска.
17+
- Офлайн-режим: файлы не отправляются в онлайн-конвертеры.
18+
19+
## Требования
20+
21+
- Windows 10/11.
22+
- Python 3.10 или новее для сборки/запуска из исходников.
23+
- Microsoft Word нужен только для режимов Word/DOC/DOCX.
24+
- Интернет нужен только при первой установке зависимостей.
25+
26+
## Сборка portable EXE на Windows
27+
28+
1. Скачай или склонируй репозиторий.
29+
2. Открой папку проекта в Проводнике Windows.
30+
3. Запусти `build_exe.bat`.
31+
4. После успешной сборки файл появится здесь:
32+
33+
```text
34+
dist\OfficeConvertorPortable.exe
35+
```
36+
37+
Имя EXE специально оставлено как `OfficeConvertorPortable`, чтобы не ломать совместимость с предыдущими локальными сборками.
38+
39+
## Запуск из исходников на Windows
40+
41+
```bat
42+
py -3 -m venv .venv
43+
.venv\Scripts\python.exe -m pip install --upgrade pip setuptools wheel
44+
.venv\Scripts\python.exe -m pip install -r requirements.txt
45+
.venv\Scripts\python.exe office_converter.py
46+
```
47+
48+
## Быстрые проверки
49+
50+
На Windows:
51+
52+
```bat
53+
run_smoke_tests.bat
54+
```
55+
56+
Для CI или ручной проверки в другой среде:
57+
58+
```bash
59+
python tests/smoke_tests.py
60+
```
61+
62+
Smoke-тесты проверяют перевод интерфейса, отсутствие удалённого брендинга, работу вспомогательных функций путей, базовые операции PNG/PDF, слияние/разбивку PDF и корректные переносы строк в BAT-файлах. Режимы Microsoft Word COM вне Windows с установленным Word не проверяются.
63+
64+
## Структура репозитория
65+
66+
```text
67+
office_converter.py Главное Tkinter-приложение
68+
OfficeConvertorPortable.spec Спецификация сборки PyInstaller
69+
build_exe.bat Помощник сборки EXE под Windows
70+
run_smoke_tests.bat Помощник запуска smoke-тестов
71+
docs/ Инструкции по сборке, GitHub, релизу и лицензии
72+
tests/smoke_tests.py Smoke-тесты
73+
```
74+
75+
## Важные ограничения
76+
77+
- Автоматизация Word требует установленный Microsoft Word и работает только на Windows.
78+
- PDF → DOCX восстанавливает структуру документа приблизительно; сложная вёрстка может съехать.
79+
- Неподписанные PyInstaller-сборки иногда ругает антивирус. Для максимального доверия собирай EXE из исходников.
80+
- Перед публикацией бинарников и выбором лицензии прочитай [`docs/LICENSE_CHOICE.md`](docs/LICENSE_CHOICE.md) и [`docs/THIRD_PARTY_NOTICES.md`](docs/THIRD_PARTY_NOTICES.md), особенно пункт про PyMuPDF.
81+
82+
## Лицензия
83+
84+
Лицензия проекта пока не выбрана. Перед публичной публикацией репозитория или EXE смотри [`docs/LICENSE_CHOICE.md`](docs/LICENSE_CHOICE.md).

0 commit comments

Comments
 (0)