Package: torcms
StatusCheckingtorcmswithpylintusing default configuration (Under Debian 11.0),
gets score greater than 8.9.IntroductionFlexible, extensible web CMS framework built on Tornado and Peewee,
compatible with Python 3.7 and above. Using PostgreSQL with JSON
extension as the database( postgresql-server >= 11.0 ).pypi: The kernel of this CMS has been submit to pypi.https://pypi.python.org/pypi/torcms. Could be installed via:pip3 install torcmsFeaturesBuild on Tornado, only with Web features, which made it is simple to use.Markdown editor, make your HTML clean and clear.Carefull desinged model for conents. Post, Info, Page, Wiki as default.User roles for editing.Full text search with Whoosh.PostgreSQL 9.4 above, with JSONB, which makes the framework extensible.Using XLXS, could be parsed byopenpyxl, to define the schema of the database.Access database via Peewee.SASS sub-project for Style.Last version of JQuery. And, Bootstrap as the default CSS framework.Applicationhttp://drr.ikcest.org(Disaster Risk Reduction Knowledge Service of UNESCO)http://wdcrre.data.ac.cn/(World data center for Renewable Resources and Environment)http://www.wds-china.org/(ICSU-WDS, World Data System China)https://www.osgeo.cn(OSGeo China Chapter)http://www.maphub.cn(Merged intohttps://www.osgeo.cn)http://www.yunsuan.org(Merged intohttps://www.osgeo.cn)InstallPull the codes.git clone https://github.com/bukun/TorCMS.gitRequirement for the SystemUnder Debian/Ubuntu$ sudo apt install -y postgresql postgresql-contrib redis-serverCreate the DatabaseCreate the database, and user in PostgreSQL.
The information should be used in thecfg.pyfile.
And, create hstore extension in the database.\set dbname torcms
CREATE USER :dbname WITH PASSWORD '111111' ;
CREATE DATABASE :dbname OWNER :dbname ;
GRANT ALL PRIVILEGES ON DATABASE :dbname to :dbname ;
\c :dbname ;
create extension hstore;
\qFor PythonYou should be under Python 3.4 or Python 3.5.Install libs for Python 3.4 or 3.5,cd TorCMS
pip3 install -r doc/requirements.txtFor Deiban/UbutnuIf you are to use Python of OS system directly, install libs as:sudo apt isntall -y python3-tornado python3-requests python3-openpyxl python3-markdown python3-htmlminHow to RunGet the HTML for modules$ cd TorCMS
$ git clone --depth=1 https://github.com/bukun/torcms_f2elib.git static/f2elibor using the same f2elib via Gitee:$ git clone --depth=1 https://gitee.com/bukun/torcms_f2elib.git static/f2elibEdit the configiure.$ cd TorCMS/
$ cp cfg_demo.py cfg.pyAnd, edit thecfg.pyfile.DB_CFG = {
    'db': 'torcms',
    'user': 'torcms',
    'pass': '111111',
}

SMTP_CFG = {
    'name': 'TorCMS',
    'host': "smtp.ym.163.com",
    'user': "admin@yunsuan.org",
    'pass': "",
    'postfix': 'yunsuan.org',
}

SITE_CFG = {
    'site_url': 'http://127.0.0.1:8888',
    'cookie_secret': '123456',
    'DEBUG': False
}TheDB_CFGdefines the items used for PostgreSQL.Modify the meta information of the web application.Modify the file inTorCMS/database/meta.doc_catalog.yaml, which define the catalog of post.info_tags.xlsx, which define the catalog of info.Initializationpython3 helper.py -i initit willinitialize the PostgreSQL schema.initialize the metadata in database.the whoosh database would be initialized.RunRun the web application,python3 server.py 8088Open web brower and navigate tohttp://127.0.0.1:8088.The port should as be defined in config.py .Enjoy it!Helper ScriptThere are some helper scripts used in the programe.Run the following command to list the different scripts:python3 helper.py -hRun the scripts with the-iswitcher, we have usedinitto do something for initialization.migrate: for database schema change.edit_diff: send email for modification of the posts and pages.sitemap: would generate the sitemap for posts and pages.check_kind: to check if the kind of post is right.check: generate the picture for the relationship of templates. For example:python3 helper.py -i check templates/themewould generate the picture for the relationship of the template files.Unit TestsFirst you should installpytest,coverageandpytest-covwithpip,pip3 install pytest pytest-cov coveragethen run as follow:python3 -m pytest tester --cov=./tester --cov-report=htmlBuild the API documentsunder TorCMSsphinx-apidoc -F -o api_doc torcmsEditingapi_doc/conf.py. Add the following line afterimport sys.sys.path.insert(0, os.path.abspath('../'))That’s OK. then generate the HTML documents. Under TorCMS:sphinx-build -b html api_doc api_htmlPublish to PyPiFirst, build the distribution.python setup.py sdistThen, upload to the website.twine upload dist/torcms-version.tar.gzApplicationhttp://www.osgeo.cn(OSGeo中国中心)http://www.wds-china.org(世界数据系统中国)http://wdcrre.data.ac.cn/(可再生资源与环境世界数据中心)http://drr.ikcest.org(联合国教科文组织国际工程科技知识中心防灾减灾知识服务平台)