propongo 1.3.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. propongo-1.3.4/PKG-INFO +240 -0
  2. propongo-1.3.4/README.md +209 -0
  3. propongo-1.3.4/app/__init__.py +1 -0
  4. propongo-1.3.4/app/config.py +43 -0
  5. propongo-1.3.4/app/export.py +484 -0
  6. propongo-1.3.4/app/main.py +1041 -0
  7. propongo-1.3.4/app/models.py +201 -0
  8. propongo-1.3.4/app/snippets/deliverables.json +32 -0
  9. propongo-1.3.4/app/snippets/organization.json +26 -0
  10. propongo-1.3.4/app/snippets.py +156 -0
  11. propongo-1.3.4/app/static/css/style.css +1359 -0
  12. propongo-1.3.4/app/static/js/app.js +712 -0
  13. propongo-1.3.4/app/static/js/budget.js +352 -0
  14. propongo-1.3.4/app/static/js/gantt.js +519 -0
  15. propongo-1.3.4/app/static/js/snippets.js +181 -0
  16. propongo-1.3.4/app/static/js/tracker.js +152 -0
  17. propongo-1.3.4/app/templates/base.html +171 -0
  18. propongo-1.3.4/app/templates/budget.html +113 -0
  19. propongo-1.3.4/app/templates/custom_sections.html +105 -0
  20. propongo-1.3.4/app/templates/export_proposal.html +354 -0
  21. propongo-1.3.4/app/templates/export_tracker.html +254 -0
  22. propongo-1.3.4/app/templates/index.html +53 -0
  23. propongo-1.3.4/app/templates/preview.html +178 -0
  24. propongo-1.3.4/app/templates/qualifications.html +17 -0
  25. propongo-1.3.4/app/templates/scope.html +85 -0
  26. propongo-1.3.4/app/templates/templates.html +56 -0
  27. propongo-1.3.4/app/templates/timeline.html +190 -0
  28. propongo-1.3.4/app/templates/tracker.html +226 -0
  29. propongo-1.3.4/app/utils.py +257 -0
  30. propongo-1.3.4/propongo.egg-info/PKG-INFO +240 -0
  31. propongo-1.3.4/propongo.egg-info/SOURCES.txt +37 -0
  32. propongo-1.3.4/propongo.egg-info/dependency_links.txt +1 -0
  33. propongo-1.3.4/propongo.egg-info/entry_points.txt +2 -0
  34. propongo-1.3.4/propongo.egg-info/requires.txt +13 -0
  35. propongo-1.3.4/propongo.egg-info/top_level.txt +1 -0
  36. propongo-1.3.4/pyproject.toml +57 -0
  37. propongo-1.3.4/setup.cfg +4 -0
  38. propongo-1.3.4/tests/test_export.py +105 -0
  39. propongo-1.3.4/tests/test_main.py +190 -0
