* planet/__init__.py, gezegen/index.html.tmpl, gezegen/gezegen.py,
www/common.js, www/jquery-1.2.6.min.js: reverted most of the changes that i've done for #2.. * gezegen/config.ini: pushed the new config to the code base..
This commit is contained in:
parent
f005d17030
commit
6adfdfb340
|
@ -14,7 +14,6 @@ days_per_page = 0
|
||||||
feed_timeout = 15
|
feed_timeout = 15
|
||||||
encoding = utf-8
|
encoding = utf-8
|
||||||
locale = tr_TR.UTF-8
|
locale = tr_TR.UTF-8
|
||||||
limit_per_entry = 1500
|
|
||||||
|
|
||||||
date_format = %d %b %Y @ %I:%M %p
|
date_format = %d %b %Y @ %I:%M %p
|
||||||
#date_format = %B %d, %Y %I:%M %p
|
#date_format = %B %d, %Y %I:%M %p
|
||||||
|
@ -66,12 +65,18 @@ face = alierdinckoroglu.png
|
||||||
#email = isingor@gmail.com
|
#email = isingor@gmail.com
|
||||||
#jabber = aisingor@jabber.uludag.org.tr
|
#jabber = aisingor@jabber.uludag.org.tr
|
||||||
|
|
||||||
[http://feeds.feedburner.com/raptiye/acikkaynak/]
|
[http://feeds.feedburner.com/raptiyeorg]
|
||||||
name = Alper Kanat
|
name = Alper Kanat
|
||||||
face = alperkanat.png
|
face = alperkanat.png
|
||||||
#email = tunix@raptiye.org
|
#email = tunix@raptiye.org
|
||||||
#jabber = tunix@jabber.org
|
#jabber = tunix@jabber.org
|
||||||
|
|
||||||
|
[http://blog.oguz.biz/category/gezegen/rss]
|
||||||
|
name = Alper Oğuz
|
||||||
|
face =
|
||||||
|
#email = Alper Oguz <alper@fisek.net>
|
||||||
|
#jabber =
|
||||||
|
|
||||||
[http://www.murekkep.org/wp-feed.php?category_name=bilisim&author_name=admin&feed=rss2]
|
[http://www.murekkep.org/wp-feed.php?category_name=bilisim&author_name=admin&feed=rss2]
|
||||||
name = Alper Orus
|
name = Alper Orus
|
||||||
#email = alperor@linux-sevenler.org
|
#email = alperor@linux-sevenler.org
|
||||||
|
@ -187,7 +192,7 @@ name = Gökdeniz Karadağ
|
||||||
#email = gokdeniz@ceng.metu.edu.tr
|
#email = gokdeniz@ceng.metu.edu.tr
|
||||||
|
|
||||||
|
|
||||||
[http://cekirdek.pardus.org.tr/~gokmen/zangetsu/blog/feed/rss/Gezegen/]
|
[http://blog.ratonred.com/tag/gezegen-linux/feed]
|
||||||
name = Gökmen Göksel
|
name = Gökmen Göksel
|
||||||
face = gokmengoksel.png
|
face = gokmengoksel.png
|
||||||
#email = gokmen@pardus.org.tr
|
#email = gokmen@pardus.org.tr
|
||||||
|
@ -371,7 +376,7 @@ name= Talat Uyarer
|
||||||
#email = talat@uyarer.com
|
#email = talat@uyarer.com
|
||||||
#jabber= uyarertalat@gmail.com
|
#jabber= uyarertalat@gmail.com
|
||||||
|
|
||||||
[http://taybuga.blogspot.com/feeds/posts/default/-/açık standartlar]
|
[http://feeds.feedburner.com/tayfurtaybua]
|
||||||
name= Tayfur Taybuğa
|
name= Tayfur Taybuğa
|
||||||
face = tayfurtaybuga.png
|
face = tayfurtaybuga.png
|
||||||
#email = taybuga@gmail.com
|
#email = taybuga@gmail.com
|
||||||
|
@ -529,3 +534,6 @@ name = LKD.org.tr
|
||||||
name = FTP ekibi
|
name = FTP ekibi
|
||||||
#email = ftp@linux.org.tr
|
#email = ftp@linux.org.tr
|
||||||
|
|
||||||
|
[http://murattikil.blogspot.com/feeds/posts/default]
|
||||||
|
name = Murat TİKİL
|
||||||
|
#email = murattikil@gmail.com
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
#-*- encoding: utf8 -*-
|
|
||||||
|
|
||||||
"""
|
|
||||||
The purpose of this file is to store some common Python functions
|
|
||||||
that we can use everywhere inside the code..
|
|
||||||
|
|
||||||
Author: Alper KANAT <alperkanat@raptiye.org>
|
|
||||||
"""
|
|
||||||
|
|
||||||
def summarize(text, limit=0):
|
|
||||||
"""
|
|
||||||
Removes all HTML tags and cuts the text by limit
|
|
||||||
|
|
||||||
text (string): blog entry that needs to be summarized
|
|
||||||
limit (int): number of characters that the summary can include
|
|
||||||
"""
|
|
||||||
|
|
||||||
import re
|
|
||||||
|
|
||||||
regex = re.compile("<[^<>]*?>")
|
|
||||||
|
|
||||||
if limit > 0 and text.__len__() >= limit:
|
|
||||||
return regex.sub("", text)[:limit] + " [...]"
|
|
||||||
|
|
||||||
return regex.sub("", text)
|
|
|
@ -9,8 +9,6 @@
|
||||||
<link rel="stylesheet" href="bloggers.css" type="text/css" />
|
<link rel="stylesheet" href="bloggers.css" type="text/css" />
|
||||||
<link rel="icon" type="image/png" href="images/planet.png" />
|
<link rel="icon" type="image/png" href="images/planet.png" />
|
||||||
<link rel="alternate" type="application/rss+xml" title="<TMPL_VAR name>" href="rss20.xml" />
|
<link rel="alternate" type="application/rss+xml" title="<TMPL_VAR name>" href="rss20.xml" />
|
||||||
<script type="text/javascript" src="jquery-1.2.6.min.js"></script>
|
|
||||||
<script type="text/javascript" src="common.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="hdr">
|
<div id="hdr">
|
||||||
|
@ -65,22 +63,7 @@
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="post-contents">
|
<div class="post-contents">
|
||||||
<TMPL_IF read_the_rest>
|
<TMPL_VAR content>
|
||||||
<div id="summary_<TMPL_VAR id_hash>">
|
|
||||||
<TMPL_VAR summary>
|
|
||||||
</div>
|
|
||||||
<div id="content_<TMPL_VAR id_hash>" style="display: none">
|
|
||||||
<TMPL_VAR content>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<a href="#" id="toggle_content_<TMPL_VAR id_hash>" onclick="toggleEntry(this.id.split('_')[2]); return false;">
|
|
||||||
Bu yazının devamını okumak için tıklayın.
|
|
||||||
</a>
|
|
||||||
<TMPL_ELSE>
|
|
||||||
<div id="content_<TMPL_VAR id_hash>">
|
|
||||||
<TMPL_VAR content>
|
|
||||||
</div>
|
|
||||||
</TMPL_IF>
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<div id="post-links" style="text-align: center;">
|
<div id="post-links" style="text-align: center;">
|
||||||
|
@ -157,10 +140,10 @@
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h3>Takip edin</h3>
|
<h3>Takip edin</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="<TMPL_VAR link>/rss20.xml">RSS 2.0</a></li>
|
<li><a href="rss20.xml">RSS 2.0</a></li>
|
||||||
<li><a href="<TMPL_VAR link>/rss10.xml">RSS 1.0</a></li>
|
<li><a href="rss10.xml">RSS 1.0</a></li>
|
||||||
<li><a href="<TMPL_VAR link>/foafroll.xml">FOAF</a></li>
|
<li><a href="foafroll.xml">FOAF</a></li>
|
||||||
<li><a href="<TMPL_VAR link>/opml.xml">OPML</a></li>
|
<li><a href="opml.xml">OPML</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -278,18 +278,6 @@ class Planet:
|
||||||
items_list = self.gather_items_info(channels, template_file)
|
items_list = self.gather_items_info(channels, template_file)
|
||||||
|
|
||||||
# Gather item information
|
# Gather item information
|
||||||
|
|
||||||
# Use summary to summarize the entry to N characters and
|
|
||||||
# put a JS link inside to expand and show the content..
|
|
||||||
from gezegen import gezegen
|
|
||||||
|
|
||||||
# getting the limit from the config.ini file
|
|
||||||
limit_per_entry = int(self.tmpl_config_get("Planet", "limit_per_entry", 1500))
|
|
||||||
|
|
||||||
for item in items_list:
|
|
||||||
if item["content"].__len__() >= limit_per_entry:
|
|
||||||
item["summary"] = gezegen.summarize(item["content"], limit_per_entry)
|
|
||||||
item["read_the_rest"] = True
|
|
||||||
|
|
||||||
# Process the template
|
# Process the template
|
||||||
tp = htmltmpl.TemplateProcessor(html_escape=0)
|
tp = htmltmpl.TemplateProcessor(html_escape=0)
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
var entries = []
|
|
||||||
|
|
||||||
function toggleEntry(id) {
|
|
||||||
if ($("#summary_" + id).css("display") == "none") {
|
|
||||||
// change the link text
|
|
||||||
$("#toggle_content_" + id).text("Bu yazının devamını okumak için tıklayın.")
|
|
||||||
} else {
|
|
||||||
// change the link text
|
|
||||||
$("#toggle_content_" + id).text("Bu yazının devamını kapatmak için tıklayın.")
|
|
||||||
}
|
|
||||||
$("#content_" + id).slideToggle()
|
|
||||||
$("#summary_" + id).slideToggle()
|
|
||||||
}
|
|
32
www/jquery-1.2.6.min.js
vendored
32
www/jquery-1.2.6.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user