Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ jobs:
run: |
python -m pip install -U pip
pip install -e ".[dev]"
- name: Ruff
- name: Ruff check
run: ruff check src tests
- name: Pytest
run: pytest -q
- name: Ruff format
run: ruff format --check src tests
- name: Pytest with coverage
run: pytest --cov=src --cov-report=xml --cov-report=term
- name: Upload coverage
if: ${{ matrix.python-version == '3.12' }}
uses: codecov/codecov-action@v5
with:
file: ./coverage.xml
fail_ci_if_error: false
66 changes: 66 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Contributing to BloggerEasy

Thank you for your interest in contributing to BloggerEasy — a tool for converting blogs and URLs into clean, well-formatted Markdown or HTML.

## Getting Started

1. **Fork** the repository on GitHub.
2. **Clone** your fork:
```bash
git clone https://github.com/YOUR_USERNAME/BloggerEasy.git
cd BloggerEasy
```
3. **Set up a development environment:**
```bash
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"
```

## Good First Issues

If you're new to the project, look for issues tagged with `good-first-issue` in the [issue tracker](https://github.com/mergeos-bounties/BloggerEasy/issues). These are well-scoped tasks that help you get familiar with the codebase.

## How to Contribute

- **Report bugs** by opening a GitHub Issue.
- **Suggest features** by opening a GitHub Issue with the `enhancement` label.
- **Improve documentation** — corrections, clarifications, and examples are always welcome.
- **Submit code** via a Pull Request.

## Development Workflow

1. Create a feature branch from `master`:
```bash
git checkout -b feat/my-feature
```
2. Make your changes.
3. Run linting and tests:
```bash
ruff check src tests
pytest
```
4. Commit with a clear message:
```
feat: add support for WordPress import
```
5. Push to your fork and open a Pull Request against `master`.
6. Link any related issues in the PR description using `Closes #N`.

## Code Style

- Follow PEP 8 conventions.
- Run `ruff check` before committing — the CI enforces it.
- Write tests for new functionality.

## Pull Request Checklist

- [ ] Code follows project style (ruff passes)
- [ ] Tests added / updated for new functionality
- [ ] All existing tests pass
- [ ] Documentation updated if needed
- [ ] PR description references related issues

## Need Help?

Open a [Discussion](https://github.com/mergeos-bounties/BloggerEasy/discussions) or ask in the relevant issue.
99 changes: 99 additions & 0 deletions docs/howto-import-blogger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# HOWTO: Import generated XML into Blogger

> Detailed guide for uploading a **BloggerEasy**-generated XML theme to your Blogger blog.

---

## Overview

BloggerEasy produces a **Blogger XML theme file** that contains layout, CSS skin, sections, and widgets. To use it, you upload the `.xml` file via Blogger's **Theme → Restore** feature.

---

## Prerequisites

- A [Blogger](https://www.blogger.com/) blog (any template style)
- A generated `.xml` file from BloggerEasy (default output: `data/out/`)

---

## Step-by-step

### 1. Generate your XML

If you haven't already:

**GUI mode (recommended):**

```powershell
bloggereasy-gui
```
Load a URL or image → click **Generate** → save the `.xml`.

**CLI mode:**

```powershell
bloggereasy demo # offline batch with sample XML
bloggereasy url "https://example.com" --out my-theme.xml
```

The generated XML is typically saved to `data/out/` unless you specified `--out`.

### 2. Open Blogger

Go to [https://www.blogger.com/](https://www.blogger.com/) and sign in with your Google account.

### 3. Navigate to Theme

1. Select your blog from the dashboard.
2. In the left sidebar, click **Theme**.

### 4. Backup your current theme

> **Always back up** before restoring — you cannot undo a restore.

1. Click the **⋮** (three dots) menu next to "Customize".
2. Select **Backup**.
3. Save the downloaded `.xml` file somewhere safe.

### 5. Upload the BloggerEasy XML

1. Still on the **Theme** page, click the **⋮** menu again.
2. Select **Restore** (or **Upload** depending on Blogger version).
3. Choose the `.xml` file generated by BloggerEasy.
4. Confirm the upload when prompted.

### 6. Verify and tweak

1. Your blog's theme is now applied — layout, CSS, and widgets are in place.
2. Click **Preview** to check how it looks.
3. Use **Customize** (in Theme view) to fine-tune colors, widths, or widget positions.
4. Click **Apply to Blog** when satisfied.

---

## Troubleshooting

| Problem | Solution |
| --- | --- |
| **"Invalid XML"** error | Ensure the file is a valid Blogger XML. Re-run `bloggereasy` — the XML is validated before export. |
| **Layout looks broken** | Some widgets may need manual repositioning. Go to **Theme → Customize → Layout** and drag widgets. |
| **CSS not applying** | Check that the `<b:skin>` section in your XML contains the CSS. Open the XML in a text editor to verify. |
| **Upload button is greyed out** | Some Blogger templates restrict uploads. Switch to a basic template first, then restore. |
| **Theme partially applies** | Different Blogger versions handle widget IDs differently. Regenerate with `--version v2` if needed. |

---

## Tips

- **Test on a private blog first.** Create an unlisted Blogger blog to preview the theme before publishing on your main blog.
- **Keep a local copy** of the generated XML — you can re-upload it anytime from Blogger's Theme page.
- **Combine with backup**: use the backed-up XML from step 4 as a fallback if the new theme needs adjustments.

---

## See also

- [README](../README.md) — full project docs
- [CLI reference](../README.md#cli-reference)
- [Templates & samples](../README.md#templates--samples)
Loading