Unverified Commit a1495490 authored by HUC Stéphane's avatar HUC Stéphane
Browse files

Corrections to display correctly viewer html...

parent ff38025c
......@@ -7,8 +7,8 @@ Script Python *(tkinter)* pour téléverser des images vers des sites d'héberg
Est capable d'utiliser les services de :
- [Toile Libre](https://pix.toile-libre.org), [Debian-fr](https://pix.debian-fr.xyz) *(basé sur pix)*
- [Framapic](https://framapic.org) *(basé sur lutim), ~~[Lutim](https://lut.im)~~ (service arrêté)*
- basé sur pix : [Toile Libre](https://pix.toile-libre.org), *~~[Debian-fr](https://pix.debian-fr.xyz)~~ (service arrêté)*
- basé sur lut.im : [Framapic](https://framapic.org) *~~[Lutim](https://lut.im)~~ (service arrêté)*
- [Jirafeau](https://jirafeau.net)
Auteurs
......@@ -28,8 +28,12 @@ Auteurs
- Debian Sid:
- apt install python3 python3-tk python-beautifulsoup python3-pydbus python3-pil python3-pil.imagegtk python3-pip python3-requests python3-notify2
- OpenBSD :
- pkg_add -v python-3.6.2 py3-beautifulsoup4 python-tkinter-3.6.2 py3-dbus py3-Pillow py3-pip py3-requests
- OpenBSD 6.4 :
- pkg_add python-3.6.6p1 python-tkinter-3.6.6p1
- OpenBSD 6.3 :
- pkg_add python-3.6.2 python-tkinter-3.6.2
- OpenBSD (supplémentaires) :
- pkg_add py3-Pillow py3-beautifulsoup4 py3-dbus py3-pip py3-requests
- python3.6 -m pip install --upgrade configparser notify2
----
......
2018/04/16
2018/11/07
SHA512 (./COPYRIGHT) = e4143a58afdb99e21967dfdf810e3500b7995c4c6f8f32612578f2d6695a733fe67c6d2047b0c60386b01fd3b326ab47b217c9b36c2e720321bc0c7004b022a0
SHA512 (./LICENSE) = 169603b44f9e20ce49cec97ac4739e78ad8d7f4a579cf11a17e98d8f917795795ebaba948a50764ac582bea1b53dcb2d3b985959ec382911e0d1033c7e49301f
SHA512 (./README.md) = 59887ed260f50991f5ebe68804ae6544fde2a2e2b242cb0b446d417e8a8a3c25d176b009e3b71e0e11fd3f15560e6033f448c386b9b58b7e76a15651827a3a9c
SHA512 (./README.md) = 581c257f06adaa220e7c990afbce59db71253bf40f6bfb8627945aa32a035b226d19924ffbd80613a8fe6e8812914900e9ff99338ccc19d3d09d8da68ba5e676
SHA512 (./TODO) = de5eeb120728a758465c5ae7c016718f6d69fab9131385020957c3356f3cb2a08df51797e1865d1b74509eac805cfc9ba7e2add7efefea8bafc0f0aca4dcaded
SHA512 (./VERSION) = ee00bc9a2f4df56a8926d39b04b42102ef8aebe01e1dabce7180d428c03582f858705a05930b3eb69c2a7e7043018bcba45eded28b6c26ed40332dca1f1af9f2
SHA512 (./VERSION) = 389019f82cd88e97b70cbdc008fa0e0bc33f4fda167cecb182613a7b64cbb8dcc6ef10f46b93bba9df0e31e2e3444a6311cd2a6ad1c3e2e019cd5b9ae6e5a953
SHA512 (./conf/YUP.html) = 3518f03e402d2250a937e9cf79cf1980d42112e165a5b21bb8318f78deba24c71715fd82f93c895bb12ea4c2b125f5e45a58aaa08d268bff2db881a99c5491c5
SHA512 (./conf/YUP.story.html) = 88b7a9389c54728c5cacd75ecbc788dbf56a823f4d270eae923a528ca69f71e775442b1677c25737e6c11efbfa97dca1204b4ccf157a6efed2d343d229bab341
SHA512 (./conf/YUP (copie 1).html) = 6213d242f0dca37f341e31c3e3b50c4d283f2e8b06d9d70719b1ec4b5e33c4a5e40a66e51f79c1b3f8a64c06aae82fcb54bf252946f0f90d7543fbec23860142
SHA512 (./conf/bootstrap.min.css) = 93bf1ed5f6d8b34f53413a86efd4a925d578c97abc757ea871f3f46f340745e4126c48219d2e8040713605b64a9ecf7ad986aa8102f5ea5ecf9228801d962f5d
SHA512 (./conf/bootstrap.min.js) = 00d9069b9bd29ad0daa0503f341d67549cce28e888e1affd1a2a45b64a4c1bc460d81cfc4751857f991f2f4fb3d2572fd97fca651ba0c2b0255530209b182f22
SHA512 (./conf/log.conf) = 2a3e1ade04731c13248bf29147f2c206a77a395c899698a6fb6f8e04bd5e9abac25bb2e5135896244012643e38a2f1a9d5f1da4790f60f84793df8bbdb8bb52f
SHA512 (./conf/yup.py.ini) = e4aa81be10eb4719755d8a3cbe99f45ff38202443263199f6ff75756a2d9d61fc59abf166cf44255094fd88d1a0e26bded765d795d187ef767a3e4048ceb5494
SHA512 (./conf/YUP.story (copie 1).html) = 3911d910078b5bf748d769f64d797539ee1898005c51a0a9a832dcd30f61bdccf0fada5531c50895f3991241babadaf9f1f807323d6bec8d8d1cd0c39435b387
SHA512 (./credits) = 874c9dcb609c394cd26ccb9633d0367320a441cec1a06f2c463d9ecc13fac263a2b8efd8bef49cde928b8131cdd551ef94b19be99df3833e0f6f1032ce787312
SHA512 (./img/Logo.ico) = c00243d24f520f421c80bc4513d62166f118c35cdb54d2ba2af6bc265ca6e1b01463d33cf5c0669cdfa3b840a8aecb01e39e126027c40a0197a6557af11a61e1
SHA512 (./img/Logo.png) = 31fe931b333c39c93b90cc50802055c28efce8ebdabca34b3e9be6f4d42fa69dc4bca4b9fc40b63c24211c3cc75167d9ac0faa51c19c94a20983874d31228850
SHA512 (./img/Logo.xbm) = b1e5d89e934e1a8c7c6807e084d77b7f8531589f04cc6b1ea1560d097027d512883f48f99d078452a945b1b4218fa73bcbf16facf9a9b53c3ff97ffa14059dfb
SHA512 (./modules/__init__.py) = cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
SHA512 (./modules/__init__.py.svg) = c5cf21565f9dbe8bfd5bcfabc06b01ff8be882666315a66fabeedf3b76944386e76c63728a1c250214bb1b740da3b768e90e5926b2462c5117cdeba37b0541f4
SHA512 (./modules/about.py) = 0542316c72a22d2d40b5eb039cba4ed56e94b73ecd3e2c1a7f20cd55d02eae1ae36aa2fd29621dfd335dc6f67a2a711710a00eafe16fa9bdf8521ce8e3e6406f
SHA512 (./modules/about.py) = 7d93f47a6d609ee79fee318ddc4630fb17a94e0e2fb22d8176892c2eb55d9c5fff7e658729aa8c6b1e5d5261e34b270cce37fbd8592169a96bce489cdc75c952
SHA512 (./modules/config.py) = 33e6eb1f4b6189dc7b5d6aaccc77b0ada6ff19879872b658bf4863ffa5b582395d99933d172ef05366ba8d780b7bde3de94ee9868d445f312c41ae4554f78115
SHA512 (./modules/gui.py) = ab8714ff2d7e1de20a0dfb157080e5cf6445878fa32c83d33b55d7dbf2b78b8b8e20c89e8783ae0c209a5e877f2f3380697ddfbc2274328e695c5bfeb3db1a81
SHA512 (./modules/gui.py) = 04e10e1960f6012a68ff5572f6cdff673b2f8b96d7925c56397786625e839d97f140d3a6d14ec3913b66829f4f03597eb1a3bf9bc2396231eb136c94631d6037
SHA512 (./modules/message.py) = 6317f72ac6c20c842f17663f0e896ad36f517d852227d0523d84a2a8d90c08e150b47a5ddfc3155a14821818d081f4d9ed7a5a533d828337dd300f3df7ccd79d
SHA512 (./modules/notification.py) = 08a3036a9f849b45e40e7cb4ae542ff4ac1e6b44aeb0fdceaced556b7bd218ecc2337f1c670b28f066390e689f6938edfa39697d4237e532033b7ea80fbca374
SHA512 (./modules/services.py) = 029b63d9b41c9d62e5b639fe6ff5e1bbaa665e4942a615c2c1a9f46e8863c1bbd78560b2d3ebf1b2c0762f4b19536bacf14698d8845da960f604fa1f6181c744
SHA512 (./modules/tools.py) = aa06725d7e6319fcfa35a5bc896df719d82130005ddd019f4bffb11a1a2eb65e3dafed1822433b0312d3e7c1404b9c303e7f8c15583e6bbb927608d1454cd646
SHA512 (./modules/services.py) = e0964fa17439956d85e916f0cd9b1b7d8d951c83fcb496e0e82cd5fe0d11fd66ec31369049d44be7025082a73679988dc42714af71b4387e07502826e7b6d2a6
SHA512 (./modules/tools.py) = 4ea757629de98ea93eb7ce00af922fc54cb5f71ba73c81932421427a5157671840c0f0048c0611dcf7c616871be32879f5e9cc703119d3b0e29a8e5d5a30807f
SHA512 (./modules/tooltip.py) = 5a7594694149b4760acf4a97470283467d76e862a6f2c2b1f748b74d09fe3efe22a3e5a06519a3499f71dfd391c7c425e1e2067ac9c61a43d5aafb20fe0b5a51
SHA512 (./modules/worker.py) = 8cc46222356bf403888b3e64cd91cd6ffa98cd7a981ae80c1b737c9e9a6511787af1e6cd5b1c766c514507171b1ff8337c63818eaa8edc361471325b3e76042c
SHA512 (./modules/html.py) = 287894227534e008d24db6a8510158e8c073787da397e9343dba3f7326d4e14daef7b376f80b621959cd054ec4073ad69292dc09f511304891586feecefd2c32
SHA512 (./t2.py) = 347a70754579de1a916432394eabc768c2c33e15f48605c3cb20cb560ee7f713d04bf83b9818bd42385075b9ae12b2f65bc63f3ea8be03f2910ac75cf6c1621d
SHA512 (./test.py) = 5d0cb5271b6fc9c0544a9aaeb41e96cca44caf36cd1376e6b695709439530e5b5b64dab25326701adb51751b31bb1f3ee595dfda4487c3508c7e2d95d7cc555a
SHA512 (./test.ui) = a53b8038814bba03782ca4cf5005f1431e8e9a69912bc6e39bd654a7499c3850b9ecf829b06b475bf144b42340e0617fb3eed15ac2140dbdfaa2ef948583a9bc
SHA512 (./ui.tcl) = 213dd04387aebb62462e197dc0ae5603ebff51f86e1567b94aeaf6f42cd173ed2e93ffea5420eb337200a142dc0670e9aa814d2a4777aa7e0c0acccd1395c6a6
SHA512 (./yup.tk.py) = 0aa40c11821bb069556ba2dad8ff920ce2c98161c8db2faa9b322a8f2a64625f98d86680ee907bf9ceff55178071783b2e329b61cc1a524808b5c9d992070425
SHA512 (./t3.py) = 44298d34995f95da821523e003c968a3cf0486a4a22bbed092cd47b1bf760d8ba74e91683ca44c8bbf36fac3d00ece0012d184ea9d9bc396a576db29e2a6b7a1
SHA512 (./modules/html.py) = 2e136f0ad7731dd0e4720d6fea9e4063bd1dafd9ecea1a0993de58141e584be1c7e16b561db0a711966750c9ef42166b46db6537b62dceb74b9235de3adcd145
SHA512 (./yup.tk.py) = e2d306e1c0f37b33342e1918f21fa15d420a69dad0d52b9d0d01778d7a23dd3e134d933c9f310b40f18d5117dd47c5010730b3b6a6cb0e146e6bf8cbae4edd96
<!DOCTYPE html>
<html lang="{LANG}">
<head>
<title>{TITLE}</title>
<meta charset="utf-8">
<style>
body { background-color: #204A87; }
h1 { font-size: 1.5em; font-weight: bold; margin: 3em; text-align: center; }
h2 { font-size: 1.4em; font-weight: bold; margin: 2.5em; }
h3 { font-size: 1.3em; font-weight: bold; margin: 2em;}
/* Set height of the grid so .sidenav can be 100% (adjust if needed) */
.row.content {height: auto;}
/* Set gray background color and 100% height */
.sidenav {
background-color: #204A87;
height: 100%;
}
.sidenav h1, h2 { color: #eee; }
.sidenav h2 { font-weight: normal; }
.sidenav ul { margin-top: 10px; }
.sidenav a { color: #ccc; }
.brd-l {
border-left: 1px dotted #333;
background-color: #eee;
}
article {
background-color: #EFEFEF;
border-bottom: 1px solid #333;
}
article h2 { color: #000; }
article dl { margin: 1em; }
article dt { margin: 0.9em; text-align: center;}
article dd { margin: 0.7em; padding: 0.7em; }
article dd.layout { background-color: #F5F5F5; }
article input { background-color: #F5F5F5; width: 100%;}
header {
border-bottom: 1px dotted #333;
padding: 10px;
}
/* Set black background color, white text and some padding */
footer {
background-color: #555;
color: #ccc;
padding: 15px;
}
footer a {
color: #fff;
}
footer a:hover {
color: #ccc;
}
/* On small screens, set height to 'auto' for sidenav and grid */
@media screen and (max-width: 767px) {
.sidenav {
height: auto;
padding: 15px;
}
.row.content {height: auto;}
}
</style>
</head>
<body>
<section>
<!-- {ARTICLE} -->
</section>
<footer class="container-fluid">
<p> - {NAME} :: <a href="{URL_WEB}">{DESCR}</a> ({URL_HISTORIC}) - {COPYRIGHT} - {LICENCE}</p>
</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="{LANG}">
<head>
<title>{TITLE}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bootstrap.min.css">
<script src="bootstrap.min.js"></script>
<style>
body { background-color: #204A87; }
h1 { font-size: 1.5em; font-weight: bold; margin: 3em; text-align: center; }
h2 { font-size: 1.4em; font-weight: bold; margin: 2.5em; }
h3 { font-size: 1.3em; font-weight: bold; margin: 2em;}
/* Set height of the grid so .sidenav can be 100% (adjust if needed) */
.row.content {height: auto;}
/* Set gray background color and 100% height */
.sidenav {
background-color: #204A87;
height: 100%;
}
.sidenav h1, h2 { color: #eee; }
.sidenav h2 { font-weight: normal; }
.sidenav ul { margin-top: 10px; }
.sidenav a { color: #ccc; }
.brd-l {
border-left: 1px dotted #333;
background-color: #eee;
}
article {
background-color: #EFEFEF;
border-bottom: 1px solid #333;
}
article h2 { color: #000; }
article dl { margin: 1em; }
article dt { margin: 0.9em; text-align: center;}
article dd { margin: 0.7em; padding: 0.7em; }
article dd.layout { background-color: #F5F5F5; }
article input { background-color: #F5F5F5; width: 100%;}
header {
border-bottom: 1px dotted #333;
padding: 10px;
}
/* Set black background color, white text and some padding */
footer {
background-color: #555;
color: #ccc;
padding: 15px;
}
footer a {
color: #fff;
}
footer a:hover {
color: #ccc;
}
/* On small screens, set height to 'auto' for sidenav and grid */
@media screen and (max-width: 767px) {
.sidenav {
height: auto;
padding: 15px;
}
.row.content {height: auto;}
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row content">
<div class="col-sm-3 sidenav">
<h1>{NAME} :: {DESCR}</h1>
<h2>{ABOUT}</h2>
<hr>
<ul id="nav">
<!-- {LINK} -->
</ul>
</div>
<div class="col-sm-9 brd-l">
<section>
<!-- {ARTICLE} -->
</section>
</div>
</div>
</div>
<footer class="container-fluid">
<p> - {NAME} :: <a href="{URL_WEB}">{DESCR}</a> - {COPYRIGHT} - {LICENCE}</p>
</footer>
</body>
</html>
......@@ -29,7 +29,6 @@ class gui(tk.Tk):
if isinstance(init, dict):
for i in init:
setattr(self, i, init[i])
#print(f'self.{i}: {init[i]}')
self.initialize()
......
......@@ -512,8 +512,7 @@ class Gui(tk.Tk):
def on_btn_send_clicked(self):
''' Build informations for datas'''
#self.wrk_pgbar.start()
#self.wrk_main.start()
self.wrk_main.mng_cursor()
if self.service == 'debianfr' or self.service == 'toilelibre':
......@@ -707,7 +706,7 @@ class Gui(tk.Tk):
def open_historic(self):
'''Display historic file html'''
#self.tool.open_historic(self.cfg['info']['Services']['logname'])
#self.wrk_story.start()
self.wrk_story.set_init(self.dict_for_tools)
self.wrk_story.display_historic(self.cfg['info']['Services']['logname'])
......
......@@ -42,8 +42,8 @@ class ToolsHTML(object):
self.log.info('*** Services :: Build Code HTML :')
article_id = self.image['basename'].lower().replace(' ', '_') \
+ '_' + str(self.image['timestamp'])
article_id = self.image['basename'].lower().replace(' ', '_') + \
'_' + str(self.image['timestamp'])
# manage link of article
if filename == self.config['info']['Services']['logname']:
......@@ -52,19 +52,6 @@ class ToolsHTML(object):
a['href'] = '#' + article_id
a.string = self.image['basename']
self.link.append(a)
#link = '<li><a href="#' + article_id \
#+ '">' + self.image['basename'] + '</a></li>'
# manage head of article
#article = '<article id="' + article_id \
#+ '"><header><h2>' + self.text['html']['title'] \
#+ '"<strong><a href="' + self.image['file'] + '">' \
#+ self.image['basename'] \
#+ '</a></strong>"' + self.text['html']['sended'] \
#+ "<em>" + self.actions[self.service]['label'] + "</em></h2>" \
#+ '<time datetime="' + self.image['time_info'] + '">' \
#+ self.image['time_human'] + "</time></header>"
self.article = self.soup.new_tag('article')
self.article['id'] = article_id
......@@ -94,11 +81,6 @@ class ToolsHTML(object):
self.article.append(header)
# manage bloc to display paramaters
#self.article = article + '<div class="container-fluid">' \
#+ '<div class="row"><div class="col-sm-3"><h3>' \
#+ self.text['html']['h3']['param'] + '</h3><ul>'
div_container = self.soup.new_tag('div')
div_container['class'] = 'container-fluid'
div_row = self.soup.new_tag('div')
......@@ -123,15 +105,12 @@ class ToolsHTML(object):
elif self.service == 'jirafeau' or self.service == "debianfacile":
self.build_html_params_article_jrf()
#self.article = self.article + '</ul><hr></div>'
div_col3.append(self.ul)
hr = self.soup.new_tag('hr')
div_col3.append(hr)
#if hasattr(self, 'hr2') && hasattr(self, 'ul2'):
try:
div_col3.append(self.ul2)
div_col3.append(self.hr2)
......@@ -141,10 +120,7 @@ class ToolsHTML(object):
div_row.append(div_col3)
### end bloc param
# manage bloc to display informations about image
#self.article = self.article + '<div class="col-sm-9 brd-l"><h3>' \
#+ self.text['html']['h3']['infos'] + '</h3><dl>'
# manage bloc to display informations about image
div_col9 = self.soup.new_tag('div')
div_col9['class'] = 'col-sm-9 brd-l'
......@@ -168,15 +144,12 @@ class ToolsHTML(object):
self.build_html_image_jrf()
## end bloc info
#self.article = self.article + '</dl></div>'
div_col9.append(self.dl)
# manage end of article
div_row.append(div_col9)
div_container.append(div_row)
self.article.append(div_container)
#self.html['article'] = self.article + "</div></div></article>"
#self.html['link'] = link
def build_html_image_jrf(self):
'''Jirafeau: Build Html to display image's informations into article'''
......@@ -185,19 +158,7 @@ class ToolsHTML(object):
self.log.debug('Key of self.urls: %s' % key)
self.log.debug('Value of self.urls: %s' % val)
#if key % 2:
#attribut = ' class="layout"'
#else:
#attribut = ''
if key == 0:
#self.article = self.article + '<dt><a href="' + val \
#+ '" title="' + self.image['basename'] + '">' \
#+ '<img alt="' + self.image['basename'] + '" src="' \
#+ self.image['file'] + '" width="' \
#+ str(self.config['info']['Services']['mini_width']) \
#+ '"/></a></dt>'
dt = self.soup.new_tag('dt')
a = self.soup.new_tag('a')
a['href'] = val
......@@ -213,11 +174,6 @@ class ToolsHTML(object):
dt.append(a)
self.dl.append(dt)
#elif key == 2:
#self.article = self.article + '<dd' + attribut + '>' \
#+ self.text['html']['jirafeau']['infos'][key] \
#+ '<strong>' + val + '</strong></dd>'
elif key == 4 or key == 5:
# encode htmlentities
encoded = html.escape(val, quote=True)
......@@ -226,11 +182,6 @@ class ToolsHTML(object):
size = str(len(val))
self.log.debug('Size: %s' % size)
#self.article = self.article + '<dd' + attribut + '>' \
#+ self.text['html']['jirafeau']['infos'][key] \
#+ '<br><input type="text" readonly="readonly" size="' \
#+ size + '" value="' + encoded + '"/></dd>'
dd = self.soup.new_tag('dd')
if key % 2:
dd['class'] = 'layout'
......@@ -251,12 +202,6 @@ class ToolsHTML(object):
del(encoded, size)
else:
#self.article = self.article + '<dd' + attribut + '>' \
#+ self.text['html']['jirafeau']['infos'][key] \
#+ '<strong><a href="' + val + '" title="' \
#+ self.image['basename'] + '">' + val \
#+ '</a></strong></dd>'
dd = self.soup.new_tag('dd')
if key % 2:
dd['class'] = 'layout'
......@@ -272,8 +217,6 @@ class ToolsHTML(object):
dd.append(strong)
self.dl.append(dd)
#del(attribut)
def build_html_image_ltm(self):
'''Lutim: Build html to display image's informations into article'''
......@@ -281,20 +224,8 @@ class ToolsHTML(object):
self.log.debug('Key of self.urls: %s' % key)
self.log.debug('Value of self.urls: %s' % val)
#if key % 2:
#attribut = ' class="layout"'
#else:
#attribut = ''
if key == 0:
#self.article = self.article + '<dt><a href="' + val \
#+ '" title="' + self.image['basename'] + '">' \
#+ '<img alt="' + self.image['basename'] + '" src="' \
#+ self.image['file'] + '" width="' \
#+ str(self.config['info']['Services']['mini_width']) \
#+ '"/></a></dt>'
dt = self.soup.new_tag('dt')
a = self.soup.new_tag('a')
a['href'] = val
......@@ -316,12 +247,7 @@ class ToolsHTML(object):
# get size
size = str(len(val))
self.log.debug('Size: %s' % size)
#self.article = self.article + '<dd' + attribut + '>' \
#+ self.text['html']['lutim']['infos'][key] \
#+ '<br><input type="text" readonly="readonly" size="' \
#+ size + '" value="' + encoded + '"/></dd>'
dd = self.soup.new_tag('dd')
if key % 2:
dd['class'] = 'layout'
......@@ -340,13 +266,7 @@ class ToolsHTML(object):
del(encoded, size)
else:
#self.article = self.article + '<dd' + attribut + '>' \
#+ self.text['html']['lutim']['infos'][key] \
#+ '<strong><a href="' + val + '" title="' \
#+ self.image['basename'] + '">' + val \
#+ '</a></strong></dd>'
else:
dd = self.soup.new_tag('dd')
if key % 2:
dd['class'] = 'layout'
......@@ -360,10 +280,7 @@ class ToolsHTML(object):
strong.append(a)
dd.append(self.text['html']['lutim']['infos'][key])
dd.append(strong)
#dd.append(a)
self.dl.append(dd)
#del(attribut)
def build_html_image_pix(self):
'''Pix: Build Html to display image's informations into article'''
......@@ -371,12 +288,7 @@ class ToolsHTML(object):
self.log.debug('Key of self.urls: %s' % key)
self.log.debug('Value of self.urls: %s' % val)
#if key % 2:
#attribut = ' class="layout"'
#else:
#attribut = ''
if key == 0:
tag = 'dt'
else:
......@@ -399,13 +311,6 @@ class ToolsHTML(object):
tag.append(strong)
#self.article = self.article + '<' + tag + attribut + '>' \
#+ self.text['html']['pix']['infos'][key] \
#+ '<strong><a href="' + val + '" title="' \
#+ self.text['html']['pix']['infos'][key] \
#+ self.image['basename'] + '">' + val \
#+ '</a></strong></' + tag + '>'
self.dl.append(tag)
elif key == 2 or key == 3:
......@@ -431,11 +336,6 @@ class ToolsHTML(object):
dd.append(br)
dd.append(h_input)
#self.article = self.article + '<dd' + attribut + '>' \
#+ self.text['html']['pix']['infos'][key] \
#+ '<br><input type="text" readonly="readonly" size="' \
#+ size + '" value="' + encoded + '"/></dd>'
self.dl.append(dd)
......@@ -467,12 +367,6 @@ class ToolsHTML(object):
dd.append(h_input)
dd.append(br)
dd.append(val)
#self.article = self.article + '<dd' + attribut + '>' \
#+ self.text['html']['pix']['infos'][key] \
#+ '<br><input type="text" readonly="readonly" size="' \
#+ size + '" value="' + encoded + '"/><br>' + val \
#+ '</dd>'
self.dl.append(dd)
......@@ -480,10 +374,6 @@ class ToolsHTML(object):
del(encoded, size)
else:
#self.article = self.article + '<dd' + attribut + '>' \
#+ self.text['html']['pix']['infos'][key] \
#+ '<br><strong>' + val + '</strong></dd>'
dd = self.soup.new_tag('dd')
if key % 2:
dd['class'] = 'layout'
......@@ -498,14 +388,11 @@ class ToolsHTML(object):
dd.append(strong)
self.dl.append(dd)
#del(attribut, tag)
def build_html_params_article_jrf(self):
'''Jirafeau: Build Html to display paramaters into article'''
for key, val in self.text['html']['jirafeau']['param'][1].items():
#self.article = self.article + '<li>' + val + '<strong>'
li = self.soup.new_tag('li')
li.string = val
......@@ -514,15 +401,11 @@ class ToolsHTML(object):
if key == 0:
nb = self.datas['time']
serv = self.service
#self.article = self.article \
#+ self.actions[self.service]['days'][nb]['label']
strong.string = self.actions[serv]['days'][nb]['label']
del(nb, serv)
elif key == 1:
boolean = self.datas['one_time_download']
#self.article = self.article \
#+ self.text['bool'][boolean]['label']
strong.string = self.text['bool'][boolean]['label']
del(boolean)
......@@ -533,18 +416,14 @@ class ToolsHTML(object):
else:
strong.string = self.datas['key']
#self.article = self.article + text
li.append(strong)
#self.article = self.article + '</strong></li>'
self.ul.append(li)
def build_html_params_article_ltm(self):
'''Lutim: Build Html to display parameters into article'''
for key, val in self.text['html']['lutim']['param'][1].items():
#self.article = self.article + '<li>' + val + '<strong>'
li = self.soup.new_tag('li')
li.append(val)
strong = self.soup.new_tag('strong')
......@@ -552,8 +431,6 @@ class ToolsHTML(object):
if key == 0:
nb = self.datas['delete-day']
serv = self.service
#self.article = self.article \
#+ self.actions[self.service]['days'][nb]['label']
strong.string = self.actions[serv]['days'][nb]['label']
del(nb, serv)
......@@ -563,20 +440,16 @@ class ToolsHTML(object):
elif key == 2:
boolean = self.datas['keep-exif']
#self.article = self.article \
#+ self.text['bool'][boolean]['label']