Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.DS_Store
cleaner/__pycache__/
docx_cleaner/__pycache__/*
staticfiles
__pycache__/
staticfiles/
.env
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pip install -r requirements.txt

### 3. Run the development server
```bash
python manage.py collectstatic --no-input
python manage.py runserver
```

Expand All @@ -33,3 +34,25 @@ Go to: http://127.0.0.1:8000
- English paragraphs are removed
- Short paragraphs under ~20 characters are kept (too short to detect reliably)
- Download the cleaned file


## Render

The app is served on Render web service.

If you need to reproduce the creation, you need in `.env`:

```
SECRET_KEY=replace-this-with-a-random-secret-key
DEBUG=False
ALLOWED_HOSTS=.onrender.com,localhost,127.0.0.1
CSRF_TRUSTED_ORIGINS=https://*.onrender.com
```

You can create the key by:
```
python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
```

- The build command:`./build.sh`
- Start command=: `gunicorn docx_cleaner.wsgi:application`
Binary file added cleaner/static/cleaner/favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions cleaner/templates/cleaner/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{% load static %}

<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" href="{% static 'cleaner/favicon.ico' %}" type="image/x-icon">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>DocX English Remover</title>
Expand Down
Loading