-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from yattag import indent | ||
with open("E:/python/Tools/style.css", "r") as file: | ||
data = file.read() | ||
|
||
result = indent( | ||
data, | ||
indentation=' ', | ||
newline='\r\n', | ||
indent_text=True | ||
) | ||
print(result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# program to convert CSV file into PDF file | ||
from fpdf import FPDF | ||
import csv | ||
|
||
with open("e:/python/tools/SampleData.csv", "r") as csv_file: | ||
data = csv.reader(csv_file) | ||
for row in data: | ||
print(row) | ||
|
||
|
||
pdf = FPDF(orientation='P', unit='mm', format='A4') # P -potrait L-Landscape | ||
pdf.add_page() | ||
pdf.set_font("Arial", size=12) | ||
pdf.cell(200, 10, txt=str(data), ln=1, align="C") | ||
pdf.output("simple_demo.pdf") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from yattag import indent | ||
with open("E:/python/Tools/index.html", "r") as file: | ||
data = file.read() | ||
|
||
result = indent( | ||
data, | ||
indentation=' ', | ||
newline='\r\n', | ||
indent_text=True | ||
) | ||
print(result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.underline {position: relative; margin-bottom:30px;} | ||
.underline::after{ display: block; content: ''; width: 50px; height: 1px; background: #F27316; position: absolute;bottom: -15px;left: 0%;margin-bottom: ;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# python program to convert any csv file into html file | ||
# made by : rakesh kumar | ||
|
||
import csv | ||
html = "<table>" | ||
with open("E:/python/Tools/SampleData.csv") as csv_file: | ||
csv_data = csv.reader(csv_file) | ||
count = 1 | ||
for row in csv_data: | ||
html += "<tr>" | ||
if count == 1: | ||
for y in row: | ||
html += "<th>"+y+"</th>" | ||
else: | ||
for y in row: | ||
html += "<td>"+y+"</td>" | ||
html += "</tr>" | ||
count += 1 | ||
|
||
html += "</table>" | ||
print(html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
from yattag import indent | ||
with open("E:/python/Tools/sample.xml", "r") as file: | ||
data = file.read() | ||
print(data) | ||
|
||
result = indent( | ||
data, | ||
indentation=' ', | ||
newline='\r\n', | ||
indent_text=True | ||
) | ||
print(result) |