gformbot 0.4.2__tar.gz → 0.4.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 (55) hide show
  1. {gformbot-0.4.2 → gformbot-0.4.4}/CHANGELOG.md +25 -0
  2. {gformbot-0.4.2 → gformbot-0.4.4}/PKG-INFO +18 -13
  3. {gformbot-0.4.2 → gformbot-0.4.4}/README.md +17 -12
  4. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/__init__.py +1 -1
  5. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/ai.py +231 -42
  6. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/ai_context.py +12 -19
  7. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/ai_draft.py +136 -32
  8. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/ai_partition.py +191 -89
  9. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/chatgpt_http.py +92 -4
  10. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/cli.py +684 -291
  11. gformbot-0.4.4/gformbot/csv_prompt.py +116 -0
  12. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/editor.html +72 -20
  13. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/editor.py +40 -32
  14. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/execution.py +39 -11
  15. gformbot-0.4.4/gformbot/followups.py +238 -0
  16. gformbot-0.4.4/gformbot/generation.py +650 -0
  17. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/generation_contacts.py +2 -1
  18. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/generation_quality.py +75 -7
  19. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/generation_review.py +22 -11
  20. gformbot-0.4.4/gformbot/generation_timing.py +117 -0
  21. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/generator.py +55 -18
  22. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/inspector.py +24 -8
  23. gformbot-0.4.4/gformbot/media.py +236 -0
  24. gformbot-0.4.4/gformbot/media_navigation.py +344 -0
  25. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/routing.py +25 -3
  26. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/state.py +21 -12
  27. gformbot-0.4.4/gformbot/terminal.py +279 -0
  28. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot.egg-info/PKG-INFO +18 -13
  29. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot.egg-info/SOURCES.txt +3 -0
  30. {gformbot-0.4.2 → gformbot-0.4.4}/pyproject.toml +1 -1
  31. gformbot-0.4.2/gformbot/followups.py +0 -187
  32. gformbot-0.4.2/gformbot/generation.py +0 -417
  33. gformbot-0.4.2/gformbot/media.py +0 -92
  34. gformbot-0.4.2/gformbot/terminal.py +0 -93
  35. {gformbot-0.4.2 → gformbot-0.4.4}/LICENSE +0 -0
  36. {gformbot-0.4.2 → gformbot-0.4.4}/LICENSE-chatgpt-protocol +0 -0
  37. {gformbot-0.4.2 → gformbot-0.4.4}/MANIFEST.in +0 -0
  38. {gformbot-0.4.2 → gformbot-0.4.4}/SECURITY.md +0 -0
  39. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/__main__.py +0 -0
  40. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/access.py +0 -0
  41. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/answers.py +0 -0
  42. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/artifacts.py +0 -0
  43. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/config.py +0 -0
  44. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/grids.py +0 -0
  45. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/locking.py +0 -0
  46. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/logger.py +0 -0
  47. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/patterns.py +0 -0
  48. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/previews.py +0 -0
  49. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/transport.py +0 -0
  50. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot/validation.py +0 -0
  51. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot.egg-info/dependency_links.txt +0 -0
  52. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot.egg-info/entry_points.txt +0 -0
  53. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot.egg-info/requires.txt +0 -0
  54. {gformbot-0.4.2 → gformbot-0.4.4}/gformbot.egg-info/top_level.txt +0 -0
  55. {gformbot-0.4.2 → gformbot-0.4.4}/setup.cfg +0 -0
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.4
4
+
5
+ - Quick submit uses the same preparation and checks as the normal wizard, then sends the full batch automatically. Both wizards accept a pasted CSV path or the file picker.
6
+ - Show the current AI stage and elapsed time while waiting. Repair missing fields without regenerating independently valid answers or changing a verified route.
7
+ - Reject CSVs with no matching columns before showing a mapping table. Random answers without AI use routes that can be completed with the available choices.
8
+ - Use my own answers can copy a prompt for creating the form's CSV.
9
+ - Rename the recovery menu to Continue batches.
10
+ - Use question-number media observations across AI workflows, and keep CSV-guided random answers on the selected route.
11
+ - Load media links in the background and open them with a single click in supported terminals.
12
+ - Clear keypresses queued during work before showing the Start menu again.
13
+ - Continue reviewing independent responses if a review group fails. Keep saved batches resumable across interruptions.
14
+ - Require supporting quotes for AI review findings that compare answers. Restore duplicate-contact guidance when resuming a synthetic batch.
15
+ - Reduce local work when packing AI prompts, saving drafts, and recording form instructions before submission.
16
+ - Skip AI route selection for responses with a verified preset route, and size question groups against the actual prompt and estimated reply.
17
+ - Keep generating other responses when an individual response exhausts its retries. Continue the saved draft directly from the wizard or run `prepare --resume` with the draft file alone.
18
+ - Keep batches large when individual answers need correction. Generate and review responses across branches together when they fit within the prompt limits.
19
+ - Batch field corrections separately from new responses, track generated contact collisions, and grow review batches after complete replies.
20
+
21
+ ## 0.4.3
22
+
23
+ - Show the form introduction before the question table and open the preview automatically in Start a new form.
24
+ - Show repeated confirmation messages once and highlight follow-up links after submission.
25
+ - Resume interrupted AI generation and review from Saved batches, with progress and timestamps.
26
+ - Edit multiple responses and save them together. Pick up links copied after the prompt opens and use a plain menu pointer.
27
+
3
28
  ## 0.4.2
