Skip to content

Commit 2cb5eab

Browse files
committed
chore: add GitHub release setup (LICENSE, CHANGELOG, CONTRIBUTING, Actions workflow)
1 parent 9e010d4 commit 2cb5eab

File tree

7 files changed

+266
-92
lines changed

7 files changed

+266
-92
lines changed

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build & Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*' # triggers on version tags like v1.0.0
7+
8+
jobs:
9+
build-and-release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write # needed to create GitHub Releases
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Build extension
28+
run: npm run build
29+
30+
- name: Package extension zip
31+
run: |
32+
VERSION=${GITHUB_REF_NAME}
33+
ZIP_NAME="md-export-${VERSION}.zip"
34+
zip -r "$ZIP_NAME" dist/ popup/ icons/ manifest.json
35+
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV
36+
echo "VERSION=$VERSION" >> $GITHUB_ENV
37+
38+
- name: Create GitHub Release
39+
uses: softprops/action-gh-release@v2
40+
with:
41+
name: "MD-Export ${{ env.VERSION }}"
42+
body: |
43+
## MD-Export ${{ env.VERSION }}
44+
45+
### Installation
46+
1. Download `${{ env.ZIP_NAME }}` below
47+
2. Unzip it anywhere on your computer
48+
3. Open Chrome → `chrome://extensions/`
49+
4. Enable **Developer mode** (top-right toggle)
50+
5. Click **Load unpacked** → select the unzipped folder
51+
52+
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for what's new.
53+
files: ${{ env.ZIP_NAME }}
54+
draft: false
55+
prerelease: ${{ contains(github.ref_name, '-') }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ node_modules/
33

44
# Build output
55
dist/
6+
*.zip
67

78
# OS specific
89
.DS_Store

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Changelog
2+
3+
All notable changes to MD-Export will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
---
9+
10+
## [1.0.0] – 2026-02-24
11+
12+
### Added
13+
14+
- **Multi-platform scraping** – ChatGPT, Claude, Gemini, and Grok (grok.com + x.com)
15+
- **Three export formats** – Markdown (`.md`), DOCX (`.docx`), and PDF (`.pdf`)
16+
- **Popup UI** – One-click export via the extension toolbar icon
17+
- **In-page overlay panel** – Floating "Export Chat" FAB button injects into every supported page
18+
- Slide-in panel with message checklist (select all / none / you only / AI only / first & last 10)
19+
- Per-message export buttons for exporting from a specific point onwards
20+
- Format picker (Markdown / DOCX / PDF) inside the panel
21+
- **Formatting preservation** – Code blocks, lists, tables, bold/italic across all export formats
22+
- **MutationObserver** – Overlay stays alive across SPA navigation (no page reload needed)
23+
- **Webpack 5 build pipeline** – Separate bundles for each content script + overlay + background worker

CONTRIBUTING.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Contributing to MD-Export
2+
3+
Thanks for taking the time to contribute! 🎉
4+
5+
## Getting Started
6+
7+
1. **Fork** the repository and clone your fork:
8+
```bash
9+
git clone https://github.com/<your-username>/MD-Export.git
10+
cd MD-Export
11+
```
12+
13+
2. **Install dependencies:**
14+
```bash
15+
npm install
16+
```
17+
18+
3. **Start the dev build** (rebuilds on file save):
19+
```bash
20+
npm run dev
21+
```
22+
23+
4. **Load the extension in Chrome:**
24+
- Go to `chrome://extensions/`
25+
- Enable **Developer mode**
26+
- Click **Load unpacked** → select the `MD-Export` folder
27+
28+
## Project Layout
29+
30+
```
31+
src/
32+
├── background/ # Service worker (handles export requests)
33+
├── content/ # Per-site scrapers + overlay UI
34+
│ ├── base_scraper.js # Shared helpers (cleanHtml, htmlToMarkdown)
35+
│ ├── chatgpt.js
36+
│ ├── claude.js
37+
│ ├── gemini.js
38+
│ ├── grok.js
39+
│ └── overlay.js # In-page FAB + selection panel
40+
├── exporters/ # markdown.js · docx.js · pdf.js
41+
├── pipeline/ # Content pre-processing utilities
42+
└── popup/ # Toolbar popup UI
43+
```
44+
45+
## Adding a New Platform
46+
47+
1. Create `src/content/<platform>.js` — implement and export `scrapeConversation()` (see `chatgpt.js` as a reference).
48+
2. Add the new entry point to **`webpack.config.js`** in the `content` configuration.
49+
3. Add the content script entry to **`manifest.json`** under `content_scripts`.
50+
4. Add the site config block to the `SITE_CONFIG` map in **`src/content/overlay.js`**.
51+
52+
## Pull Request Checklist
53+
54+
- [ ] Runs `npm run build` without errors
55+
- [ ] Tested on the target platform manually
56+
- [ ] PR description explains what changed and why
57+
- [ ] `CHANGELOG.md` entry added under `[Unreleased]`
58+
59+
## Reporting Bugs
60+
61+
Open an issue with:
62+
- The AI platform URL where the bug occurs
63+
- Steps to reproduce
64+
- What you expected vs. what happened
65+
- Browser version and extension version

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Yadnesh Teli
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)