| Conditions | 5 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import os |
||
| 11 | def _generate(self, data): |
||
| 12 | if data is None: |
||
| 13 | return |
||
| 14 | |||
| 15 | if not os.path.exists(os.path.expanduser(self.path)): |
||
| 16 | os.makedirs(os.path.expanduser(self.path)) |
||
| 17 | |||
| 18 | with open(os.path.expanduser('~/public_html/img/index.html'),'w+') as f: |
||
| 19 | f.write("<html><body>\n") |
||
| 20 | f.write("<font size=7>ANYTHING AND EVERYTHING ON THIS PAGE MAY BE NSFW. YOU HAVE BEEN WARNED.</font><br />\n") |
||
| 21 | for line in data: |
||
| 22 | f.write(line[2] + " pasted link <a href=\"" + line[1] + "\">" + line[1] + "</a> at "+str(line[3])+" UTC<br>\n") |
||
| 23 | f.write("</html></body>\n") |
||
| 24 |