Permalink
Browse files

attempt of writing statsview.py, doesn't work for unknown reasons

  • Loading branch information...
1 parent ce8a765 commit 289d3ceaf702c97647d6b3f9d25f3902bcdca295 Fred committed Aug 9, 2011
Showing with 1,897 additions and 1,154 deletions.
  1. +6 −3 app.yaml
  2. +16 −4 bulkloader.yaml
  3. +5 −1 bydate.tmpl
  4. +4 −7 bystats.tmpl
  5. +15 −8 content/site.css
  6. +2 −2 cron.yaml
  7. +1 −1 database.tmpl
  8. +0 −8 faq.html
  9. +1,577 −526 feedparser.py
  10. +3 −0 feeds.tmpl
  11. +0 −79 htmlcutstring.py
  12. +264 −510 main.py
  13. +1 −3 planetmath.tmpl
  14. +2 −2 start.tmpl
  15. +1 −0 weekly_picks.tmpl
View
@@ -6,7 +6,7 @@ api_version: 1
handlers:
- url: /remote_api
script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
- login: admin
+ login: admin
- url: /content/(.*)
static_files: content/\1
upload: content/(.*)
@@ -16,10 +16,10 @@ handlers:
- url: /fetch
script: main.py
login: admin
-- url: /fetchall
+- url: /allworker
script: main.py
login: admin
-- url: /fetchsync
+- url: /taglistworker
script: main.py
login: admin
- url: /clearpagecache
@@ -30,3 +30,6 @@ handlers:
login: admin
- url: .*
script: main.py
+
+builtins:
+- datastore_admin: on
View
@@ -36,8 +36,8 @@ transformers:
- property: homepage
external_name: homepage
- - property: comments
- external_name: comments
+ - property: comments_url
+ external_name: comments_url
- property: favicon
external_name: favicon
@@ -67,7 +67,19 @@ transformers:
external_name: language
# Type: String Stats: 128 properties of this type in this kind.
- - property: url
- external_name: url
+ - property: posts_url
+ external_name: posts_url
# Type: String Stats: 128 properties of this type in this kind.
+ - property: comments_day
+ external_name: comments_day
+
+ - property: comments_week
+ external_name: comments_week
+
+ - property: posts_week
+ external_name: posts_week
+
+ - property: posts_month
+ external_name: posts_month
+
View
@@ -1,3 +1,5 @@
+#from main import *
+
$header
$menu
@@ -22,18 +24,20 @@ $menu
</tr>
</thead>
<tbody>
- #for $entry in $allentries
+ #for $entry in $Post.gql("WHERE category IN ['pure','applied'] ORDER BY timestamp_created LIMIT 150")
<tr>
<td valign="bottom" class="datecolumn">
<div>
<%= entry.printShortTime_created() %>
</div>
</td>
+ #raw
<td valign="bottom" class="blogcolumn">
<div>
<a href="$entry.homepage" title="<%=entry.service%>"><%=entry.service%></a>
</div>
</td>
+ #end raw
<td valign="bottom" class="postcolumn">
<div>
<a href="$entry.link" title="<%=entry.title%>"><%=entry.title%></a>
View
@@ -4,10 +4,7 @@ $menu
<div class="content">
-<p> Warning! We calculate the numbers based on the current feeds. </p>
-<p>If a feed only contains 10 entries, the stats will be at most 10 -- beware of multiples of 5!</p>
-
-<table class="rankingcolumn" id="postsbydate">
+<table class="bydate" id="commentsperday">
<thead>
<tr>
<th align="left" class="datecolumn">
@@ -35,7 +32,7 @@ $menu
</tbody>
</table>
-<table class="rankingcolumn" id="postsbydate">
+<table class="bydate" id="commentsperweek">
<thead>
<tr>
<th align="left" class="datecolumn">
@@ -64,7 +61,7 @@ $menu
</table>
-<table class="rankingcolumn" id="postsbydate">
+<table class="bydate" id="postsperweek">
<thead>
<tr>
<th align="left" class="datecolumn">
@@ -96,7 +93,7 @@ $menu
</tbody>
</table>
-<table class="rankingcolumn" id="postsbydate">
+<table class="bydate" id="postspermonth">
<thead>
<tr>
<th align="left" class="datecolumn">
View
@@ -263,6 +263,7 @@ width:500px;
{
float:left;
display:block;
+width: 75px;
font-size:small;
font-weight:bold;
color:#FFFFFF;
@@ -281,7 +282,9 @@ background-color:black;
/* ------------ Begin Date View Table --------------- */
-#postsbydate {
+.bydate {
+ float: left;
+ margin: 1ex !important;
table-layout: fixed;
margin: 5ex;
padding: 5px;
@@ -290,37 +293,37 @@ background-color:black;
-webkit-box-shadow: 4px 4px 8px black;
}
-#postsbydate td {
+.bydate td {
border-bottom: 1px dashed gray;
}
-#postsbydate tbody .datecolumn {
+.bydate tbody .datecolumn {
width: 7ex;
font-size: 80%;
text-align: left;
}
-#postsbydate tbody div {
+.bydate tbody div {
height: 1.2em;
overflow: hidden;
}
-#postsbydate tbody .blogcolumn {
+.bydate tbody .blogcolumn {
width: 30ex;
font-size: 80%;
text-align: left;
}
-#postbydate tbody .postcolumn {
+.bydate tbody .postcolumn {
text-align: left;
width: 50ex;
}
-#postsbydate a {
+.bydate a {
text-decoration: none;
}
-#postsbydate .postcolumn a {
+.bydate .postcolumn a {
font-size: 90%;
color: black;
}
@@ -361,7 +364,11 @@ background-color:black;
-webkit-box-shadow: 4px 4px 7px black;
border: 1px solid gray;
padding: 18px 18px 18px 18px;
+<<<<<<< HEAD
+ margin: 10px 10px 30px 10px;
+=======
margin: 10px 10px 50px 10px;
+>>>>>>> 1bb0d5aa9e26b8ac4f90bbc4ede5fe9b3bc86ce2
}
.planetbody, .planetbody h1, .planetbody h2, .planetbody h3, .planetbody h4 {
View
@@ -1,4 +1,4 @@
cron:
- description: check for feed updates
- url: /fetchall
- schedule: every 3 hours
+ url: /allworker
+ schedule: every 2 hours
View
@@ -1,4 +1,4 @@
title, homepage, person, category, url, comments, priority, subject, favicon
-#for $feed in $qf.get().order("categoyr")
+#for $feed in $qf.get().order("category")
"<%=feed.title%>",<%=feed.homepage%>,<%=feed.person%>,<%=feed.category%>,<%=feed.url%>,<%=feed.comments%>,<%=feed.priority%>,<%=feed.subject%>,<%=feed.favicon%>
#end for
View
@@ -1,8 +0,0 @@
-<html>
-<head>
- <title>FAQ</title>
-</head>
-<body>
-A FAQ.
-</body>
-</html>
Oops, something went wrong.

0 comments on commit 289d3ce

Please sign in to comment.