4
29
 
5
30
  - Lead the README and PyPI quickstart with Quick submit and synthetic response generation.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gformbot
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: Generate, prepare, and submit Google Forms responses with ChatGPT or supplied data.
5
5
  Author: yogeshkrishna
6
6
  License-Expression: Apache-2.0 AND MIT
@@ -71,8 +71,8 @@ Want to submit a bunch of responses quickly?
71
71
 
72
72
  1. Select **Quick submit** with the arrow keys and Enter.
73
73
  2. Paste the link a respondent would open. Both `forms.gle` and full responder links work.
74
- 3. Enter the response count and any instructions. You can also pick a guide CSV to show AI what kind of answers you want.
75
- 4. GFormBot generates, validates, and submits the responses. If AI flags an answer, the wizard pauses for review.
74
+ 3. Enter the response count and any instructions. For answers that depend on media, add observations using the numbers in the question table, for example `Q12: The arrow points left; Q13: The card reads ABC-123`. You can also pick a guide CSV.
75
+ 4. GFormBot generates and checks the full batch, then submits automatically. If it needs more answers or manual review, it saves your work under **Continue batches**.
76
76
 
77
77
  <p align="center">
78
78
  <img src="https://raw.githubusercontent.com/yogeshkrishna/google_form_test_bot/master/readme/terminal.svg" alt="Quick submit example with a form link, five fictional event registrations, and no guide CSV." width="900">
@@ -88,17 +88,17 @@ python -m gformbot generate "YOUR_RESPONDER_URL" -n 5 -m "Vary the fictional sig
88
88
  <img src="https://raw.githubusercontent.com/yogeshkrishna/google_form_test_bot/master/readme/workflow.svg" alt="Read the form, choose answers, validate the batch, and submit over HTTPS." width="900">
89
89
  </p>
90
90
 
91
- Choose **Start a new form** when you want to inspect questions, use your own answers, or review and edit the batch before sending it.
91
+ Choose **Start a new form** to see the form introduction and questions before choosing where the answers come from. In **Review or edit responses**, move between responses and choose **Save and finish** to save your edits together.
92
92
 
93
93
  ## Choose your answer source
94
94
 
95
95
  | In the wizard | Reach for it when… | What happens |
96
96
  | --- | --- | --- |
97
97
  | **Generate answers with AI** | You want a spread of fictional profiles, including written answers. | Uses the form’s questions and rules, your instructions, and an optional guide CSV. Larger forms are handled in groups, with related answers carried forward. |
98
- | **Use my own answers** | You already have a CSV or saved batch you want to submit. | Imports complete CSV rows or opens a saved plan. You can read CSV rows in order, shuffle them, or sample with repeats. |
98
+ | **Use my own answers** | You have a CSV or want to make one with your own AI tool. | Optionally copy a prompt tailored to the form, then choose a CSV. Read rows in order, shuffle them, or sample with repeats. |
99
99
  | **Pick answers randomly** | You want a mix of answers for choice-heavy forms. | Samples eligible choices. Use equal chances, patterns from a guide CSV, or weights you set. AI can fill remaining written and date fields if needed. |
100
100
 
101
- `--data` uses your supplied answers. `--like` uses a CSV as a guide for generating **new** answers. Scripted CSV imports read complete rows in order, so values from different people stay together. Review AI output for meaning before relying on it. A batch with AI quality warnings pauses for review before it can be submitted.
101
+ `--data` uses your supplied answers. `--like` uses a CSV as a guide for generating **new** answers. Scripted CSV imports read complete rows in order, so values from different people stay together. Choose **Start a new form** if you want to review the prepared batch before sending it.
102
102
 
103
103
  <details>
