IBM Power Systems AS/400 iSeries ¤Ë´Ø¤¹¤ë³Ð¤¨½ñ¤­¤Ê¥Ú¡¼¥¸¤Ç¤¹¡£

CSV¥Õ¥¡¥¤¥ë¤«¤éHTML¤òºîÀ®

CSV¥Õ¥¡¥¤¥ë¤«¤é¼ê½ç½ñ¤Î¹àÌܤòhtml¤Ë½ÐÎϤ¹¤ë¥¹¥¯¥ê¥×¥È¤Ç¤¹

ÆþÎϥǡ¼¥¿(INPUTDATA.CSV)

"¥ª¡¼¥¬¥¹¥È","¤Ï¤Ë¤Ï¤Ë","·î¤ÏÅì¤ËÆü¤ÏÀ¾¤Ë¡¡-Operation Sanctuary-"
"¥ª¡¼¥¬¥¹¥È","¥×¥ê¥Û¥ê","Princess Holiday¡Áž¤¬¤ë¤ê¤ó¤´ÄâÀéÌë°ìÌë¡Á"
"¤¢¤«¤Ù¤§¤½¤Õ¤È¤Ä¤¥","¤³¤óËÍ","¤³¤ó¤Ê̼¤¬¤¤¤¿¤éËͤϤ⤦¡Ä¡Ä!!"

¥½¡¼¥¹(csv2man.py)

# -*- coding: Shift-JIS -*-
'''
¼ê½ç½ñ¤òºîÀ®(html)
'''

import csv,time

html = '''<!doctype html>

<html>
<head>
  <title>¼ê½ç½ñ¥µ¥ó¥×¥ë</title>
<style>
<!--table
	{mso-displayed-decimal-separator:"\.";
	mso-displayed-thousand-separator:"\,";}
@page
	{margin:.98in .79in .98in .79in;
	mso-header-margin:.51in;
	mso-footer-margin:.51in;}
tr
	{mso-height-source:auto;
	mso-ruby-visibility:none;}
col
	{mso-width-source:auto;
	mso-ruby-visibility:none;}
br
	{mso-data-placement:same-cell;}
.style0
	{mso-number-format:General;
	text-align:general;
	vertical-align:middle;
	white-space:nowrap;
	mso-rotate:0;
	mso-background-source:auto;
	mso-pattern:auto;
	color:windowtext;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:"£Í£Ó £Ð¥´¥·¥Ã¥¯", monospace;
	mso-font-charset:128;
	border:none;
	mso-protection:locked visible;
	mso-style-name:ɸ½à;
	mso-style-id:0;}
td
	{mso-style-parent:style0;
	padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:windowtext;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:"£Í£Ó £Ð¥´¥·¥Ã¥¯", monospace;
	mso-font-charset:128;
	mso-number-format:General;
	text-align:general;
	vertical-align:middle;
	border:none;
	mso-background-source:auto;
	mso-pattern:auto;
	mso-protection:locked visible;
	white-space:nowrap;
	mso-rotate:0;}
.xl24
	{mso-style-parent:style0;
	border:.5pt solid windowtext;
	white-space:normal;}
ruby
	{ruby-align:left;}
rt
	{color:windowtext;
	font-size:6.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:"£Í£Ó £Ð¥´¥·¥Ã¥¯", monospace;
	mso-font-charset:128;
	mso-char-type:katakana;
	display:none;}
-->
</style>

</head>
<body>
<h1>¼ê½ç½ñ¤µ¤ó¤×¤ë</h1>
%s
</body>
</html>
'''

now = time.strftime('%Y%m%d_%H%M%S')
fw = open('man_'+now+'.html','w')
wk1 = "<table border=0 cellpadding=0 cellspacing=0 style='border-collapse: collapse;table-layout:fixed;width:260pt'>"
wk2 = '''
<tr><td class=xl24>ȯÇä²ñ¼Ò<B>¡Ú%s¡Û</B><br>
¡¡¡¡¥²¡¼¥à¤ÎÄ̾Î<B>¡Ú%s¡Û</B><br>
¡¡¡¡Àµ¼°Ì¾¾Î<B>¡Ú%s¡Û</B><br>
</td></tr>
'''
wk3 = '</table>'
wk20 = ''
for row in csv.reader(open('INPUTDATA.CSV')) :
    wk20 += wk2 % tuple(row)
wk = wk1 + wk20 + wk3
fw.write(html % wk)

fw.close

¼Â¹Ô·ë²Ì

¤³¤Î¥Ú¡¼¥¸¤Ø¤Î¥³¥á¥ó¥È

DfVtao Thank you ever so for you article.Thanks Again. Will read on...

0
Posted by seo thing 2013ǯ12·î19Æü(ÌÚ) 10:21:41 ÊÖ¿®

v8JVAv <a href="http://ejnljfrnkmcz.com/">ejnljfrnkmcz</a>, [url=http://ohpscwmopqbx.com/]ohpscwmopqbx[/url], [link=http://ekpccmftfvvg.com/]ekpccmftfvvg[/link], http://hmlbixgmoqik.com/

0
Posted by gspecr 2013ǯ11·î15Æü(¶â) 06:37:37 ÊÖ¿®

¥³¥á¥ó¥È¤ò¤«¤¯


¡Öhttp://¡×¤ò´Þ¤àÅê¹Æ¤Ï¶Ø»ß¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

ÍøÍѵ¬Ìó¤ò¤´³Îǧ¤Î¤¦¤¨¤´µ­Æþ²¼¤µ¤¤

WikiÆ⸡º÷

Menu

¤³¤³¤Ï¼«Í³¤ËÊÔ½¸¤Ç¤­¤ë¥¨¥ê¥¢¤Ç¤¹¡£

¥á¥ó¥Ð¡¼¤Î¤ßÊÔ½¸¤Ç¤­¤Þ¤¹