开源一个博客系统 - Peach-blog 用 flask 开发的 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
leetao94
V2EX    Python

开源一个博客系统 - Peach-blog 用 flask 开发的

  •  3
     
  •   leetao94
    lt94 2018-12-04 16:27:26 +08:00 3114 次点击
    这是一个创建于 2504 天前的主题,其中的信息可能已经有所发展或是发生改变。

    项目地址: https://github.com/lt94/peach-blog.git

    Peach-Blog

    开发这个目的就是,方便自己可以在 hexo 搭建的静态博客来回切换

    Features

    1. support export hexo's posts into database
    2. support export database's posts into hexo-format markdown file
    3. add new dashboard base on flask-admin
    4. add markdown support to flask-admin

    Screenshots

    Usages

    environment

    pip install -r requirements.txt 

    init database

    before you execute following lines,make sure you have already create database

    flask shell 

    you'are supposed to see, something like follow one:

    Python 3.6.5 App: app [development] Instance: path\to\instance 

    then

    >>> from app import db >>> db.create_all() # create super user >>> from app.models import User >>> user = User(user_name='your name',password='your password', level=1) >>> db.session.add(user) >>> db.session.commit() 

    export hexo's posts into database

    if you want to export hexo posts into database, change the value of config.py on line 14 (where the hexo's posts store),then

    flask hexo g 

    clean the posts,just use flask hexo c simplely

    run the server

    flask run 

    export database's posts into hexo-format markdown files

    login in peach-blog admin, and step into post list pages, and then (see the picture)

    the expoted post will generate under the directory where you set in config.py

    About Dev

    测试网址: http://132.232.71.126 测试账户: test/test, 没有修改,新增权限

    还有命令行导出功能,rss 等功能待开发

    17 条回复    2018-12-05 16:31:16 +08:00
    tulanxiaoxin
        1
    tulanxiaoxin  
       2018-12-04 16:45:29 +08:00
    文章的字是真的大
    xi2008wang
        2
    xi2008wang  
       2018-12-04 16:47:44 +08:00
    不错
    leetao94
        3
    leetao94  
    OP
       2018-12-04 16:52:30 +08:00
    @tulanxiaoxin 怕看不清楚,哈哈
    leetao94
        4
    leetao94  
    OP
       2018-12-04 16:52:41 +08:00
    @xi2008wang 谢谢~哈哈
    liuxu
        5
    liuxu  
       2018-12-04 16:56:58 +08:00
    哈哈,右边的小球很好玩
    hlwjia
        6
    hlwjia  
    PRO
       2018-12-04 16:57:47 +08:00
    支持
    leetao94
        7
    leetao94  
    OP
       2018-12-04 16:58:44 +08:00
    @liuxu 特意找的插件~O(∩_∩)O
    leetao94
        8
    leetao94  
    OP
       2018-12-04 16:58:53 +08:00
    @hlwjia 谢谢~
    QQ2171775959
        9
    QQ2171775959  
       2018-12-04 17:07:15 +08:00
    有点详细,配有图表。
    www5070504
        10
    www5070504  
       2018-12-04 17:07:32 +08:00
    m 感觉很不错
    shuizhengqi
        11
    shuizhengqi  
       2018-12-04 17:10:32 +08:00
    不是想打击你。。你这个样式,真的是见得好多,而且最上面的导航栏是 bootstrap 的样式吧
    leetao94
        12
    leetao94  
    OP
       2018-12-04 17:12:52 +08:00
    @shuizhengqi 是的~flask-bootstrap~
    leetao94
        13
    leetao94  
    OP
       2018-12-04 17:13:02 +08:00
    @www5070504 感谢支持
    mrrobot97
        14
    mrrobot97  
       2018-12-05 11:18:36 +08:00
    买个域名吧
    leetao94
        15
    leetao94  
    OP
       2018-12-05 11:28:11 +08:00
    @mrrobot97 之前在阿里云买了域名备案了,现在是腾讯云的服务器,还得接入备案~~好麻烦 0.0
    mrrobot97
        16
    mrrobot97  
       2018-12-05 15:57:05 +08:00
    @leetao94 所以博客我觉得还是搭建在国外的服务器比较好,国内备案后想写点什么翻墙的都不行。
    leetao94
        17
    leetao94  
    OP
       2018-12-05 16:31:16 +08:00
    @mrrobot97 国外的有时候访问速度挺慢的~
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     5578 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 37ms UTC 07:20 PVG 15:20 LAX 00:20 JFK 03:20
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86