104
104
  <summary><strong>CSV and JSON formats</strong></summary>
@@ -124,21 +124,26 @@ GFormBot works with **public Google Forms that accept anonymous responses**. It
124
124
  | Structured answers | Multiple-choice and checkbox grids, dates, clock times, and durations |
125
125
  | Form structure | Sections, routing, instructions, and confirmation messages |
126
126
 
127
- The form must be open to responses without Google sign-in. Account-verified email, one-response-per-account settings, and file uploads are unsupported. Unknown controls or rules can prevent a route from running. Images and videos appear during inspection for you to review. If they matter to an AI answer, describe the relevant facts in **Extra instructions**.
127
+ The form must be open to responses without Google sign-in. Account-verified email, one-response-per-account settings, and file uploads are unsupported. Unknown controls or rules can prevent a route from running. Images and videos appear during inspection for you to review. If they matter to an AI answer, add observations in **Extra instructions** using the question numbers, such as `Q12: The arrow points left`.
128
+
129
+
130
+ Media links appear in the terminal as they’re found. Click **Open image** or **Open video** in a terminal with mouse support. Choose **Show media links** to copy the direct URLs. Continuing to generation or leaving the form cancels discovery.
128
131
 
129
132
 
130
133
  ## Resume a batch or find its results
131
134
 
132
135
  | What you see | What to do |
133
136
  | --- | --- |
134
- | **Ready to submit** | Open the plan from **Saved batches** to review, export, or send it. |
135
- | **Interrupted** | Reopen the same plan to continue. Confirmed responses are skipped. |
136
- | **Needs checking** | Look in Google Forms or the linked sheet before choosing whether to retry. A lost connection can leave the result uncertain. |
137
- | **AI generation interrupted** | Run the printed `prepare --resume` command with the draft path. This resumes answer generation. |
137
+ | **Ready to submit** | Open the plan from **Continue batches** to review, export, or send it. |
138
+ | **Submission interrupted** | Open **Continue batches** and choose the batch by its progress and date. Confirmed responses are skipped. |
139
+ | **A response needs checking** | Look in Google Forms or the linked sheet before choosing whether to retry. A lost connection can leave the result uncertain. |
140
+ | **AI generation or quality review interrupted** | Open **Continue batches** to reuse saved work. If the wizard offers **Continue this batch**, you can also resume right there. |
138
141
  | **Looking for a receipt or instructions?** | Open **More options → View recent activity** from the folder you ran the batch in, or use `log --followups`. |
139
142
 
140
143
  GFormBot tracks submission outcomes in a local journal. Keep the original plan and journal when resuming. Files supplied as input and plans made with `prepare` are preserved. Temporary plans created for submission can be cleaned up after Google confirms the entire batch.
141
144
 
145
+ If an AI draft needs an additional media observation, save it in a JSON file such as `{"evidence":{"Q12":"The arrow points left"}}` and run `gformbot prepare --resume DRAFT.json --quality POLICY.json` with your actual file paths. You can review and submit the resulting plan from **Continue batches**.
146
+
142
147
  ## Command guide
143
148
 
144
149
  Run these after `python -m gformbot` or `gformbot`. Add `--help` after a command to see its full usage.
@@ -147,7 +152,7 @@ Run these after `python -m gformbot` or `gformbot`. Add `--help` after a command
147
152
  | --- | --- |
148
153
  | `prepare "URL" -n 5 -m "Use fictional attendees"` | Generate and save five answers for review. |
149
154
  | `prepare "URL" --data answers.csv -n 2` | Save two validated CSV rows without sending. |
150
- | `prepare "URL" --resume "DRAFT.json"` | Resume generation from a saved AI draft. |
155
+ | `prepare --resume "DRAFT.json"` | Continue a saved AI draft using its original form link. |
151
156
  | `preview [PLAN.json]` | Open a saved plan in the default app. Omit the path to choose from unfinished plans. |
152
157
  | `generate "URL" --data "PLAN.json"` | Submit the plan’s remaining responses. |
153
158
  | `generate "URL" --like guide.csv -n 3` | Generate and submit three responses guided by a CSV. |
@@ -161,7 +166,7 @@ Run these after `python -m gformbot` or `gformbot`. Add `--help` after a command
161
166
  ## Troubleshooting
162
167
 
163
168
  - **The terminal can’t find `gformbot`.** Run `python -m gformbot` with the same Python you used to install it.
