Thu, 08 Mar 2007

:: [core]fileentry.py

[core]fileentry.py

1. fixed

Why?
t2t支持的遗留问题
  • 现在我的Blog 基本就两种文件格式:
    1. .py 脚本文件
    2. .t2t 文章
  • 但是模板中 t2t 额外给出的下载 .t2t和.moin 对 .py 的文件不适用!

problem
模板有效输出值 的说明中有问题!
  • file_path just the filename and extensions of the entry
  • 实际上没有后缀!
  • 所以!
hacked:
path/to/site-packages/Pyblosxom/entries/fileentry.py
147 line...
        self['entryext'] = ext
        self['filebasename'] = file_basename
        ...
追加我需要的变量!
模板处理:
这样一来story.*的模板中就可以对应修正输出了!
| <a href="$base_url/$file_path_urlencoded.$flavour" 
    title="permalink">#
    永久链接</a><!--permanent link to this entry-->
    <sup>    
    <a href="/entry/$file_path_urlencoded$entryext">
    $entryext</a>
    <a href="/entry/$file_path_urlencoded.t2t">
    .t2t</a>
    <a href="/entry/$file_path_urlencoded.moin">
    .moin</a>
    </sup>

2. TODO

contribute 分发!
接踵而来的就是如何标准化的反馈社区, 贡献代码了…………
进一步的:
Pyblosxom的模板属于简单模板,在模板中不能加入逻辑的, 所以现在虽然对.py 的文章有了直接下载链接,但是,没有自动生成的.moin 和约定的.t2t 下载并不应该有………… 向社区建议吧…………

动力源自::txt2tags

OpenSource ,PyBlosxom ,hacking ,SNS

::名:Name
::邮:Mail
::址:URL.
注:Comment::

The Magic Word(防Spamer问答)::
Pythonic!What is the 1st word in this sentence?回答本句第一个单词是什么?



::Thu, 08 Mar 2007 10:13 GMT
[PyBlosxom]1.4.3 01/10/2008 | [Python] | [FreeBSD] | [Apache]
一切内容使用
Creative Commons License
Creative Commons Attribution-Noncommercial-Share Alike 3.0 License .