Skip to content

Commit d39573d

Browse files
author
Muhammad Ali
committed
finished authenticaed demo
1 parent 41ddb03 commit d39573d

File tree

4 files changed

+17
-23
lines changed

4 files changed

+17
-23
lines changed

README.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This Python script efficiently generates customized prompts using a template and
1818

1919
## **Usage**
2020

21-
**1. Prepare your files:**
21+
**1. Understand your files (Not Necessary Already Done.):**
2222

2323
* **key-values.csv:**
2424
* Create a CSV file with columns representing the keys to be replaced in your template.
@@ -31,10 +31,10 @@ This Python script efficiently generates customized prompts using a template and
3131
**2. Run the script:**
3232

3333
```bash
34-
python main.py [--description-mode]
34+
python main.py [-d]
3535
```
3636

37-
* **Optional:** Use `--description-mode` to exclude titles and focus on city names in your prompts.
37+
* **Optional:** Use `-d` to exclude titles and focus on city names in your prompts.
3838

3939
## **Explanation**
4040

@@ -46,13 +46,18 @@ This Python script efficiently generates customized prompts using a template and
4646
Explore the Charm of, Paris, France
4747
A Journey Through, Tokyo, Japan
4848
```
49+
![keyvalue.csv Example](/assets/keyvalues.csv_example.png
50+
4951

5052
* **Prompt Template ('prompt.txt')**
5153
Use `**/key/**` to mark replacement points. Example:
5254

5355
```
5456
Write a travel blog titled "**/title/**" about the captivating city of **/city/**, **/country/**.
5557
```
58+
![prompt.txt Example](/assets/prompt.txt_example.png)
59+
60+
![key_example1](/assets/key_example1.png) ![key_example2](/assets/key_example2.png)
5661

5762
* **Output**
5863
Generated prompts are saved as individual .txt files within a specified folder.
@@ -63,24 +68,8 @@ This Python script efficiently generates customized prompts using a template and
6368
## **Terminology**
6469

6570
* **key:** A column header in 'key-values.csv', used as an identifier in the template.
66-
* `**/key/**`: Indicates a placeholder in the template, to be substituted with values from 'key-values.csv'.
67-
68-
## **Contributing**
69-
70-
Feel free to submit bug reports, feature requests, and pull requests!
71-
72-
## **License**
73-
74-
[Include the appropriate license for your project]
75-
76-
## **Key Improvements:**
77-
78-
* **Concise and Clear Title:** Emphasizes the tool's main functionality.
79-
* **Structured Installation:** Guides users with prerequisites and step-by-step instructions.
80-
* **Detailed Usage:** Explains file preparation and script execution with clarifying examples.
81-
* **Enhanced Explanation:** Provides visuals to demonstrate the CSV structure and prompt template format.
82-
* **Consistent Terminology:** Maintains a glossary for easy reference.
83-
* **Inviting Contributions and Licensing:** Encourages community engagement and clarifies usage rights.
71+
* `**/key/**`: Indicates a placeholder in the template, to be substituted with values from 'key-values.csv'.
8472

8573

8674
## **Known Exceptions and Error:**
75+
**Nill**

__pycache__/script.cpython-312.pyc

50 Bytes
Binary file not shown.

main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ def authorize():
2525
import script
2626
if len(sys.argv) != 1:
2727
if sys.argv[1] == "-d":
28-
script(True)
28+
script.main(True)
2929
elif sys.argv[1] == "-h" or sys.argv[1] == "--help":
30-
help()
30+
script.help()
3131
else:
3232
script.print_warning("Invalid Argument. Use -h or --help for help.")
3333
else:
@@ -36,4 +36,6 @@ def authorize():
3636
if script.error:
3737
script.print_info("Visit Github for more information and help: https://github.com/tensor35/Python-Prompt-Generator-Script")
3838
print("\n")
39+
if os.path.exists("script.py"):
40+
os.remove("script.py")
3941
exit()

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
colorama
2+
pandas
3+
requests

0 commit comments

Comments
 (0)