164
- - **The file picker doesn’t open.** The wizard uses Tk and needs a desktop session. On Linux, install the Python Tk package for your distribution, or give `prepare` a path with `--data`.
169
+ - **The file picker doesn’t open.** Paste the CSV path into the wizard. The picker itself needs Tk and a desktop session.
165
170
  - **Google asks you to sign in.** Check the form’s publishing and access settings. The form must accept anonymous responses.
166
171
  - **A CSV answer was rejected.** Check the row and field in the error, then match the form’s option labels or date format exactly.
167
172
  - **AI generation is unavailable.** The guest service can limit or deny access. Reopen the saved draft when it’s available or prepare answers from a CSV.
@@ -31,8 +31,8 @@ Want to submit a bunch of responses quickly?
31
31
 
32
32
  1. Select **Quick submit** with the arrow keys and Enter.
33
33
  2. Paste the link a respondent would open. Both `forms.gle` and full responder links work.
34
- 3. Enter the response count and any instructions. You can also pick a guide CSV to show AI what kind of answers you want.
35
- 4. GFormBot generates, validates, and submits the responses. If AI flags an answer, the wizard pauses for review.
34
+ 3. Enter the response count and any instructions. For answers that depend on media, add observations using the numbers in the question table, for example `Q12: The arrow points left; Q13: The card reads ABC-123`. You can also pick a guide CSV.
35
+ 4. GFormBot generates and checks the full batch, then submits automatically. If it needs more answers or manual review, it saves your work under **Continue batches**.
36
36
 
37
37
  <p align="center">
38
38
  <img src="https://raw.githubusercontent.com/yogeshkrishna/google_form_test_bot/master/readme/terminal.svg" alt="Quick submit example with a form link, five fictional event registrations, and no guide CSV." width="900">
@@ -48,17 +48,17 @@ python -m gformbot generate "YOUR_RESPONDER_URL" -n 5 -m "Vary the fictional sig
48
48
  <img src="https://raw.githubusercontent.com/yogeshkrishna/google_form_test_bot/master/readme/workflow.svg" alt="Read the form, choose answers, validate the batch, and submit over HTTPS." width="900">
49
49
  </p>
50
50
 
51
- Choose **Start a new form** when you want to inspect questions, use your own answers, or review and edit the batch before sending it.
51
+ Choose **Start a new form** to see the form introduction and questions before choosing where the answers come from. In **Review or edit responses**, move between responses and choose **Save and finish** to save your edits together.
52
52
 
53
53
  ## Choose your answer source
54
54
 
55
55
  | In the wizard | Reach for it when… | What happens |
56
56
  | --- | --- | --- |
57
57
  | **Generate answers with AI** | You want a spread of fictional profiles, including written answers. | Uses the form’s questions and rules, your instructions, and an optional guide CSV. Larger forms are handled in groups, with related answers carried forward. |
58
- | **Use my own answers** | You already have a CSV or saved batch you want to submit. | Imports complete CSV rows or opens a saved plan. You can read CSV rows in order, shuffle them, or sample with repeats. |
58
+ | **Use my own answers** | You have a CSV or want to make one with your own AI tool. | Optionally copy a prompt tailored to the form, then choose a CSV. Read rows in order, shuffle them, or sample with repeats. |
59
59
  | **Pick answers randomly** | You want a mix of answers for choice-heavy forms. | Samples eligible choices. Use equal chances, patterns from a guide CSV, or weights you set. AI can fill remaining written and date fields if needed. |
60
60
 
61
- `--data` uses your supplied answers. `--like` uses a CSV as a guide for generating **new** answers. Scripted CSV imports read complete rows in order, so values from different people stay together. Review AI output for meaning before relying on it. A batch with AI quality warnings pauses for review before it can be submitted.
61
+ `--data` uses your supplied answers. `--like` uses a CSV as a guide for generating **new** answers. Scripted CSV imports read complete rows in order, so values from different people stay together. Choose **Start a new form** if you want to review the prepared batch before sending it.
62
62
 
63
63
  <details>
64
64
  <summary><strong>CSV and JSON formats</strong></summary>
@@ -84,21 +84,26 @@ GFormBot works with **public Google Forms that accept anonymous responses**. It
84
84
  | Structured answers | Multiple-choice and checkbox grids, dates, clock times, and durations |
85
85
  | Form structure | Sections, routing, instructions, and confirmation messages |
86
86
 
87
- The form must be open to responses without Google sign-in. Account-verified email, one-response-per-account settings, and file uploads are unsupported. Unknown controls or rules can prevent a route from running. Images and videos appear during inspection for you to review. If they matter to an AI answer, describe the relevant facts in **Extra instructions**.
87
+ The form must be open to responses without Google sign-in. Account-verified email, one-response-per-account settings, and file uploads are unsupported. Unknown controls or rules can prevent a route from running. Images and videos appear during inspection for you to review. If they matter to an AI answer, add observations in **Extra instructions** using the question numbers, such as `Q12: The arrow points left`.
88
+
89
+
90
+ Media links appear in the terminal as they’re found. Click **Open image** or **Open video** in a terminal with mouse support. Choose **Show media links** to copy the direct URLs. Continuing to generation or leaving the form cancels discovery.
88
91
 
89
92
 
90
93
  ## Resume a batch or find its results
91
94
 
92
95
  | What you see | What to do |
93
96
  | --- | --- |
94
- | **Ready to submit** | Open the plan from **Saved batches** to review, export, or send it. |
95
- | **Interrupted** | Reopen the same plan to continue. Confirmed responses are skipped. |
96
- | **Needs checking** | Look in Google Forms or the linked sheet before choosing whether to retry. A lost connection can leave the result uncertain. |
97
- | **AI generation interrupted** | Run the printed `prepare --resume` command with the draft path. This resumes answer generation. |
97
+ | **Ready to submit** | Open the plan from **Continue batches** to review, export, or send it. |
98
+ | **Submission interrupted** | Open **Continue batches** and choose the batch by its progress and date. Confirmed responses are skipped. |
99
+ | **A response needs checking** | Look in Google Forms or the linked sheet before choosing whether to retry. A lost connection can leave the result uncertain. |
100
+ | **AI generation or quality review interrupted** | Open **Continue batches** to reuse saved work. If the wizard offers **Continue this batch**, you can also resume right there. |
98
101
  | **Looking for a receipt or instructions?** | Open **More options → View recent activity** from the folder you ran the batch in, or use `log --followups`. |
99
102
 
100
103
  GFormBot tracks submission outcomes in a local journal. Keep the original plan and journal when resuming. Files supplied as input and plans made with `prepare` are preserved. Temporary plans created for submission can be cleaned up after Google confirms the entire batch.
101
104
 
105
+ If an AI draft needs an additional media observation, save it in a JSON file such as `{"evidence":{"Q12":"The arrow points left"}}` and run `gformbot prepare --resume DRAFT.json --quality POLICY.json` with your actual file paths. You can review and submit the resulting plan from **Continue batches**.
106
+
102
107
  ## Command guide
103
108
 
104
109
  Run these after `python -m gformbot` or `gformbot`. Add `--help` after a command to see its full usage.
@@ -107,7 +112,7 @@ Run these after `python -m gformbot` or `gformbot`. Add `--help` after a command
107
112
  | --- | --- |
108
113
  | `prepare "URL" -n 5 -m "Use fictional attendees"` | Generate and save five answers for review. |
109
114
  | `prepare "URL" --data answers.csv -n 2` | Save two validated CSV rows without sending. |
110
- | `prepare "URL" --resume "DRAFT.json"` | Resume generation from a saved AI draft. |
115
+ | `prepare --resume "DRAFT.json"` | Continue a saved AI draft using its original form link. |
111
116
  | `preview [PLAN.json]` | Open a saved plan in the default app. Omit the path to choose from unfinished plans. |
112
117
  | `generate "URL" --data "PLAN.json"` | Submit the plan’s remaining responses. |
113
118
  | `generate "URL" --like guide.csv -n 3` | Generate and submit three responses guided by a CSV. |
@@ -121,7 +126,7 @@ Run these after `python -m gformbot` or `gformbot`. Add `--help` after a command
121
126
  ## Troubleshooting
122
127
 
123
128
  - **The terminal can’t find `gformbot`.** Run `python -m gformbot` with the same Python you used to install it.
124
- - **The file picker doesn’t open.** The wizard uses Tk and needs a desktop session. On Linux, install the Python Tk package for your distribution, or give `prepare` a path with `--data`.
129
+ - **The file picker doesn’t open.** Paste the CSV path into the wizard. The picker itself needs Tk and a desktop session.
125
130
  - **Google asks you to sign in.** Check the form’s publishing and access settings. The form must accept anonymous responses.
126
131
  - **A CSV answer was rejected.** Check the row and field in the error, then match the form’s option labels or date format exactly.
127
132
  - **AI generation is unavailable.** The guest service can limit or deny access. Reopen the saved draft when it’s available or prepare answers from a CSV.
@@ -2,7 +2,7 @@
2
2
  gformbot — A synthetic Google Forms response CLI.
3
3
  """
4
4
 
5
- __version__ = "0.4.2"
5
+ __version__ = "0.4.4"
6
6
 
7
7
 
8
8
  def main():