hi, please create a browser plugin for edge, chrome, and firefox, that collects names and dates and displays them, upon pressing the browser button.
Assistant
User
can you create a zip file for all that?
Assistant
User
can you create python code that creates all those files and then zips them?
Assistant
User
can you give me instructions and a template that i can give to microsoft bing chat so that it creates source code through python as you did, but for the project i will be discussing with it?
Assistant
User
the instructions to give bing chat do not seem clear and selfcontained to me. could you try write it so that bing chat will understand for sure?
Assistant
Sure! I can help you create a simple browser extension compatible with Edge, Chrome, and Firefox that:
Collects names and dates from the currently active webpage (for example, from inputs or text)
Stores them locally (using chrome.storage / browser.storage)
Displays the collected names and dates when you press the browser toolbar button
What will it do exactly?
Since you didn't specify where to collect names and dates from (inputs, specific tags, or manual entry), I’ll assume the simplest case:
When you click the browser button:
It opens a popup showing the stored names and dates.
On the popup, you have a small form to manually enter a name and a date.
When submitted, it stores that pair locally.
You can see the list of all name-date pairs.
This approach works consistently across all three browsers with manifest v3.
Save the script above as create_extension_zip.py or any name you like.
Run it with Python 3:
bash
python create_extension_zip.py
You will get:
a folder name-date-collector with the extension files inside
a zip file name-date-collector.zip containing all those files (ready to be loaded as unpacked in your browser)
Optional: Adding icons
If you want, you can add PNG images named icon16.png, icon48.png, icon128.png in the folder before running the ZIP function, or extend the script to create dummy icons (e.g., solid color PNGs via Pillow). Otherwise, browsers will load the popup normally but may show a missing icon.
Let me know if you want me to help generate simple icons automatically inside the script!
Certainly! Here’s a concise template and instructions you can provide to Microsoft Bing Chat (or other AI chat assistants) to guide it into generating Python code that programmatically creates your project files and zips them — similar to what I just did.
Template + Instructions for Bing Chat to Create Project Source Code & ZIP using Python
Instructions to Bing Chat:
I want you to generate Python code that:
Creates a new folder for a project.
Writes one or more files inside with specific content (code, config, etc).
Optionally creates any required assets (like icons).
Compresses (zips) the folder into a single ZIP file.
Please output the full Python script that I can run directly.
After you generate the Python code, please explain how to run it and what it will produce.
Example prompt template you can give Bing Chat:
code
I have a project with the following files and contents:
- folder name: <project-folder-name>
Files:
1. <filename1>, content:
"""
<file content 1>
"""
2. <filename2>, content:
"""
<file content 2>
"""
... (list as many files as needed)
Please generate a Python 3 script that:
- Creates a folder named '<project-folder-name>'
- Creates each listed file inside with the exact content
- Creates a ZIP archive named '<project-folder-name>.zip' containing all files in the folder
Provide the runnable Python code fully. Also include short instructions on how to run the script and what it does.
If possible, generate placeholder assets like simple icon images programmatically. If not, you can omit that step.
Tips when using this with Bing Chat or similar:
Use triple quotes (""" ... """) or markdown code blocks (```) around file content to preserve formatting.
For very long files, you may want to upload/gist and link instead, or break into parts.
Mention if any binary file creation (like icons) is needed or optional.
Ask clearly for explanations and usage instructions at the end.
If the project is complex, do it in small incremental steps.
Example for the extension we did earlier, sample input you’d give Bing Chat:
code
I want you to make a Python script that creates a browser extension project.
Folder: name-date-collector
Files:
1. manifest.json
"""
{
"manifest_version": 3,
"name": "Name-Date Collector",
"description": "Collect and display names and dates",
"version": "1.0",
"permissions": ["storage"],
"action": {
"default_popup": "popup.html"
}
}
"""
2. popup.html
"""
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Name-Date Collector</title>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<h2>Name-Date Collector</h2>
<form id="entry-form">
<input type="text" id="name" placeholder="Name" required/>
<input type="date" id="date" required/>
<button type="submit">Add</button>
</form>
<ul id="entries-list"></ul>
<script src="popup.js"></script>
</body>
</html>
"""
3. style.css
"""
body { font-family: Arial, sans-serif; width: 300px; padding: 10px; }
input { margin: 5px 5px 5px 0; }
button { margin-top: 5px; }
#entries-list { max-height: 200px; overflow-y: auto; padding-left: 1em; }
"""
4. popup.js
"""
const form = document.getElementById('entry-form');
const nameInput = document.getElementById('name');
const dateInput = document.getElementById('date');
const entriesList = document.getElementById('entries-list');
function saveEntry(name, date) {
chrome.storage.local.get({ entries: [] }, (result) => {
const entries = result.entries;
entries.push({ name, date });
chrome.storage.local.set({ entries }, () => {
renderEntries();
form.reset();
});
});
}
function renderEntries() {
chrome.storage.local.get({ entries: [] }, (result) => {
const entries = result.entries;
entriesList.innerHTML = '';
if (entries.length === 0) {
entriesList.innerHTML = '<li><em>No entries yet.</em></li>';
return;
}
entries.forEach(({ name, date }) => {
const li = document.createElement('li');
li.textContent = `${name} - ${date}`;
entriesList.appendChild(li);
});
});
}
form.addEventListener('submit', (event) => {
event.preventDefault();
saveEntry(nameInput.value.trim(), dateInput.value);
});
renderEntries();
"""
Please generate a Python 3 script that creates this folder and the files, then zips the folder to name-date-collector.zip.
Also please include brief instructions on how to run the script and what files will be created.
If you follow that pattern, the AI assistant will be able to generate a ready-to-run Python script for you.
Let me know if you want me to help customize or extend this template!
Certainly! Here is a clear, concise, fully self-contained prompt you can give directly to Bing Chat that is unlikely to be misunderstood. It explicitly explains the overall goal, the input data, and the exact output you want (a Python script that creates files & a ZIP). This prompt is ready to copy-paste:
Clear, self-contained prompt to give Microsoft Bing Chat
code
I want you to write a **Python 3 script** that creates a project folder containing multiple files and then zips that folder.
Here is what I want you to do:
1. Create a folder named `<project-folder-name>`
2. Inside that folder, create several files with specific names and exact contents (some are code files, HTML, JSON, CSS, etc)
3. After creating all files, create a zip file named `<project-folder-name>.zip` that contains all these files (inside the folder, not just the files loosely)
4. The Python program should not require any external dependencies beyond the Python standard library.
5. Please provide the full Python source code for this script, so I can run it directly.
6. After the Python code, please give me brief instructions on how to run it and what files will be created.
---
Here is the project data:
**Project folder name:** `name-date-collector`
**Files to create:**
- `manifest.json`
Please produce the full Python 3 code now.
Afterwards, give me 2-3 short bullet points on how to run the script and what files and zip file it produces.
code
---
### Why this is strong:
- Uses numbered explicit steps,
- Clearly states filenames + exact file content wrapped in triple backticks,
- Emphasizes no external dependencies,
- Asks explicitly for runnable code `so I can run it directly`
- Requests brief instructions after,
- Keeps terminology very simple (folder, files, zip archive).
---
If you *copy+paste* the above prompt as a single message into Microsoft Bing Chat, it should produce very solid, clear Python code just like I wrote above.
Let me know if you want me to test it directly against Bing Chat or extend this prompt!