@@ -0,0 +1,240 @@
1
+ Metadata-Version: 2.4
2
+ Name: propongo
3
+ Version: 1.3.4
4
+ Summary: A local proposal generator for conservation and natural resource projects
5
+ Author: VR Conservation
6
+ License: MIT
7
+ Project-URL: Repository, https://github.com/VRConservation/propongo
8
+ Keywords: proposal,generator,conservation,budget,scope
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Topic :: Office/Business
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: flask>=3.0
20
+ Requires-Dist: weasyprint>=60.0
21
+ Requires-Dist: markdown>=3.5
22
+ Requires-Dist: python-docx>=1.0
23
+ Requires-Dist: pandas>=2.0
24
+ Requires-Dist: openpyxl>=3.0
25
+ Requires-Dist: tabulate>=0.9
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=7.0; extra == "dev"
28
+ Requires-Dist: bump2version>=1.0; extra == "dev"
29
+ Requires-Dist: twine>=5.0; extra == "dev"
30
+ Requires-Dist: build>=1.0; extra == "dev"
31
+
32
+ # Propongo
33
+ A proposal generator for conservation and natural resource projects. Create professional proposals with scope of work, budgets, qualifications, timelines, and export to PDF or HTML. Detailed documentation, examples, and tutorials can be found at https://3point.xyz/propongo.
34
+
35
+ ## Features
36
+
37
+ - **Scope of Work** - Define project summary, tasks, and deliverables
38
+ - **Budget** - Line-item budgeting with cost/unit calculations, totals, and indirect costs
39
+ - **Qualifications** - Document team background and relevant experience
40
+ - **Timeline** - Auto-derived task timing from budget items with Gantt chart visualization
41
+ - **Custom Sections** - Add unlimited custom sections with Markdown formatting (NEW!)
42
+ - **Excel Import** - Import Excel spreadsheets as formatted tables into custom sections (NEW!)
43
+ - **Preview** - View the complete proposal with task-grouped budget and timeline bars
44
+ - **PDF Export** - Clean, professional PDF output via WeasyPrint
45
+ - **HTML Export** - Standalone HTML file with embedded styles
46
+ - **Snippet Library** - Reusable markdown components for organization descriptions, deliverable templates, and custom content
47
+ - **Save/Load** - Proposals stored as JSON files on disk, auto-save as you work
48
+ - **Project tracking** - When proposals is secured, using the tracking feature to manage project deliverables, timeline, and budget spend.
49
+
50
+ ## Quick Start
51
+
52
+ ### Install from PyPI (Linux/Mac)
53
+
54
+ ```bash
55
+ pip install propongo
56
+ propongo
57
+ ```
58
+
59
+ Opens at [http://localhost:5000](http://localhost:5000)
60
+
61
+ ### Windows Installation
62
+
63
+ **Recommended:** Use a virtual environment to avoid conflicts with system Python.
64
+
65
+ 1. **Create virtual environment with Anaconda/Miniconda** (recommended)
66
+ ```powershell
67
+ # Install Miniconda from: https://docs.conda.io/en/latest/miniconda.html
68
+ conda create -n propongo python=3.10
69
+ conda activate propongo
70
+ ```
71
+
72
+ ⚠️ **Warning:** Installing to base Python can cause package conflicts. [Learn about Anaconda/Miniconda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) for better Python environment management.
73
+
74
+ 2. **Install GTK3 Runtime** (for MS Windows users: required for PDF export)
75
+ - Download: https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases/
76
+ - Run installer, choose "Full installation"
77
+ - Restart your computer
78
+
79
+ 3. **Install Propongo**
80
+ ```powershell
81
+ pip install propongo
82
+ ```
83
+
84
+ 4. **Run the application**
85
+ ```powershell
86
+ propongo
87
+ ```
88
+
89
+ 5. **Open browser** to http://localhost:5000
90
+
91
+ **Troubleshooting:** If PDF export fails, ensure GTK3 is in your PATH. If Excel import doesn't work, run: `pip install pandas openpyxl tabulate`
92
+
93
+ ### Install from source
94
+
95
+ ```bash
96
+ git clone https://github.com/VRConservation/propongo.git
97
+ cd propongo
98
+ pip install -e .
99
+ propongo
100
+ ```
101
+
102
+ ### Development setup
103
+
104
+ ```bash
105
+ git clone https://github.com/VRConservation/propongo.git
106
+ cd propongo
107
+ pip install -e ".[dev]"
108
+ python run.py
109
+ ```
110
+
111
+ ## Usage
112
+
113
+ ### Creating a Proposal
114
+
115
+ 1. Click **New Proposal** from the dashboard
116
+ 2. Enter a title and optional client name in the header
117
+ 3. Work through each tab:
118
+
119
+ **Scope** - Add a project summary, then create tasks/deliverables with descriptions and a lead entity
120
+
121
+ **Budget** - Select a task, enter line items with cost per unit and quantities. Totals and indirect costs calculate automatically.
122
+
123
+ **Qualifications** - Describe your organization's background and why you're qualified for this project
124
+
125
+ **Timeline** - Set project start date and view the auto-derived Gantt chart. Adjust budget item timing and lead entities as needed.
126
+
127
+ **Custom Sections** - Add unlimited custom sections with Markdown formatting. Import Excel spreadsheets as formatted tables.
128
+
129
+ **Preview** - Review the complete proposal with task-grouped budget and timeline before exporting
130
+
131
+ ### Using Custom Sections (NEW!)
132
+
133
+ Add custom sections to your proposal for any additional content:
134
+
135
+ 1. Click the **Custom Sections** tab
136
+ 2. Click **+ Add Section** to create a new section
137
+ 3. Enter a title and content using Markdown formatting
138
+ 4. See a live preview of your formatted content
139
+ 5. Use ↑ and ↓ buttons to reorder sections
140
+ 6. Click **📊 Import Excel** to import spreadsheet data as tables
141
+
142
+ **Excel Import:** Import `.xlsx` or `.xls` files and they'll be automatically converted to Markdown tables. Perfect for budget details, personnel lists, equipment inventories, or any tabular data.
143
+
144
+ ### Using Snippets
145
+
146
+ Click the sidebar icon (☰) to open the snippet library:
147
+
148
+ - **Organization** - Pre-written organization descriptions
149
+ - **Deliverables** - Templates for common deliverable types (surveys, assessments, plans)
150
+ - **Custom** - Create and save your own reusable snippets
151
+
152
+ Click a snippet to insert it at the cursor position in any text field.
153
+
154
+ ### Exporting
155
+
156
+ - **PDF** - Click "Export PDF" to generate a clean, professional PDF document
157
+ - **HTML** - Click "Export HTML" to download a standalone HTML file
158
+ - **Print** - Use Ctrl+P / Cmd+P in the Preview tab for browser printing
159
+
160
+ ### Managing Proposals
161
+
162
+ - Proposals auto-save as you work
163
+ - Click "Proposals" in the header to see all saved proposals
164
+ - Create, edit, or delete proposals from the dashboard
165
+
166
+ ## Updating
167
+
168
+ ### From PyPI
169
+
170
+ ```bash
171
+ pip install --upgrade propongo
172
+ ```
173
+
174
+ ### From source
175
+
176
+ ```bash
177
+ cd propongo
178
+ git pull
179
+ pip install -e .
180
+ ```
181
+
182
+ ## Development
183
+
184
+ ### Run tests
185
+
186
+ ```bash
187
+ pytest
188
+ ```
189
+
190
+ ## Project Structure
191
+
192
+ ```
193
+ propongo/
194
+ ├── run.py # Dev entry point
195
+ ├── pyproject.toml # Package config
196
+ ├── requirements.txt # Dependencies
197
+ ├── app/
198
+ │ ├── __init__.py # Version
199
+ │ ├── main.py # Flask app + routes
200
+ │ ├── models.py # Proposal data model
201
+ │ ├── export.py # PDF/HTML export
202
+ │ ├── snippets.py # Snippet management
203
+ │ ├── templates/ # Jinja2 templates
204
+ │ │ ├── base.html # Layout + HTMX
205
+ │ │ ├── index.html # Proposal dashboard
206
+ │ │ ├── scope.html # Scope editor
207
+ │ │ ├── budget.html # Budget editor
208
+ │ │ ├── qualifications.html # Qualifications editor
209
+ │ │ ├── timeline.html # Timeline + Gantt
210
+ │ │ ├── preview.html # Proposal preview
211
+ │ │ └── export_proposal.html# PDF export template
212
+ │ ├── static/
213
+ │ │ ├── css/style.css # All styles
214
+ │ │ └── js/
215
+ │ │ ├── app.js # Core JS + HTMX helpers
216
+ │ │ ├── budget.js # Budget calculations
217
+ │ │ ├── gantt.js # Gantt chart rendering
218
+ │ │ └── snippets.js # Snippet panel logic
219
+ │ ├── snippets/ # Stock snippet data
220
+ │ │ ├── organization.json
221
+ │ │ ├── deliverables.json
222
+ │ │ └── custom/ # User-created snippets
223
+ │ └── data/
224
+ │ ├── proposals/ # Saved proposals (JSON)
225
+ │ └── exports/ # Generated PDF/HTML exports
226
+ └── tests/
227
+ ├── test_main.py
228
+ └── test_export.py
229
+ ```
230
+
231
+ ## Tech Stack
232
+
233
+ - **Backend:** Python, Flask
234
+ - **Frontend:** HTMX, Jinja2, vanilla CSS/JS
235
+ - **PDF Export:** WeasyPrint
236
+ - **Packaging:** pyproject.toml, setuptools
237
+
238
+ ## License
239
+
240
+ MIT
@@ -0,0 +1,209 @@
1
+ # Propongo
2
+ A proposal generator for conservation and natural resource projects. Create professional proposals with scope of work, budgets, qualifications, timelines, and export to PDF or HTML. Detailed documentation, examples, and tutorials can be found at https://3point.xyz/propongo.
3
+
4
+ ## Features
5
+
6
+ - **Scope of Work** - Define project summary, tasks, and deliverables
7
+ - **Budget** - Line-item budgeting with cost/unit calculations, totals, and indirect costs
8
+ - **Qualifications** - Document team background and relevant experience
9
+ - **Timeline** - Auto-derived task timing from budget items with Gantt chart visualization
10
+ - **Custom Sections** - Add unlimited custom sections with Markdown formatting (NEW!)
11
+ - **Excel Import** - Import Excel spreadsheets as formatted tables into custom sections (NEW!)
12
+ - **Preview** - View the complete proposal with task-grouped budget and timeline bars
13
+ - **PDF Export** - Clean, professional PDF output via WeasyPrint
14
+ - **HTML Export** - Standalone HTML file with embedded styles
15
+ - **Snippet Library** - Reusable markdown components for organization descriptions, deliverable templates, and custom content
16
+ - **Save/Load** - Proposals stored as JSON files on disk, auto-save as you work
17
+ - **Project tracking** - When proposals is secured, using the tracking feature to manage project deliverables, timeline, and budget spend.
18
+
19
+ ## Quick Start
20
+
21
+ ### Install from PyPI (Linux/Mac)
22
+
23
+ ```bash
24
+ pip install propongo
25
+ propongo
26
+ ```
27
+
28
+ Opens at [http://localhost:5000](http://localhost:5000)
29
+
30
+ ### Windows Installation
31
+
32
+ **Recommended:** Use a virtual environment to avoid conflicts with system Python.
33
+
34
+ 1. **Create virtual environment with Anaconda/Miniconda** (recommended)
35
+ ```powershell
36
+ # Install Miniconda from: https://docs.conda.io/en/latest/miniconda.html
37
+ conda create -n propongo python=3.10
38
+ conda activate propongo
39
+ ```
40
+
41
+ ⚠️ **Warning:** Installing to base Python can cause package conflicts. [Learn about Anaconda/Miniconda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) for better Python environment management.
42
+
43
+ 2. **Install GTK3 Runtime** (for MS Windows users: required for PDF export)
44
+ - Download: https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases/
45
+ - Run installer, choose "Full installation"
46
+ - Restart your computer
47
+
48
+ 3. **Install Propongo**
49
+ ```powershell
50
+ pip install propongo
51
+ ```
52
+
53
+ 4. **Run the application**
54
+ ```powershell
55
+ propongo
56
+ ```
57
+
58
+ 5. **Open browser** to http://localhost:5000
59
+
60
+ **Troubleshooting:** If PDF export fails, ensure GTK3 is in your PATH. If Excel import doesn't work, run: `pip install pandas openpyxl tabulate`
61
+
62
+ ### Install from source
63
+
64
+ ```bash
65
+ git clone https://github.com/VRConservation/propongo.git
66
+ cd propongo
67
+ pip install -e .
68
+ propongo
69
+ ```
70
+
71
+ ### Development setup
72
+
73
+ ```bash
74
+ git clone https://github.com/VRConservation/propongo.git
75
+ cd propongo
76
+ pip install -e ".[dev]"
77
+ python run.py
78
+ ```
79
+
80
+ ## Usage
81
+
82
+ ### Creating a Proposal
83
+
84
+ 1. Click **New Proposal** from the dashboard
85
+ 2. Enter a title and optional client name in the header
86
+ 3. Work through each tab:
87
+
88
+ **Scope** - Add a project summary, then create tasks/deliverables with descriptions and a lead entity
89
+
90
+ **Budget** - Select a task, enter line items with cost per unit and quantities. Totals and indirect costs calculate automatically.
91
+
92
+ **Qualifications** - Describe your organization's background and why you're qualified for this project
93
+
94
+ **Timeline** - Set project start date and view the auto-derived Gantt chart. Adjust budget item timing and lead entities as needed.
95
+
96
+ **Custom Sections** - Add unlimited custom sections with Markdown formatting. Import Excel spreadsheets as formatted tables.
97
+
98
+ **Preview** - Review the complete proposal with task-grouped budget and timeline before exporting
99
+
100
+ ### Using Custom Sections (NEW!)
101
+
102
+ Add custom sections to your proposal for any additional content:
103
+
104
+ 1. Click the **Custom Sections** tab
105
+ 2. Click **+ Add Section** to create a new section
106
+ 3. Enter a title and content using Markdown formatting
107
+ 4. See a live preview of your formatted content
108
+ 5. Use ↑ and ↓ buttons to reorder sections
109
+ 6. Click **📊 Import Excel** to import spreadsheet data as tables
110
+
111
+ **Excel Import:** Import `.xlsx` or `.xls` files and they'll be automatically converted to Markdown tables. Perfect for budget details, personnel lists, equipment inventories, or any tabular data.
112
+
113
+ ### Using Snippets
114
+
115
+ Click the sidebar icon (☰) to open the snippet library:
116
+
117
+ - **Organization** - Pre-written organization descriptions
118
+ - **Deliverables** - Templates for common deliverable types (surveys, assessments, plans)
119
+ - **Custom** - Create and save your own reusable snippets
120
+
121
+ Click a snippet to insert it at the cursor position in any text field.
122
+
123
+ ### Exporting
124
+
125
+ - **PDF** - Click "Export PDF" to generate a clean, professional PDF document
126
+ - **HTML** - Click "Export HTML" to download a standalone HTML file
127
+ - **Print** - Use Ctrl+P / Cmd+P in the Preview tab for browser printing
128
+
129
+ ### Managing Proposals
130
+
131
+ - Proposals auto-save as you work
132
+ - Click "Proposals" in the header to see all saved proposals
133
+ - Create, edit, or delete proposals from the dashboard
134
+
135
+ ## Updating
136
+
137
+ ### From PyPI
138
+
139
+ ```bash
140
+ pip install --upgrade propongo
141
+ ```
142
+
143
+ ### From source
144
+
145
+ ```bash
146
+ cd propongo
147
+ git pull
148
+ pip install -e .
149
+ ```
150
+
151
+ ## Development
152
+
153
+ ### Run tests
154
+
155
+ ```bash
156
+ pytest
157
+ ```
158
+
159
+ ## Project Structure
160
+
161
+ ```
162
+ propongo/
163
+ ├── run.py # Dev entry point
164
+ ├── pyproject.toml # Package config
165
+ ├── requirements.txt # Dependencies
166
+ ├── app/
167
+ │ ├── __init__.py # Version
168
+ │ ├── main.py # Flask app + routes
169
+ │ ├── models.py # Proposal data model
170
+ │ ├── export.py # PDF/HTML export
171
+ │ ├── snippets.py # Snippet management
172
+ │ ├── templates/ # Jinja2 templates
173
+ │ │ ├── base.html # Layout + HTMX
174
+ │ │ ├── index.html # Proposal dashboard
175
+ │ │ ├── scope.html # Scope editor
176
+ │ │ ├── budget.html # Budget editor
177
+ │ │ ├── qualifications.html # Qualifications editor
178
+ │ │ ├── timeline.html # Timeline + Gantt
179
+ │ │ ├── preview.html # Proposal preview
180
+ │ │ └── export_proposal.html# PDF export template
181
+ │ ├── static/
182
+ │ │ ├── css/style.css # All styles
183
+ │ │ └── js/
184
+ │ │ ├── app.js # Core JS + HTMX helpers
185
+ │ │ ├── budget.js # Budget calculations
186
+ │ │ ├── gantt.js # Gantt chart rendering
187
+ │ │ └── snippets.js # Snippet panel logic
188
+ │ ├── snippets/ # Stock snippet data
189
+ │ │ ├── organization.json
190
+ │ │ ├── deliverables.json
191
+ │ │ └── custom/ # User-created snippets
192
+ │ └── data/
193
+ │ ├── proposals/ # Saved proposals (JSON)
194
+ │ └── exports/ # Generated PDF/HTML exports
195
+ └── tests/
196
+ ├── test_main.py
197
+ └── test_export.py
198
+ ```
199
+
200
+ ## Tech Stack
201
+
202
+ - **Backend:** Python, Flask
203
+ - **Frontend:** HTMX, Jinja2, vanilla CSS/JS
204
+ - **PDF Export:** WeasyPrint
205
+ - **Packaging:** pyproject.toml, setuptools
206
+
207
+ ## License
208
+
209
+ MIT
@@ -0,0 +1 @@
1
+ __version__ = "1.3.4"
@@ -0,0 +1,43 @@
1
+ """Configuration settings for Propongo."""
2
+
3
+ import os
4
+ import sys
5
+
6
+
7
+ class Config:
8
+ """Application configuration."""
9
+
10
+ # Server settings
11
+ HOST = os.environ.get('HOST', '0.0.0.0')
12
+ PORT = int(os.environ.get('PORT', 5000))
13
+ DEBUG = os.environ.get('DEBUG', 'True').lower() in ('true', '1', 'yes')
14
+
15
+ # Security
16
+ SECRET_KEY = os.environ.get('FLASK_SECRET_KEY', os.urandom(24).hex())
17
+
18
+ # File paths
19
+ if sys.platform == "win32":
20
+ DATA_DIR = os.path.join(os.path.expanduser("~"), "Documents", "Propongo")
21
+ else:
22
+ DATA_DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data')
23
+ PROPOSALS_DIR = os.path.join(DATA_DIR, 'proposals')
24
+ EXPORTS_DIR = os.path.join(DATA_DIR, 'exports')
25
+
26
+ # Logging
27
+ LOG_LEVEL = os.environ.get('LOG_LEVEL', 'INFO')
28
+
29
+
30
+ # Error messages
31
+ ERROR_MESSAGES = {
32
+ 'PROPOSAL_NOT_FOUND': {'error': 'Proposal not found'},
33
+ 'SECTION_NOT_FOUND': {'error': 'Section not found'},
34
+ 'TASK_NOT_FOUND': {'error': 'Task not found'},
35
+ 'BUDGET_ITEM_NOT_FOUND': {'error': 'Budget item not found'},
36
+ 'NO_DATA': {'error': 'No data provided'},
37
+ 'NO_FILE': {'error': 'No file provided'},
38
+ 'INVALID_FILE_TYPE': {'error': 'Invalid file type'},
39
+ 'INVALID_NUMERIC': {'error': 'Invalid numeric value'},
40
+ 'EXCEL_NOT_INSTALLED': {'error': 'Excel support not installed. Install pandas and openpyxl.'},
41
+ 'EXCEL_INVALID_FILE': {'error': 'Invalid Excel file'},
42
+ 'EXCEL_PROCESSING_ERROR': {'error': 'Failed to process Excel file'},
43
+ }