aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-11-04 17:29:12 +0000
committerng0 <ng0@n0.is>2019-11-04 17:29:12 +0000
commite77ce16da8a9ef9033301464b2f77a481189a28e (patch)
tree728cf23823825175fa9d3ba69ed636b6b8a88f8e
parent5c6b2d1f3cdfbf7cfbfac9c1b9bbb943d4bc5afb (diff)
downloadwww-e77ce16da8a9ef9033301464b2f77a481189a28e.tar.gz
www-e77ce16da8a9ef9033301464b2f77a481189a28e.zip
add more old news to dict.
-rwxr-xr-xtemplate.py129
1 files changed, 105 insertions, 24 deletions
diff --git a/template.py b/template.py
index 27c143ee..f2fc9a67 100755
--- a/template.py
+++ b/template.py
@@ -186,9 +186,11 @@ def generation_dir(htmldir):
186 rm_rf(oldgen) 186 rm_rf(oldgen)
187 187
188 188
189def copy_static (locale, indict): 189def copy_static(locale, indict):
190 for key, value in indict.items(): 190 for key, value in indict.items():
191 print(locale + "/" + key + " ...to... " + locale + "/" + value) 191 print(locale + "/" + key + " ...to... " + locale + "/" + value)
192
193
192# fileop(in, out, "copy") 194# fileop(in, out, "copy")
193 195
194# At this moment in time, constructing this list dynamically would be 196# At this moment in time, constructing this list dynamically would be
@@ -196,22 +198,101 @@ def copy_static (locale, indict):
196# no real use of jinja yet and furthermore we would be better off 198# no real use of jinja yet and furthermore we would be better off
197# just using static html + css + some awk and other base tools. 199# just using static html + css + some awk and other base tools.
198newsposts = [ 200newsposts = [
199 {'page': '2019-0.11.8.html', 'date': '2019-10-30', 'title': 'GNUnet 0.11.8'}, 201 {
200 {'page': '2019-0.11.7.html', 'date': '2019-10-27', 'title': 'GNUnet 0.11.7'}, 202 'page': '2019-0.11.8.html',
201 {'page': '2019-10-ICANNPanel.html', 'date': '2019-10-20', 'title': 'ICANN Panel'}, 203 'date': '2019-10-30',
202 {'page': '2019-10-GNSSpec1.html', 'date': '2019-10-04', 'title': 'GNS Spec 1'}, 204 'title': 'GNUnet 0.11.8'
203 {'page': '2019-0.11.6.html', 'date': '2019-07-24', 'title': 'GNUnet 0.11.6'}, 205 },
204 {'page': '2019-07-GHM_Aug_2019.html', 'date': '2019-07-17', 'title': 'GNUnet Hacker Meeting 2019'}, 206 {
205 {'page': '2019-06-DSTJ.html', 'date': '2019-06-28', 'title': 'DSTJ'}, 207 'page': '2019-0.11.7.html',
206 {'page': '2019-0.11.5.html', 'date': '2019-06-05', 'title': 'GNUnet 0.11.5'}, 208 'date': '2019-10-27',
207 {'page': '2019-06.html', 'date': '2019-06-01', 'title': '2019-06'}, 209 'title': 'GNUnet 0.11.7'
208 {'page': '2019-0.11.4.html', 'date': '2019-05-12', 'title': 'GNUnet 0.11.4'}, 210 },
209 {'page': '2019-0.11.3.html', 'date': '2019-04-07', 'title': 'GNUnet 0.11.3'}, 211 {
210 {'page': '2019-0.11.2.html', 'date': '2019-04-04', 'title': 'GNUnet 0.11.2'}, 212 'page': '2019-10-ICANNPanel.html',
211 {'page': '2019-0.11.1.html', 'date': '2019-04-03', 'title': 'GNUnet 0.11.1'}, 213 'date': '2019-10-20',
212 {'page': '2019-0.11.0.html', 'date': '2019-02-28', 'title': 'GNUnet 0.11.0'}, 214 'title': 'ICANN Panel'
213 {'page': '2019-02.html', 'date': '2019-02-01', 'title': 'Google Summer of Code 2019'}, 215 },
214 {'page': '2017-10.html', 'date': '2017-10-01', 'title': 'Launching the new gnunet.org'}, 216 {
217 'page': '2019-10-GNSSpec1.html',
218 'date': '2019-10-04',
219 'title': 'GNS Spec 1'
220 },
221 {
222 'page': '2019-0.11.6.html',
223 'date': '2019-07-24',
224 'title': 'GNUnet 0.11.6'
225 },
226 {
227 'page': '2019-07-GHM_Aug_2019.html',
228 'date': '2019-07-17',
229 'title': 'GNUnet Hacker Meeting 2019'
230 },
231 {
232 'page': '2019-06-DSTJ.html',
233 'date': '2019-06-28',
234 'title': 'Peer DSTJ is dead, long live peer Y924'
235 },
236 {
237 'page': '2019-0.11.5.html',
238 'date': '2019-06-05',
239 'title': 'GNUnet 0.11.5'
240 },
241 {
242 'page': '2019-06.html',
243 'date': '2019-06-01',
244 'title': '2019-06'
245 },
246 {
247 'page': '2019-0.11.4.html',
248 'date': '2019-05-12',
249 'title': 'GNUnet 0.11.4'
250 },
251 {
252 'page': '2019-0.11.3.html',
253 'date': '2019-04-07',
254 'title': 'GNUnet 0.11.3'
255 },
256 {
257 'page': '2019-0.11.2.html',
258 'date': '2019-04-04',
259 'title': 'GNUnet 0.11.2'
260 },
261 {
262 'page': '2019-0.11.1.html',
263 'date': '2019-04-03',
264 'title': 'GNUnet 0.11.1'
265 },
266 {
267 'page': '2019-0.11.0.html',
268 'date': '2019-02-28',
269 'title': 'GNUnet 0.11.0'
270 },
271 {
272 'page': '2019-02.html',
273 'date': '2019-02-01',
274 'title': 'Google Summer of Code 2019'
275 },
276 {
277 'page': '2018-08.html',
278 'date': '2018-08-14',
279 'title': 'GSoC 2018 - GNUnet Web-based User Interface'
280 },
281 {
282 'page': '2018-07.html',
283 'date': '2018-07-01',
284 'title': 'Second GNUnet Hacker Meeting 2018'
285 },
286 {
287 'page': '2018-06.html',
288 'date': '2018-06-06',
289 'title': 'GNUnet 0.11.0pre66'
290 },
291 {
292 'page': '2017-10.html',
293 'date': '2017-10-01',
294 'title': 'Launching the new gnunet.org'
295 },
215] 296]
216 297
217 298
@@ -233,13 +314,13 @@ def generate_site(root):
233 else: 314 else:
234 return "../" + locale + "/" + filename 315 return "../" + locale + "/" + filename
235 316
236 def url_static (filename): 317 def url_static(filename):
237 if root == "news": 318 if root == "news":
238 return "../../static/" + filename 319 return "../../static/" + filename
239 else: 320 else:
240 return "../static/" + filename 321 return "../static/" + filename
241 322
242 def url_dist (filename): 323 def url_dist(filename):
243 if root == "news": 324 if root == "news":
244 return "../../dist/" + filename 325 return "../../dist/" + filename
245 else: 326 else:
@@ -261,7 +342,6 @@ def generate_site(root):
261 # return "../" + x 342 # return "../" + x
262 return "../" + x 343 return "../" + x
263 344
264
265 for l in glob.glob("locale/*/"): 345 for l in glob.glob("locale/*/"):
266 locale = os.path.basename(l[:-1]) 346 locale = os.path.basename(l[:-1])
267 347
@@ -310,13 +390,14 @@ def main():
310 generate_site("template") 390 generate_site("template")
311 print("generating news") 391 print("generating news")
312 generate_site("news") 392 generate_site("news")
393
394
313# for l in glob.glob("locale/*/"): 395# for l in glob.glob("locale/*/"):
314# locale = os.path.basename(l[:-1]) 396# locale = os.path.basename(l[:-1])
315# copy_static (locale, staticfiles) 397# copy_static (locale, staticfiles)
316 # generate_rss 398# generate_rss
317 #print("running generation") 399#print("running generation")
318 #generation_dir 400#generation_dir
319
320 401
321if __name__ == "__main__": 402if __name__ == "__main__":
322 main() 403 main()