Tianpu

GAE上搭建了个类Pastebin

  •  
  •   Tianpu · Feb 19, 2012 · 3036 views
    This topic created in 5275 days ago, the information mentioned may be changed or developed.
    没用过python 好麻烦

    xsnippet已经足够好,不满意的地方是标签,作者,语言类型这三个字段不支持中文

    主要修改:
    中文支持
    去掉不相关的js
    数据库gql加上索引
    jquery.min.js使用google托管的

    具体实现:
    主数据使用字典dicronary类型循环造临时数据,然后urllib.quote之
    标签正则使用(.*)贪婪匹配,正常的([0-9a-z%-_]+)中文还是不行

    仍旧不足:
    中文的png输出还是乱码,估计牵涉到字体问题,不解决了
    功能上在清爽和功能的平衡不知道是否足够
    没用过python,可能引入的新代码效率上不行,有时间php重写算了

    文件参考:
    修改文件 http://www.zhantie.org/tags/zhantie.org
    原始文件 https://github.com/bloodeclipse/xsnippet

    系统架构:
    Google App Engine
    Cloudflare CDN

    http://www.zhantie.org/
    http://zhantieorg.appspot.com/

    永不丢失的数据 哈
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5209 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 09:08 · PVG 17:08 · LAX 02:08 · JFK 05:08
    ♥ Do have faith in what you're doing.