subhashbs36 commited on
Commit
1af44fa
Β·
1 Parent(s): 5fa28b9

Add initial README.md with project details, features, installation instructions, and usage guidelines

Browse files
Files changed (1) hide show
  1. README.md +160 -0
README.md CHANGED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Text2Pen
3
+ emoji: πŸ–ŠοΈ
4
+ colorFrom: indigo
5
+ colorTo: blue
6
+ sdk: gradio
7
+ sdk_version: "4.25.0"
8
+ app_file: main.py
9
+ pinned: false
10
+ ---
11
+
12
+ # ✍️ Text2Pen
13
+
14
+ A modern, customizable tool to convert your typed text into realistic handwriting on A4 paper.
15
+ Supports multi-column layouts, handwriting font selection, background customization, color, jitter, and moreβ€”all with a clean Gradio web UI.
16
+
17
+ ---
18
+
19
+ ## πŸš€ Features
20
+
21
+ - **Modern Gradio Web UI**: Easy-to-use, clean, and responsive.
22
+ - **Direct Text Input or File Upload**: Paste text or upload `.txt` files.
23
+ - **Handwriting Fonts**: Choose from built-in fonts or upload your own `.ttf`.
24
+ - **Backgrounds**: Use blank, ruled, or custom backgrounds.
25
+ - **Multi-Column Layout**: Split your page into 1, 2, or 3 columns.
26
+ - **Customizable**: Font size, line spacing, margin, color, jitter, and more.
27
+ - **Preview & Download**: Preview pages as images, download as PDF (generated on demand).
28
+ - **A4 Output**: Perfect for cheat sheets, study notes, or printing.
29
+
30
+ ---
31
+
32
+ ## πŸ“Έ Screenshots
33
+
34
+ ### Main UI
35
+
36
+ ![Main UI](assets/Ui.png)
37
+
38
+ ### Customization Tab
39
+
40
+ ![Customization Tab](assets/Customization.png)
41
+
42
+ ### Example Output
43
+
44
+ ![PDF Output Example](assets/generated_pdf.png)
45
+
46
+ ### Multi Column Layout
47
+
48
+ ![Multi Column Layout](assets/3_column.png)
49
+
50
+ ---
51
+
52
+ ## πŸ› οΈ Installation
53
+
54
+ 1. **Clone the repository:**
55
+ ```sh
56
+ git clone https://github.com/yourusername/Text2Pen.git
57
+ cd Text2Pen
58
+ ```
59
+
60
+ 2. **Install dependencies:**
61
+ ```sh
62
+ pip install -r requirements.txt
63
+ ```
64
+ *Requirements: `gradio`, `pillow`*
65
+
66
+ 3. **(Optional) Add Fonts/Backgrounds:**
67
+ - Place `.ttf` fonts in the `fonts/` folder.
68
+ - Place background images in the `backgrounds/` folder.
69
+
70
+ ---
71
+
72
+ ## πŸƒ Usage
73
+
74
+ ### Start the App
75
+
76
+ ```sh
77
+ python main.py
78
+ ```
79
+
80
+ - The Gradio UI will open in your browser.
81
+ - Enter or upload your text, customize options, and generate handwriting.
82
+
83
+ ### Output
84
+
85
+ - **Preview**: See generated pages as images.
86
+ - **Download PDF**: Click "Generate & Download PDF" to get a PDF (temporary file, not saved).
87
+
88
+ ---
89
+
90
+ ## πŸ“‚ Project Structure
91
+
92
+ ```
93
+ Text2Pen/
94
+ β”‚
95
+ β”œβ”€β”€ main.py
96
+ β”œβ”€β”€ README.md
97
+ β”œβ”€β”€ requirements.txt
98
+ β”œβ”€β”€ fonts/
99
+ β”‚ β”œβ”€β”€ QEJulianDean.ttf
100
+ β”‚ └── QEKevinKnowles.ttf
101
+ β”œβ”€β”€ backgrounds/
102
+ β”‚ └── ruled_a4.png
103
+ β”œβ”€β”€ generated/
104
+ β”‚ β”œβ”€β”€ images/
105
+ β”‚ └── pdfs/
106
+ β”œβ”€β”€ sample_ui_1.png
107
+ β”œβ”€β”€ sample_ui_2.png
108
+ └── sample_output_page.png
109
+ ```
110
+
111
+ ---
112
+
113
+ ## ✏️ Customization
114
+
115
+ - **Fonts**: Add your own `.ttf` files to the `fonts/` folder or upload via the UI.
116
+ - **Backgrounds**: Add PNG/JPG backgrounds to the `backgrounds/` folder or upload via the UI.
117
+ - **Advanced Options**: Adjust font size, line spacing, margin, jitter, columns, and color in the Customization tab.
118
+
119
+ ---
120
+
121
+ ## πŸ“ Notes
122
+
123
+ - PDF files are generated as temporary files and are not stored permanently.
124
+ - Images are saved in `generated/images/` for preview purposes.
125
+ - For best results, use high-quality handwriting fonts and A4-sized backgrounds.
126
+
127
+ ---
128
+
129
+ ## πŸ“„ License
130
+
131
+ Apache License 2.0
132
+
133
+ ---
134
+
135
+ ## πŸ™ Credits
136
+
137
+ - [Gradio](https://gradio.app/)
138
+ - [Pillow](https://python-pillow.org/)
139
+ - Handwriting fonts from [Google Fonts](https://fonts.google.com/) and [DaFont](https://www.dafont.com/)
140
+
141
+ ---
142
+
143
+ ## πŸ’‘ Example Use Cases
144
+
145
+ - Micro cheat sheets for exams
146
+ - Study notes that look handwritten
147
+ - Generating realistic handwritten letters
148
+ - Printing custom notes for planners or journals
149
+
150
+ ---
151
+
152
+ ## 🀝 Contributing
153
+
154
+ Pull requests and suggestions are welcome!
155
+
156
+ ---
157
+
158
+ ## πŸ“§ Contact
159
+ Add commentMore actions
160
+ For questions or feedback, open an issue or contact [subhashbs36@gmail.com](mailto:subhashbs36@gmail.com).