Skip to main content

building your blog including file server and database

Project description

bloggart

介绍

极速构建博客,内嵌server/database,适合全栈

软件架构

软件架构说明

安装教程

  1. pip3 install -i https://mirrors.aliyun.com/pypi/simple/ tornado
  2. xxxx
  3. xxxx

使用说明

  1. 直接使用bloggart命令
  2. xxxx
  3. xxxx

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

直接用

间接用

二次开发

注意

安全性完全没有

发布

python3 -m venv bloggart-venv/
source bloggart-venv/bin/activate.fish

# 调试好之后
python3 -m pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple/
pip3 install -i https://mirrors.aliyun.com/pypi/simple/ setuptools wheel
python3 setup.py sdist bdist_wheel

pip3 freeze > requirements.txt
# requirements添加一个peppercorn
echo 'peppercorn' >> requirements.txt
pip3 download -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ -d dist/

cd dist/
dir2pi -S .
scp -r simple/ root@39.97.232.223:/root/pypi/
pip3 install -i http://www.hohohaha.cn:8000/simple/ bloggart==0.0.2 --trusted-host www.hohohaha.cn

上传到pypi

# python3 -m venv bloggart-venv/
source bloggart-venv/bin/activate.fish
rm -rf dist/*
python3 setup.py sdist bdist_wheel
pip3 install -i https://mirrors.aliyun.com/pypi/simple/ twine
python3 -m twine upload dist/*

安装

pip3 install -i https://pypi.python.org/simple bloggart==0.0.9

开发时

使用开发虚拟环境

python3 -m venv bloggart-dev-venv/
source bloggart-dev-venv/bin/activate.fish

在src目录下工作,如:

cd src

pwd
/home/xiabo/gitee-xiabo0816/bloggart/src

python3 bloggart/header.py -c bloggart/config.ini -p 8888

repeater示例

配置文件内容

; tcp本机中继

[REPEATER]
local_uri=http://127.0.0.1:8000/concate
proxy_uri=repeater
# < v0.1.0
# 原本服务的请求是
curl -X POST 127.0.0.1:8000/concate -d '{ "TPL_TYPE" : "转移支付提前下达", "PRO_START_YEAR" : "2018", "PRO_NAME" : "省财政“三农”转移支付资金", "FISCAL_YEAR" : "2018", "CREATE_TIME" : "2018年6月30日", "EXP_FUNC_CODE" : "农林水支出—农业—其他农业支出(2130199)", "GOV_BGT_ECO_CODE" : "51301-上下级政府间转移性支出", "FOUND_TYPE_CODE" : "一般公共预算", "TP_FUNC_CODE" : "农林水支出—农业—其他农业支出(2130199)", "PRO_PAY_DIC_CODE" : "支出", "POLICY_NAME" : "《财政部关于开展田园综合体建设试点工作的通知》(财办〔2017〕29号)和《关于做好2017年田园综合体试点工作的意见》(财办农〔2017〕71号)", "INCOME_SORT_CODE" : "1100224农村综合改革转移支付收入", "TEMPLATE_ID": "1" }'

# repeater转发后的是
# 注意结尾有-L参数
curl -X POST 127.0.0.1:8888/blogging/repeater -d '{ "TPL_TYPE" : "转移支付提前下达", "PRO_START_YEAR" : "2018", "PRO_NAME" : "省财政“三农”转移支付资金", "FISCAL_YEAR" : "2018", "CREATE_TIME" : "2018年6月30日", "EXP_FUNC_CODE" : "农林水支出—农业—其他农业支出(2130199)", "GOV_BGT_ECO_CODE" : "51301-上下级政府间转移性支出", "FOUND_TYPE_CODE" : "一般公共预算", "TP_FUNC_CODE" : "农林水支出—农业—其他农业支出(2130199)", "PRO_PAY_DIC_CODE" : "支出", "POLICY_NAME" : "《财政部关于开展田园综合体建设试点工作的通知》(财办〔2017〕29号)和《关于做好2017年田园综合体试点工作的意见》(财办农〔2017〕71号)", "INCOME_SORT_CODE" : "1100224农村综合改革转移支付收入", "TEMPLATE_ID": "1" }' -L
# >=v0.1.1
# python3 bloggart/kernel.py  -c config.ini -p 39020
# 原本服务的请求是
curl -X POST 127.0.0.1:8888/check -d '{"text":"拥护动态清零,兼顾经济发展。必须动态的眼光看待这场战役,病毒在变,打法也要随之而变。", "min_senti": 0}'

# repeater转发后的是
# 注意结尾有-L参数
curl -X POST 127.0.0.1:39020/blogging/api -d '{"text":"拥护动态清零,兼顾经济发展。必须动态的眼光看待这场战役,病毒在变,打法也要随之而变。", "min_senti": 100}'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bloggart-0.1.1.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

bloggart-0.1.1-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file bloggart-0.1.1.tar.gz.

File metadata

  • Download URL: bloggart-0.1.1.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.12

File hashes

Hashes for bloggart-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a6c1af63d8f93e280ea8b5140a7eed5a42fea10c5f11f6ca9bc1b6e1b7c10e12
MD5 f0a31581cb332b1c9bbb0b76d7a0eebd
BLAKE2b-256 a294a8da48c9979af8701a98499aff7d72596a41c1470c9a4c2a3c7f07b201d4

See more details on using hashes here.

File details

Details for the file bloggart-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: bloggart-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.12

File hashes

Hashes for bloggart-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d99f057fc4371bda5cfb8990c731cff6a0fde746feaae5a2803cc63dfcec2cdc
MD5 b60b9ba64e221929ee36d805dafda9fb
BLAKE2b-256 6591bca4a85746f0a4a98fce169e6212450afb7d52d8c26f4ac05021701f6bb2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page