mirror of https://gitlab.com/bashrc2/epicyon
				
				
				
			No slash
							parent
							
								
									092be5c5c5
								
							
						
					
					
						commit
						f46f7e4480
					
				| 
						 | 
				
			
			@ -17,7 +17,6 @@ from utils import locatePost
 | 
			
		|||
from utils import loadJson
 | 
			
		||||
from utils import saveJson
 | 
			
		||||
from utils import isSuspended
 | 
			
		||||
# from utils import getConfigParam
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def rss2Header(httpPrefix: str,
 | 
			
		||||
| 
						 | 
				
			
			@ -263,6 +262,10 @@ def addBlogsToNewswire(baseDir: str, newswire: {},
 | 
			
		|||
            if isSuspended(baseDir, nickname):
 | 
			
		||||
                continue
 | 
			
		||||
 | 
			
		||||
            if os.path.isfile(baseDir + '/accounts/' + handle +
 | 
			
		||||
                              '/.nonewswire'):
 | 
			
		||||
                continue
 | 
			
		||||
 | 
			
		||||
            # is there a blogs timeline for this account?
 | 
			
		||||
            accountDir = os.path.join(baseDir + '/accounts', handle)
 | 
			
		||||
            blogsIndex = accountDir + '/tlblogs.index'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -300,5 +300,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "الألقاب التي تظهر إدخالات المدونة الخاصة بها على موقع الأخبار.",
 | 
			
		||||
    "Posts to be approved": "الوظائف المطلوب الموافقة عليها",
 | 
			
		||||
    "Discuss": "مناقشة",
 | 
			
		||||
    "Moderator Discussion": "مناقشة المنسق"
 | 
			
		||||
    "Moderator Discussion": "مناقشة المنسق",
 | 
			
		||||
    "Vote": "",
 | 
			
		||||
    "Remove Vote": ""
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -300,5 +300,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "Sobrenoms les entrades del bloc apareixen a newswire.",
 | 
			
		||||
    "Posts to be approved": "Missatges per aprovar",
 | 
			
		||||
    "Discuss": "Discuteix",
 | 
			
		||||
    "Moderator Discussion": "Discussió sobre moderadors"
 | 
			
		||||
    "Moderator Discussion": "Discussió sobre moderadors",
 | 
			
		||||
    "Vote": "",
 | 
			
		||||
    "Remove Vote": ""
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -300,5 +300,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "Llysenwau y mae eu cofnodion blog yn ymddangos ar y we newyddion.",
 | 
			
		||||
    "Posts to be approved": "Swyddi i'w cymeradwyo",
 | 
			
		||||
    "Discuss": "Trafodwch",
 | 
			
		||||
    "Moderator Discussion": "Trafodaeth Cymedrolwr"
 | 
			
		||||
    "Moderator Discussion": "Trafodaeth Cymedrolwr",
 | 
			
		||||
    "Vote": "",
 | 
			
		||||
    "Remove Vote": ""
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -300,5 +300,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "Spitznamen, deren Blogeinträge im Newswire erscheinen.",
 | 
			
		||||
    "Posts to be approved": "Zu genehmigende Beiträge",
 | 
			
		||||
    "Discuss": "Diskutieren",
 | 
			
		||||
    "Moderator Discussion": "Moderatorendiskussion"
 | 
			
		||||
    "Moderator Discussion": "Moderatorendiskussion",
 | 
			
		||||
    "Vote": "",
 | 
			
		||||
    "Remove Vote": ""
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -300,5 +300,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "Nicknames whose blog entries appear on the newswire.",
 | 
			
		||||
    "Posts to be approved": "Posts to be approved",
 | 
			
		||||
    "Discuss": "Discuss",
 | 
			
		||||
    "Moderator Discussion": "Moderator Discussion"
 | 
			
		||||
    "Moderator Discussion": "Moderator Discussion",
 | 
			
		||||
    "Vote": "Vote",
 | 
			
		||||
    "Remove Vote": "Remove Vote"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -300,5 +300,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "Apodos cuyas entradas de blog aparecen en el newswire.",
 | 
			
		||||
    "Posts to be approved": "Publicaciones a aprobar",
 | 
			
		||||
    "Discuss": "Discutir",
 | 
			
		||||
    "Moderator Discussion": "Discusión del moderador"
 | 
			
		||||
    "Moderator Discussion": "Discusión del moderador",
 | 
			
		||||
    "Vote": "",
 | 
			
		||||
    "Remove Vote": ""
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -300,5 +300,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "Surnoms dont les entrées de blog apparaissent sur le fil de presse.",
 | 
			
		||||
    "Posts to be approved": "Postes à approuver",
 | 
			
		||||
    "Discuss": "Discuter",
 | 
			
		||||
    "Moderator Discussion": "Discussion du modérateur"
 | 
			
		||||
    "Moderator Discussion": "Discussion du modérateur",
 | 
			
		||||
    "Vote": "",
 | 
			
		||||
    "Remove Vote": ""
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -300,5 +300,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "Leasainmneacha a bhfuil a n-iontrálacha blag le feiceáil ar an sreang nuachta.",
 | 
			
		||||
    "Posts to be approved": "Poist le ceadú",
 | 
			
		||||
    "Discuss": "Pléigh",
 | 
			
		||||
    "Moderator Discussion": "Plé Modhnóir"
 | 
			
		||||
    "Moderator Discussion": "Plé Modhnóir",
 | 
			
		||||
    "Vote": "",
 | 
			
		||||
    "Remove Vote": ""
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -300,5 +300,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "उपनाम जिनकी ब्लॉग प्रविष्टियाँ न्यूज़वायर पर दिखाई देती हैं।",
 | 
			
		||||
    "Posts to be approved": "स्वीकृत किए जाने वाले पद",
 | 
			
		||||
    "Discuss": "चर्चा करें",
 | 
			
		||||
    "Moderator Discussion": "मॉडरेटर चर्चा"
 | 
			
		||||
    "Moderator Discussion": "मॉडरेटर चर्चा",
 | 
			
		||||
    "Vote": "",
 | 
			
		||||
    "Remove Vote": ""
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -300,5 +300,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "Soprannomi le cui voci di blog compaiono nel newswire.",
 | 
			
		||||
    "Posts to be approved": "Post da approvare",
 | 
			
		||||
    "Discuss": "Discutere",
 | 
			
		||||
    "Moderator Discussion": "Discussione del moderatore"
 | 
			
		||||
    "Moderator Discussion": "Discussione del moderatore",
 | 
			
		||||
    "Vote": "",
 | 
			
		||||
    "Remove Vote": ""
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -300,5 +300,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "ブログエントリがニュースワイヤーに表示されるニックネーム。",
 | 
			
		||||
    "Posts to be approved": "承認される投稿",
 | 
			
		||||
    "Discuss": "議論する",
 | 
			
		||||
    "Moderator Discussion": "モデレーターディスカッション"
 | 
			
		||||
    "Moderator Discussion": "モデレーターディスカッション",
 | 
			
		||||
    "Vote": "",
 | 
			
		||||
    "Remove Vote": ""
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -296,5 +296,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "Nicknames whose blog entries appear on the newswire.",
 | 
			
		||||
    "Posts to be approved": "Posts to be approved",
 | 
			
		||||
    "Discuss": "Discuss",
 | 
			
		||||
    "Moderator Discussion": "Moderator Discussion"
 | 
			
		||||
    "Moderator Discussion": "Moderator Discussion",
 | 
			
		||||
    "Vote": "Vote",
 | 
			
		||||
    "Remove Vote": "Remove Vote"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -300,5 +300,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "Apelidos cujas entradas de blog aparecem nos jornais.",
 | 
			
		||||
    "Posts to be approved": "Postagens a serem aprovadas",
 | 
			
		||||
    "Discuss": "Discutir",
 | 
			
		||||
    "Moderator Discussion": "Discussão do moderador"
 | 
			
		||||
    "Moderator Discussion": "Discussão do moderador",
 | 
			
		||||
    "Vote": "",
 | 
			
		||||
    "Remove Vote": ""
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -300,5 +300,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "Псевдонимы, чьи записи блога появляются в ленте новостей.",
 | 
			
		||||
    "Posts to be approved": "Посты на утверждение",
 | 
			
		||||
    "Discuss": "Обсудить",
 | 
			
		||||
    "Moderator Discussion": "Обсуждение модератором"
 | 
			
		||||
    "Moderator Discussion": "Обсуждение модератором",
 | 
			
		||||
    "Vote": "",
 | 
			
		||||
    "Remove Vote": ""
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -300,5 +300,7 @@
 | 
			
		|||
    "Nicknames whose blog entries appear on the newswire.": "博客条目出现在新闻专线上的昵称。",
 | 
			
		||||
    "Posts to be approved": "职位待批准",
 | 
			
		||||
    "Discuss": "讨论",
 | 
			
		||||
    "Moderator Discussion": "主持人讨论"
 | 
			
		||||
    "Moderator Discussion": "主持人讨论",
 | 
			
		||||
    "Vote": "",
 | 
			
		||||
    "Remove Vote": ""
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5339,7 +5339,8 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
 | 
			
		|||
    return htmlStr
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def htmlNewswire(newswire: str, nickname: str, moderator: bool) -> str:
 | 
			
		||||
def htmlNewswire(newswire: str, nickname: str, moderator: bool,
 | 
			
		||||
                 translate: {}) -> str:
 | 
			
		||||
    """Converts a newswire dict into html
 | 
			
		||||
    """
 | 
			
		||||
    htmlStr = ''
 | 
			
		||||
| 
						 | 
				
			
			@ -5364,7 +5365,8 @@ def htmlNewswire(newswire: str, nickname: str, moderator: bool) -> str:
 | 
			
		|||
                htmlStr += \
 | 
			
		||||
                    ' ' + \
 | 
			
		||||
                    '<a href="/users/' + nickname + \
 | 
			
		||||
                    '/newswireunvote=' + dateStrLink + '">' + \
 | 
			
		||||
                    '/newswireunvote=' + dateStrLink + '" ' + \
 | 
			
		||||
                    'title="' + translate['Remove Vote'] + '">' + \
 | 
			
		||||
                    '<label class="newswireDateApproved">'
 | 
			
		||||
                htmlStr += dateStr + '</label></a></p>'
 | 
			
		||||
            else:
 | 
			
		||||
| 
						 | 
				
			
			@ -5388,7 +5390,8 @@ def htmlNewswire(newswire: str, nickname: str, moderator: bool) -> str:
 | 
			
		|||
                htmlStr += \
 | 
			
		||||
                    ' ' + \
 | 
			
		||||
                    '<a href="/users/' + nickname + \
 | 
			
		||||
                    '/newswirevote=' + dateStrLink + '">' + \
 | 
			
		||||
                    '/newswirevote=' + dateStrLink + '" ' + \
 | 
			
		||||
                    'title="' + translate['Vote'] + '">' + \
 | 
			
		||||
                    '<label class="newswireDate">'
 | 
			
		||||
                htmlStr += dateStr.replace('+00:00', '') + '</label></a></p>'
 | 
			
		||||
            else:
 | 
			
		||||
| 
						 | 
				
			
			@ -5472,7 +5475,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
 | 
			
		|||
    else:
 | 
			
		||||
        htmlStr += '      <br>\n'
 | 
			
		||||
 | 
			
		||||
    htmlStr += htmlNewswire(newswire, nickname, moderator)
 | 
			
		||||
    htmlStr += htmlNewswire(newswire, nickname, moderator, translate)
 | 
			
		||||
    return htmlStr
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue