Showing preview only (558K chars total). Download the full file or copy to clipboard to get everything.
Repository: Venom1991/refind-btrfs
Branch: master
Commit: 9c567b94ab8e
Files: 95
Total size: 525.9 KB
Directory structure:
gitextract_hh9l_b0o/
├── .gitignore
├── .pylintrc
├── .vscode/
│ ├── launch.json
│ └── settings.json
├── LICENSE.txt
├── MANIFEST.in
├── README.md
├── pyproject.toml
├── requirements.txt
├── setup.cfg
├── setup.py
├── src/
│ └── refind_btrfs/
│ ├── __init__.py
│ ├── __main__.py
│ ├── boot/
│ │ ├── __init__.py
│ │ ├── antlr4/
│ │ │ ├── RefindConfigLexer.g4
│ │ │ ├── RefindConfigLexer.interp
│ │ │ ├── RefindConfigLexer.py
│ │ │ ├── RefindConfigLexer.tokens
│ │ │ ├── RefindConfigParser.g4
│ │ │ ├── RefindConfigParser.interp
│ │ │ ├── RefindConfigParser.py
│ │ │ ├── RefindConfigParser.tokens
│ │ │ ├── RefindConfigParserVisitor.py
│ │ │ └── __init__.py
│ │ ├── boot_options.py
│ │ ├── boot_stanza.py
│ │ ├── file_refind_config_provider.py
│ │ ├── migrations/
│ │ │ ├── __init__.py
│ │ │ ├── icon_migration_strategies.py
│ │ │ ├── main_migration_strategies.py
│ │ │ ├── migration.py
│ │ │ └── state.py
│ │ ├── refind_config.py
│ │ ├── refind_listeners.py
│ │ ├── refind_visitors.py
│ │ └── sub_menu.py
│ ├── common/
│ │ ├── __init__.py
│ │ ├── abc/
│ │ │ ├── __init__.py
│ │ │ ├── base_config.py
│ │ │ ├── base_runner.py
│ │ │ ├── commands/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── device_command.py
│ │ │ │ ├── icon_command.py
│ │ │ │ └── subvolume_command.py
│ │ │ ├── factories/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── base_device_command_factory.py
│ │ │ │ ├── base_icon_command_factory.py
│ │ │ │ ├── base_logger_factory.py
│ │ │ │ └── base_subvolume_command_factory.py
│ │ │ └── providers/
│ │ │ ├── __init__.py
│ │ │ ├── base_package_config_provider.py
│ │ │ ├── base_persistence_provider.py
│ │ │ └── base_refind_config_provider.py
│ │ ├── boot_files_check_result.py
│ │ ├── checkable_observer.py
│ │ ├── configurable_mixin.py
│ │ ├── constants.py
│ │ ├── enums.py
│ │ ├── exceptions.py
│ │ └── package_config.py
│ ├── console/
│ │ ├── __init__.py
│ │ └── cli_runner.py
│ ├── data/
│ │ ├── refind-btrfs
│ │ ├── refind-btrfs.conf-sample
│ │ └── refind-btrfs.service
│ ├── device/
│ │ ├── __init__.py
│ │ ├── block_device.py
│ │ ├── filesystem.py
│ │ ├── mount_options.py
│ │ ├── partition.py
│ │ ├── partition_table.py
│ │ └── subvolume.py
│ ├── service/
│ │ ├── __init__.py
│ │ ├── snapshot_event_handler.py
│ │ ├── snapshot_observer.py
│ │ └── watchdog_runner.py
│ ├── state_management/
│ │ ├── __init__.py
│ │ ├── conditions.py
│ │ ├── model.py
│ │ └── refind_btrfs_machine.py
│ ├── system/
│ │ ├── __init__.py
│ │ ├── btrfsutil_command.py
│ │ ├── command_factories.py
│ │ ├── findmnt_command.py
│ │ ├── fstab_command.py
│ │ ├── lsblk_command.py
│ │ └── pillow_command.py
│ └── utility/
│ ├── __init__.py
│ ├── file_package_config_provider.py
│ ├── helpers.py
│ ├── injector_modules.py
│ ├── level_aware_formatter.py
│ ├── logger_factories.py
│ └── shelve_persistence_provider.py
└── tests/
└── .keep
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# VS Code #
.vscode/*
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/settings.json
*.code-workspace
# VS Code Patch #
# Ignore all local history of files
.history
.ionide
================================================
FILE: .pylintrc
================================================
[MASTER]
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-whitelist=btrfsutil
# Specify a score threshold to be exceeded before program exits with error.
fail-under=10.0
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS
# Add files or directories matching the regex patterns to the blacklist. The
# regex matches against base names, not paths.
ignore-patterns=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
init-hook='import sys, os; sys.path.append(os.path.join(os.getcwd(), "src", "refind_btrfs"))'
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
jobs=1
# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
# complex, nested conditions.
limit-inference-results=100
# List of plugins (as comma separated values of python module names) to load,
# usually to register additional checkers.
load-plugins=
# Pickle collected data for later comparisons.
persistent=yes
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
confidence=
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=missing-module-docstring,
missing-class-docstring,
missing-function-docstring,
unsubscriptable-object,
inherit-non-class,
too-few-public-methods,
broad-except,
print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
backtick,
long-suffix,
old-ne-operator,
old-octal-literal,
import-star-module-level,
non-ascii-bytes-literal,
raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
apply-builtin,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
dict-iter-method,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
hex-method,
nonzero-method,
cmp-method,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
map-builtin-not-iterating,
zip-builtin-not-iterating,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
eq-without-hash,
div-method,
idiv-method,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
deprecated-operator-function,
deprecated-urllib-function,
xreadlines-attribute,
deprecated-sys-function,
exception-escape,
comprehension-escape
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=c-extension-no-member,
unused-import,
unused-wildcard-import
[REPORTS]
# Python expression which should return a score less than or equal to 10. You
# have access to the variables 'error', 'warning', 'refactor', and 'convention'
# which contain the number of messages in each category, as well as 'statement'
# which is the total number of statements analyzed. This score is used by the
# global evaluation report (RP0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details.
#msg-template=
# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
output-format=text
# Tells whether to display a full report or only the messages.
reports=no
# Activate the evaluation score.
score=yes
[REFACTORING]
# Maximum number of nested blocks for function / method body
max-nested-blocks=5
# Complete name of functions that never returns. When checking for
# inconsistent-return-statements if a never returning function is called then
# it will be considered as an explicit return statement and no message will be
# printed.
never-returning-functions=sys.exit
[BASIC]
# Naming style matching correct argument names.
argument-naming-style=snake_case
# Regular expression matching correct argument names. Overrides argument-
# naming-style.
#argument-rgx=
# Naming style matching correct attribute names.
attr-naming-style=snake_case
# Regular expression matching correct attribute names. Overrides attr-naming-
# style.
#attr-rgx=
# Bad variable names which should always be refused, separated by a comma.
bad-names=foo,
bar,
baz,
toto,
tutu,
tata
# Bad variable names regexes, separated by a comma. If names match any regex,
# they will always be refused
bad-names-rgxs=
# Naming style matching correct class attribute names.
class-attribute-naming-style=any
# Regular expression matching correct class attribute names. Overrides class-
# attribute-naming-style.
#class-attribute-rgx=
# Naming style matching correct class names.
class-naming-style=PascalCase
# Regular expression matching correct class names. Overrides class-naming-
# style.
#class-rgx=
# Naming style matching correct constant names.
const-naming-style=UPPER_CASE
# Regular expression matching correct constant names. Overrides const-naming-
# style.
#const-rgx=
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1
# Naming style matching correct function names.
function-naming-style=snake_case
# Regular expression matching correct function names. Overrides function-
# naming-style.
#function-rgx=
# Good variable names which should always be accepted, separated by a comma.
good-names=e,
i,
j,
k,
ex,
Run,
_
# Good variable names regexes, separated by a comma. If names match any regex,
# they will always be accepted
good-names-rgxs=
# Include a hint for the correct naming format with invalid-name.
include-naming-hint=no
# Naming style matching correct inline iteration names.
inlinevar-naming-style=any
# Regular expression matching correct inline iteration names. Overrides
# inlinevar-naming-style.
#inlinevar-rgx=
# Naming style matching correct method names.
method-naming-style=snake_case
# Regular expression matching correct method names. Overrides method-naming-
# style.
#method-rgx=
# Naming style matching correct module names.
module-naming-style=snake_case
# Regular expression matching correct module names. Overrides module-naming-
# style.
#module-rgx=
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=
# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=^_
# List of decorators that produce properties, such as abc.abstractproperty. Add
# to this list to register other decorators that produce valid properties.
# These decorators are taken in consideration only for invalid-name.
property-classes=abc.abstractproperty
# Naming style matching correct variable names.
variable-naming-style=snake_case
# Regular expression matching correct variable names. Overrides variable-
# naming-style.
#variable-rgx=
[FORMAT]
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Number of spaces of indent required inside a hanging or continued line.
indent-after-paren=4
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
# tab).
indent-string=' '
# Maximum number of characters on a single line.
max-line-length=100
# Maximum number of lines in a module.
max-module-lines=1000
# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no
[LOGGING]
# The type of string formatting that logging methods do. `old` means using %
# formatting, `new` is for `{}` formatting.
logging-format-style=old
# Logging modules to check that the string format arguments are in logging
# function parameter format.
logging-modules=logging
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,
XXX,
TODO
# Regular expression of note tags to take in consideration.
#notes-rgx=
[SIMILARITIES]
# Ignore comments when computing similarities.
ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes
# Ignore imports when computing similarities.
ignore-imports=no
# Minimum lines number of a similarity.
min-similarity-lines=4
[SPELLING]
# Limits count of emitted suggestions for spelling mistakes.
max-spelling-suggestions=4
# Spelling dictionary name. Available dictionaries: none. To make it work,
# install the python-enchant package.
spelling-dict=
# List of comma separated words that should not be checked.
spelling-ignore-words=
# A path to a file that contains the private dictionary; one word per line.
spelling-private-dict-file=
# Tells whether to store unknown words to the private dictionary (see the
# --spelling-private-dict-file option) instead of raising a message.
spelling-store-unknown-words=no
[STRING]
# This flag controls whether inconsistent-quotes generates a warning when the
# character used as a quote delimiter is used inconsistently within a module.
check-quote-consistency=no
# This flag controls whether the implicit-str-concat should generate a warning
# on implicit string concatenation in sequences defined over several lines.
check-str-concat-over-line-jumps=no
[TYPECHECK]
# List of decorators that produce context managers, such as
# contextlib.contextmanager. Add to this list to register other decorators that
# produce valid context managers.
contextmanager-decorators=contextlib.contextmanager
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
# Tells whether to warn about missing members when the owner of the attribute
# is inferred to be None.
ignore-none=yes
# This flag controls whether pylint should warn about no-member and similar
# checks whenever an opaque object is returned when inferring. The inference
# can return multiple potential results while evaluating a Python object, but
# some branches might not be evaluated, which results in partial inference. In
# that case, it might be useful to still emit no-member and other checks for
# the rest of the inferred objects.
ignore-on-opaque-inference=yes
# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
# qualified names.
ignored-classes=optparse.Values,thread._local,_thread._local
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis). It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
missing-member-hint=yes
# The minimum edit distance a name should have in order to be considered a
# similar match for a missing member name.
missing-member-hint-distance=1
# The total number of similar names that should be taken in consideration when
# showing a hint for a missing member.
missing-member-max-choices=1
# List of decorators that change the signature of a decorated function.
signature-mutators=
[VARIABLES]
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid defining new builtins when possible.
additional-builtins=
# Tells whether unused global variables should be treated as a violation.
allow-global-unused-variables=yes
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,
_cb
# A regular expression matching the name of dummy variables (i.e. expected to
# not be used).
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
# Argument names that match this expression will be ignored. Default to name
# with leading underscore.
ignored-argument-names=_.*|^ignored_|^unused_
# Tells whether we should check for unused import in __init__ files.
init-import=no
# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
[CLASSES]
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,
__new__,
setUp,
__post_init__
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,
_fields,
_replace,
_source,
_make
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=cls
[DESIGN]
# Maximum number of arguments for function / method.
max-args=5
# Maximum number of attributes for a class (see R0902).
max-attributes=7
# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr=5
# Maximum number of branch for function / method body.
max-branches=12
# Maximum number of locals for function / method body.
max-locals=15
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
# Maximum number of return / yield for function / method body.
max-returns=6
# Maximum number of statements in function / method body.
max-statements=50
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
[IMPORTS]
# List of modules that can be imported at any level, not just the top level
# one.
allow-any-import-level=
# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=no
# Analyse import fallback blocks. This can be used to support both Python 2 and
# 3 compatible code, which means that the block might have code that exists
# only in one or another interpreter, leading to false positives when analysed.
analyse-fallback-blocks=no
# Deprecated modules which should not be used, separated by a comma.
deprecated-modules=optparse,tkinter.tix
# Create a graph of external dependencies in the given file (report RP0402 must
# not be disabled).
ext-import-graph=
# Create a graph of every (i.e. internal and external) dependencies in the
# given file (report RP0402 must not be disabled).
import-graph=
# Create a graph of internal dependencies in the given file (report RP0402 must
# not be disabled).
int-import-graph=
# Force import order to recognize a module as part of the standard
# compatibility libraries.
known-standard-library=
# Force import order to recognize a module as part of a third party library.
known-third-party=enchant
# Couples of modules and preferred modules, separated by a comma.
preferred-modules=
[EXCEPTIONS]
# Exceptions that will emit a warning when being caught. Defaults to
# "BaseException, Exception".
overgeneral-exceptions=BaseException,
Exception
================================================
FILE: .vscode/launch.json
================================================
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Module",
"type": "debugpy",
"request": "launch",
"console": "integratedTerminal",
"module": "refind_btrfs",
"cwd": "${workspaceFolder}/src",
"envFile": "${workspaceFolder}/.env",
"args": [
"--run-mode",
"one-time"
],
"sudo": true,
"justMyCode": false
}
]
}
================================================
FILE: .vscode/settings.json
================================================
{
"antlr4.generation": {
"alternativeJar": "C:\\Users\\Luka\\Projects\\Python\\antlr-4.13.1-complete.jar",
"language": "Python3",
"listeners": false,
"mode": "external",
"visitors": true
},
"cSpell.words": [
"antlr",
"bootable",
"Bootnum",
"Btrfs",
"btrfsutil",
"bytecode",
"ELILO",
"EPERM",
"errno",
"findmnt",
"fstype",
"getpid",
"getuid",
"groupby",
"ICNS",
"IMODE",
"INITRD",
"inplace",
"ismethod",
"itertools",
"journalctl",
"levelno",
"Lsblk",
"menuentry",
"mtab",
"nargs",
"nodeps",
"nofsroot",
"ostype",
"otime",
"partuuid",
"pidfile",
"pidname",
"PTABLE",
"pttype",
"ptuuid",
"pycache",
"pylint",
"pyproject",
"PYTHONPATH",
"refind",
"rootflags",
"setuptools",
"SPDX",
"submenuentry",
"Subobject",
"suboption",
"subvol",
"subvolid",
"subvolume",
"tomlkit",
"vfat"
],
"code-runner.clearPreviousOutput": true,
"code-runner.runInTerminal": true,
"python.analysis.completeFunctionParens": true,
"python.analysis.diagnosticMode": "workspace",
"python.analysis.extraPaths": [
"src/refind_btrfs"
],
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
"python.envFile": "${workspaceFolder}/.env",
"python.formatting.provider": "black",
"python.languageServer": "Pylance",
"python.linting.enabled": true,
"python.linting.mypyEnabled": true,
"python.linting.mypyPath": "${workspaceFolder}/.venv/bin/mypy",
"python.linting.pylintEnabled": true,
"python.linting.pylintPath": "${workspaceFolder}/.venv/bin/pylint",
"search.exclude": {
"**/.venv": true
},
"terminal.integrated.env.linux": {
"PYTHONPATH": "${env:PYTHONPATH}:${workspaceFolder}/src"
}
}
================================================
FILE: LICENSE.txt
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
================================================
FILE: MANIFEST.in
================================================
include pyproject.toml
include *.md
include LICENSE.txt
# Include ANTLR generated files
recursive-include src/refind_btrfs/boot/antlr4 *.py
# Include data files
recursive-include src/refind_btrfs/data *
# Exclude all bytecode
global-exclude *.py[cdo]
================================================
FILE: README.md
================================================
# refind-btrfs
### Table of Contents
- [Description](#description)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Configuration](#configuration)
- [Example](#example)
- [Implementation](#implementation)
- [Further Efforts](#further-efforts)
## Description
This tool is used to automate a few tedious tasks required to boot into [Btrfs](https://en.wikipedia.org/wiki/Btrfs) snapshots from [rEFInd](https://en.wikipedia.org/wiki/REFInd). It is to rEFInd what [grub-btrfs](https://github.com/Antynea/grub-btrfs) is to [GRUB](https://en.wikipedia.org/wiki/GNU_GRUB).
What it does is the following:
* Gathers information about block devices present in the system
* Identifies the [ESP](https://en.wikipedia.org/wiki/EFI_system_partition) (either by GPT GUID or MBR ID)
* Gathers information about mounted filesystems (from [mtab](https://en.wikipedia.org/wiki/Mtab)) which are present on all of the found block devices
* Identifies the root mount point and gathers information about the subvolume which is mounted at said mount point
* Searches for snapshots of the identified subvolume in the configured directory (or directories)
* Searches for rEFInd's main config file on the ESP and parses it to extract [manual boot stanzas](https://www.rodsbooks.com/refind/configfile.html#stanzas) from it (included configs are also analyzed, if present)
* Selects the configured number of latest snapshots and uses them as such if they are writable and if any aren't, it either (depending on the configuration):
* sets their read-only flag to false, thus making them writable
* creates new writable snapshots from them in the configured location
* Aligns the root mount point in the [fstab](https://en.wikipedia.org/wiki/Fstab) file of each selected snapshot with the snapshot itself
* Deletes outdated previously created writable snapshots (if any exist)
* Generates new manual boot stanzas from identified ones where every relevant field is aligned with each selected snapshot
* Finally, it saves the generated manual boot stanzas in separate config files (outputs them to a subdirectory) and includes each file in the main config file so as not to needlessly clutter it
In case a separate /boot partition is detected only the fields relevant to / are modified ("subvol" and/or "subvolid") while the "loader" and "initrd" fields (the former may also be nested within the "options" field) remain unaffected.
It goes without saying that the consequence of having this kind of a setup is being unable to mitigate a problematic kernel upgrade by simply booting into a snapshot.
This tool will also detect a situation where / is mounted as a snapshot (which means that you've already booted into one), issue a warning and simply exit whereas, for instance, [Snapper](http://snapper.io/) will happily continue creating its snapshots, regardless. This behavior is configurable and enabled by default.
## Prerequisites
The following conditions (some are probably superfluous at this point) must be satisfied in order for this tool to function correctly:
* mounted ESP (no automatic discovery and/or mounting is supported)
* Btrfs formatted filesystem with a subvolume mounted as /
* at least one snapshot of the root subvolume
* rEFInd installation present on the ESP
* at least one manual boot stanza (found in rEFInd's main config file or in any of the additional config files included within it) defined such that (see the [ArchWiki](https://wiki.archlinux.org/index.php/REFInd#Manual_boot_stanza) for an example) its own "options" field or any such field belonging to at least one of its sub-menus contains definitions of the following boot loader options:
* the "root" option must be matched with the root partition (by PARTUUID or PARTLABEL), its filesystem (by UUID or LABEL) or with a block device (by name) which itself represents the root partition
* the "rootflags" option must define a "subvol" suboption which is matched with the root subvolume's logical path and/or a "subvolid" suboption which is matched with the root subvolume's ID
## Installation
This tool is currently available only in the [AUR](https://aur.archlinux.org/packages/refind-btrfs/) which means that [Arch Linux](https://www.archlinux.org/) users (as well as users of derivative distributions, I imagine) can easily install it.
It comes with a script (refind-btrfs) which can be used to perform the described steps, on-demand (root privileges are required to run it). There is also a [systemd](https://en.wikipedia.org/wiki/Systemd) service aptly named **refind-btrfs.service** which runs the tool in a background mode of operation where the described steps are performed automatically once a change (snapshot creation or deletion) happens in the watched snapshot directories which are the same ones as those in which it searches for snapshots. If you are using Snapper along with its capability to take regular snapshots on boot this service should take these into account as well because it is set to start before Snapper's relevant service does so (the one named snapper-boot.service).
Before running the script for the first time or enabling and starting the service make sure to at least check and perhaps modify the config file (/etc/refind-btrfs.conf) to suit your own needs.
If you wish to check the current status and log output of the running service you can do so by executing:
```
systemctl status refind-btrfs
journalctl -u refind-btrfs -b
```
Alternatively, there exists a [PyPI](https://pypi.org/project/refind-btrfs/) package but bear in mind that since [libbtrfsutil](https://github.com/kdave/btrfs-progs/tree/master/libbtrfsutil) isn't available on PyPI it needs to be already present in the system site packages (its Python bindings, to be precise) because it cannot be automatically pulled in as a dependency. Chances are that it is available for your distribution of choice (search for a package named "btrfs-progs") but you most probably already have it installed as I suppose you are using Btrfs, after all.
Also, every file contained in [this](https://github.com/Venom1991/refind-btrfs/tree/master/src/refind_btrfs/data) directory should be copied to the following locations:
* refind-btrfs script to /usr/bin (or wherever it is you keep your system-wide executables)
* refind-btrfs.conf-sample as refind-btrfs.conf (without the "-sample" suffix) to /etc
* refind-btrfs.service to /usr/lib/systemd/system (if you are using systemd and wish to utilize the snapshot directory watching feature)
In case the custom generated boot stanza's icon feature (explained in the next section) is desired it can initially be enabled by installing this package with the following command:
```
pip install refind-btrfs[custom_icon]
```
You should also create an empty directory named "refind-btrfs" in /var/lib as the tool expects that it is present. Additionally, if you wish to be able to use the Btrfs logo embedding mode of custom icon generation you should also copy the "[icons](https://github.com/Venom1991/refind-btrfs/tree/master/src/refind_btrfs/data/icons)" directory into the previously created one.
## Configuration
The configuration file can be found at `/etc/refind-btrfs.conf`, and each option is thoroughly explained in the sample config [file](https://github.com/Venom1991/refind-btrfs/blob/master/src/refind_btrfs/data/refind-btrfs.conf-sample).
In case you've opted to use the provided systemd service and wish to change the search directories (in this context, these are actually watched directories) in the config file while it is running you must restart it manually after doing so because the directory observer is started only once and an automatic restart is not performed.
The default configuration is meant to enable seamless integration with Snapper simply because I'm using it but the tool itself doesn't depend on it and ought to function with different setups. Also, by default the tool is configured for creating new writable snapshots intended for booting instead of in-place modification of the found snapshots' read-only flags as I believe this is the safer (or perhaps even saner) choice.
[Timeshift](https://github.com/teejee2008/timeshift) users can try setting the [default](https://github.com/Venom1991/refind-btrfs/blob/d1e3c474ed88d7b1ad3948d75bf6f167da676c5d/src/refind_btrfs/data/refind-btrfs.conf-sample#L65) snapshot search directory to "/run/timeshift/backup/timeshift-btrfs/snapshots" and the corresponding maximum search depth to three.
If you're having trouble with the ESP being automatically located, the "esp_uuid" option could prove to be useful. If an actual UUID is provided (not the default, empty one), this value will be used to compare partition UUIDs (returned by lsblk) instead of comparing their types with hardcoded GPT UUID or MBR ID values.
Custom generated boot stanza icon support is also implemented, by default the source boot stanza's icon is reused. It is possible to provide one's own custom icon's path or to embed the Btrfs logo (comes in two variants and three sizes per each variant) into the source boot stanza's icon instead. This combined icon is then used as the generated boot stanza's icon.
In order for these two additional modes of operation (not the default one) to work an optional dependency has to be installed - namely, the [Pillow](https://python-pillow.org) library which can be installed from the official Arch Linux [repository](https://archlinux.org/packages/community/x86_64/python-pillow/) or from [PyPI](https://pypi.org/project/Pillow/).
It is imperative that you don't just blindly try to boot into a given snapshot (simply because no errors were reported) before verifying the generated manual boot stanza, either by inspecting the file contents in which it was saved or by viewing the boot loader [options](https://www.rodsbooks.com/refind/using.html#boot_options) using rEFInd and also not before verifying the chosen snapshot's fstab file.
## Example
Given a setup such as this one:
* device /dev/nvme0n1 where:
* the ESP is on /dev/nvme0n1p3 mounted at /efi
* / is on /dev/nvme0n1p8
* /boot is included in /dev/nvme0n1p8 (**not** a separate partition)
* the subvolume mounted as / is named @
* fstab file's root mount point:
```
UUID=95250e8a-5870-45df-a7b3-3b3ee8873c16 / btrfs rw,noatime,compress-force=zstd:2,ssd,space_cache=v2,commit=15,subvolid=256,subvol=/@ 0 0
```
* manual boot stanza defined in the refind.conf file (rEFInd's main config file, in this case):
```
menuentry "Arch Linux - Stable" {
icon /EFI/refind/icons/os_arch.png
volume ARCH
loader /@/boot/vmlinuz-linux
initrd /@/boot/initramfs-linux.img
options "root=PARTUUID=048d6fcd-c88c-504d-bd51-dfc0a5bf762d rw add_efi_memmap rootflags=subvol=@ initrd=@\boot\intel-ucode.img"
submenuentry "Boot - fallback" {
initrd /@/boot/initramfs-linux-fallback.img
}
submenuentry "Boot - terminal" {
add_options "systemd.unit=multi-user.target"
}
}
```
* five read-only snapshots located in the /.snapshots directory where this directory is itself mounted as a subvolume named @snapper-root (this last bit isn't particularly relevant):
| Absolute Path | Time of Creation | Subvolume ID |
| ---------------------- | ------------------- | ------------ |
| /.snapshots/1/snapshot | 10-12-2020 01:00:00 | 498 |
| /.snapshots/2/snapshot | 11-12-2020 02:00:00 | 499 |
| /.snapshots/3/snapshot | 12-12-2020 03:00:00 | 500 |
| /.snapshots/4/snapshot | 13-12-2020 04:00:00 | 501 |
| /.snapshots/5/snapshot | 14-12-2020 05:00:00 | 502 |
* refind-btrfs.conf file changed such that the "selection_count" option is set to 3 instead of the default 5
When run, this tool should select the latest three snapshots (3, 4 and 5 from the list) and create new, writable ones from these in the directory configured by the "destination_dir" option where each snapshot is named by formatting the time of creation ("YYYY-mm-dd_HH-MM-SS") of the snapshot it was created from, adding a "rwsnap" prefix to it and also adding the original snapshot's subvolume ID as a suffix. In the rare case when different snapshots have identical timestamps their monotonic numerical IDs are there to ensure uniqueness.
Afterwards, the resultant snapshots' generated names should look like this:
* rwsnap_2020-12-12_03-00-00_ID500,
* rwsnap_2020-12-13_04-00-00_ID501 and
* rwsnap_2020-12-14_05-00-00_ID502
This naming scheme makes sense to me because when choosing a snapshot to boot from you most probably want to know when the original snapshot was created and not the one created from it because the time delay depends on when this tool was run and, if sufficiently large, can completely mislead you. If you've chosen to use the systemd service this delay shouldn't be significant (measuring a mere few seconds at worst, ideally).
The most recent snapshot's fstab file should (after being modified) contain a root mount point which looks like this:
```
UUID=95250e8a-5870-45df-a7b3-3b3ee8873c16 / btrfs rw,noatime,compress-force=zstd:2,ssd,space_cache=v2,commit=15,subvolid=503,subvol=/@/root/.refind-btrfs/rwsnap_2020-12-14_05-00-00_ID502 0 0
```
I'm assuming here that the next available subvolume ID was 503 (an increment of one) which implies that the writable snapshot was created immediately after the original snapshot was taken but that doesn't necessarily have to be the case and its specific value doesn't ultimately matter that much as long as it directly corresponds to the newly created snapshot which it absolutely should (otherwise, mounting it as / would fail due to the mismatch).
With this setup the newly created snapshot ended up being nested under the root subvolume but you can of course make your own adjustments as you see fit. This tool will only create the destination directory in case it doesn't exist. It won't do anything other than that.
I've personally created another subvolume named @rw-snapshots directly under the default filesystem subvolume (ID 5) and mounted it at /root/.refind-btrfs. In my case the logical path of rwsnap_2020-12-14_05-00-00_ID502 would be /@rw-snapshots/rwsnap_2020-12-14_05-00-00_ID502.
A generated manual boot stanza's filename is formatted like "{volume}_{loader}.conf" and converted to all lowercase letters which would result in, for this example, a file named "arch_vmlinuz-linux.conf". This file is then saved in a subdirectory (relative to rEFInd's root directory) named "btrfs-snapshot-stanzas" and finally included in the main config file by appending an "include" directive which would, again for this example, look like this: "include btrfs-snapshot-stanzas/arch_vmlinuz-linux.conf". This last step is performed only once, during an initial run. Afterwards, it is detected as already being included in the main config file.
You are free to rearrange the appended include directives however you want, this tool does not care about where exactly they appear in the main config file. This is particularly useful in case you've defined multiple boot stanzas (each one pointing to a different kernel image, for example) and wish to alter the order of the boot menu entries.
The generated file's contents (representing the generated stanza) should look like this:
```
menuentry "Arch Linux - Stable (rwsnap_2020-12-14_05-00-00_ID502)" {
icon /EFI/refind/icons/os_arch.png
volume ARCH
loader /@/root/.refind-btrfs/rwsnap_2020-12-14_05-00-00_ID502/boot/vmlinuz-linux
initrd /@/root/.refind-btrfs/rwsnap_2020-12-14_05-00-00_ID502/boot/initramfs-linux.img
options "root=PARTUUID=048d6fcd-c88c-504d-bd51-dfc0a5bf762d rw add_efi_memmap rootflags=subvol=@/root/.refind-btrfs/rwsnap_2020-12-14_05-00-00_ID502 initrd=@\root\.refind-btrfs\rwsnap_2020-12-14_05-00-00_ID502\boot\intel-ucode.img"
submenuentry "Arch Linux - Stable (rwsnap_2020-12-13_04-00-00_ID501)" {
loader /@/root/.refind-btrfs/rwsnap_2020-12-13_04-00-00_ID501/boot/vmlinuz-linux
initrd /@/root/.refind-btrfs/rwsnap_2020-12-13_04-00-00_ID501/boot/initramfs-linux.img
options "root=PARTUUID=048d6fcd-c88c-504d-bd51-dfc0a5bf762d rw add_efi_memmap rootflags=subvol=@/root/.refind-btrfs/rwsnap_2020-12-13_04-00-00_ID501 initrd=@\root\.refind-btrfs\rwsnap_2020-12-13_04-00-00_ID501\boot\intel-ucode.img"
}
submenuentry "Arch Linux - Stable (rwsnap_2020-12-12_03-00-00_ID500)" {
loader /@/root/.refind-btrfs/rwsnap_2020-12-12_03-00-00_ID500/boot/vmlinuz-linux
initrd /@/root/.refind-btrfs/rwsnap_2020-12-12_03-00-00_ID500/boot/initramfs-linux.img
options "root=PARTUUID=048d6fcd-c88c-504d-bd51-dfc0a5bf762d rw add_efi_memmap rootflags=subvol=@/root/.refind-btrfs/rwsnap_2020-12-12_03-00-00_ID500 initrd=@\root\.refind-btrfs\rwsnap_2020-12-12_03-00-00_ID500\boot\intel-ucode.img"
}
}
```
As you've probably noticed, this tool leverages rEFInd's overriding features, that is to say "submenuentry" sections are used to incorporate successive snapshots into the stanza itself by overriding the "loader", "initrd" and "options" fields of the main boot stanza which itself represents the latest snapshot.
If you've configured this tool to also take into account the original boot stanza's sub-menus the resultant generated boot stanza should look like this:
```
menuentry "Arch Linux - Stable (rwsnap_2020-12-14_05-00-00_ID502)" {
icon /EFI/refind/icons/os_arch.png
volume ARCH
loader /@/root/.refind-btrfs/rwsnap_2020-12-14_05-00-00_ID502/boot/vmlinuz-linux
initrd /@/root/.refind-btrfs/rwsnap_2020-12-14_05-00-00_ID502/boot/initramfs-linux.img
options "root=PARTUUID=048d6fcd-c88c-504d-bd51-dfc0a5bf762d rw add_efi_memmap rootflags=subvol=@/root/.refind-btrfs/rwsnap_2020-12-14_05-00-00_ID502 initrd=@\root\.refind-btrfs\rwsnap_2020-12-14_05-00-00_ID502\boot\intel-ucode.img"
submenuentry "Boot - fallback (rwsnap_2020-12-14_05-00-00_ID502)" {
initrd /@/root/.refind-btrfs/rwsnap_2020-12-14_05-00-00_ID502/boot/initramfs-linux-fallback.img
}
submenuentry "Boot - terminal (rwsnap_2020-12-14_05-00-00_ID502)" {
add_options "systemd.unit=multi-user.target"
}
submenuentry "Arch Linux - Stable (rwsnap_2020-12-13_04-00-00_ID501)" {
loader /@/root/.refind-btrfs/rwsnap_2020-12-13_04-00-00_ID501/boot/vmlinuz-linux
initrd /@/root/.refind-btrfs/rwsnap_2020-12-13_04-00-00_ID501/boot/initramfs-linux.img
options "root=PARTUUID=048d6fcd-c88c-504d-bd51-dfc0a5bf762d rw add_efi_memmap rootflags=subvol=@/root/.refind-btrfs/rwsnap_2020-12-13_04-00-00_ID501 initrd=@\root\.refind-btrfs\rwsnap_2020-12-13_04-00-00_ID501\boot\intel-ucode.img"
}
submenuentry "Boot - fallback (rwsnap_2020-12-13_04-00-00_ID501)" {
loader /@/root/.refind-btrfs/rwsnap_2020-12-13_04-00-00_ID501/boot/vmlinuz-linux
initrd /@/root/.refind-btrfs/rwsnap_2020-12-13_04-00-00_ID501/boot/initramfs-linux-fallback.img
options "root=PARTUUID=048d6fcd-c88c-504d-bd51-dfc0a5bf762d rw add_efi_memmap rootflags=subvol=@/root/.refind-btrfs/rwsnap_2020-12-13_04-00-00_ID501 initrd=@\root\.refind-btrfs\rwsnap_2020-12-13_04-00-00_ID01\boot\intel-ucode.img"
}
submenuentry "Boot - terminal (rwsnap_2020-12-13_04-00-00_ID501)" {
loader /@/root/.refind-btrfs/rwsnap_2020-12-13_04-00-00_ID501/boot/vmlinuz-linux
initrd /@/root/.refind-btrfs/rwsnap_2020-12-13_04-00-00_ID501/boot/initramfs-linux.img
options "root=PARTUUID=048d6fcd-c88c-504d-bd51-dfc0a5bf762d rw add_efi_memmap rootflags=subvol=@/root/.refind-btrfs/rwsnap_2020-12-13_04-00-00_ID501 initrd=@\root\.refind-btrfs\rwsnap_2020-12-13_04-00-00_ID501\boot\intel-ucode.img systemd.unit=multi-user.target"
}
submenuentry "Arch Linux - Stable (rwsnap_2020-12-12_03-00-00_ID500)" {
loader /@/root/.refind-btrfs/rwsnap_2020-12-12_03-00-00_ID500/boot/vmlinuz-linux
initrd /@/root/.refind-btrfs/rwsnap_2020-12-12_03-00-00_ID500/boot/initramfs-linux.img
options "root=PARTUUID=048d6fcd-c88c-504d-bd51-dfc0a5bf762d rw add_efi_memmap rootflags=subvol=@/root/.refind-btrfs/rwsnap_2020-12-12_03-00-00_ID500 initrd=@\root\.refind-btrfs\rwsnap_2020-12-12_03-00-00_ID500\boot\intel-ucode.img"
}
submenuentry "Boot - fallback (rwsnap_2020-12-12_03-00-00_ID500)" {
loader /@/root/.refind-btrfs/rwsnap_2020-12-12_03-00-00_ID500/boot/vmlinuz-linux
initrd /@/root/.refind-btrfs/rwsnap_2020-12-12_03-00-00_ID500/boot/initramfs-linux-fallback.img
options "root=PARTUUID=048d6fcd-c88c-504d-bd51-dfc0a5bf762d rw add_efi_memmap rootflags=subvol=@/root/.refind-btrfs/rwsnap_2020-12-12_03-00-00_ID500 initrd=@\root\.refind-btrfs\rwsnap_2020-12-12_03-00-00_ID500\boot\intel-ucode.img"
}
submenuentry "Boot - terminal (rwsnap_2020-12-12_03-00-00_ID500)" {
loader /@/root/.refind-btrfs/rwsnap_2020-12-12_03-00-00_ID500/boot/vmlinuz-linux
initrd /@/root/.refind-btrfs/rwsnap_2020-12-12_03-00-00_ID500/boot/initramfs-linux.img
options "root=PARTUUID=048d6fcd-c88c-504d-bd51-dfc0a5bf762d rw add_efi_memmap rootflags=subvol=@/root/.refind-btrfs/rwsnap_2020-12-12_03-00-00_ID500 initrd=@\root\.refind-btrfs\rwsnap_2020-12-12_03-00-00_ID500\boot\intel-ucode.img systemd.unit=multi-user.target"
}
}
```
A couple of notable details are the fact that the "add_options" field (if it exists) of any given sub-menu belonging to a successive snapshot is merged with the "options" field of the corresponding snapshot's sub-menu and also the fact that the latest snapshot's sub-menus implicitly inherit those main stanza's fields which they themselves do not override in the original boot stanza. Consequently, these sub-menus' definitions are intentionally similar to those of their counterparts found in the original boot stanza.
This is how an Arch Linux installation with three different kernels (XanMod, Stable and LTS) should appear in rEFInd (the default theme is shown) after this tool has successfully completed its job:

Here, each manual boot stanza uses its own custom icon based on the default Arch Linux OS icon. The Btrfs logo is then also embedded into these icons (by setting [this](https://github.com/Venom1991/refind-btrfs/blob/4e0e629680fc581143c684e6e90958cbe26db8fc/src/refind_btrfs/data/refind-btrfs.conf-sample#L158) option to "embed_btrfs_logo") and the resultant icons are defined as part of their corresponding generated boot stanzas.
By using a darker theme (such as the [Nord](https://github.com/jaltuna/refind-theme-nord) theme - shown in the following screenshot) and by using the "inverted" Btrfs logo's variant (as opposed to the "original" one, shown in the previous screenshot), the same Arch Linux installation should appear in rEFInd looking like this:

## Implementation
Most relevant dependencies:
* block device and ESP information is gathered using [lsblk](https://man7.org/linux/man-pages/man8/lsblk.8.html) (supports JSON output)
* mtab information is gathered using [findmnt](https://man7.org/linux/man-pages/man8/findmnt.8.html) (same remark applies regarding the output)
* all of the mentioned subvolume and snapshot operations are performed using [libbtrfsutil](https://github.com/kdave/btrfs-progs/tree/master/libbtrfsutil)
* [ANLTR4](https://github.com/antlr/antlr4) was used to generate the lexer and parser required for rEFInd config files' analyses
* [Watchdog](https://github.com/gorakhargosh/watchdog) is used for the snapshot directory watching feature and is utilized in a non-recursive fashion (watches all of the configured search directories as well as directories nested under these, up to configured maximum depth reduced by one)
* [python-systemd](https://github.com/systemd/python-systemd) is used for notifying systemd about the service's readiness (because its type is set to "notify") and also for logging to the journal
[Shelve](https://docs.python.org/3/library/shelve.html) is used to keep track of the currently processed snapshots and also to avoid analyzing the rEFInd config file each time as it is quite an expensive task. A new analysis is performed in case the current and actual times of modification differ ([st_mtime](https://docs.python.org/3/library/os.html#os.stat_result.st_mtime) is used for that purpose) which means that simply touching the file should also trigger a new analysis (file hashes aren't computed nor consequently compared). This fact also explains the need for a directory in /var/lib as the database file resides in it.
The directory watching mechanism is a bit unfortunate in a sense that it is way overkill for the task at hand. Even though Watchdog is a great, battle-tested library and many people use it, I feel that this solution isn't particularly well suited to this tool but it will simply have to suffice for now as I don't have a better idea (grub-btrfs also relies on a similar mechanism), at least not until the Btrfs authors develop [this](https://btrfs.wiki.kernel.org/index.php/Project_ideas#Send_notifications_about_important_events) useful feature or something akin to it.
## Further Efforts
Currently, this tool won't clean up after itself in case, for instance, creating writable snapshots succeeds but generating a manual boot stanza from them fails (for whatever reason). The correct thing to do would be to delete these snapshots altogether (thus undoing the changes made by the previous step or roll-backing as it is often called) meaning that the whole run is considered to be successful if and only if all of the steps it performed were successful.
This behavior would then be comparable with the [atomicity](https://en.wikipedia.org/wiki/Atomicity_(database_systems)) principle to which most database systems adhere. The previously mentioned scenario is covered in a different way by issuing a relevant warning on the next attempt to run the tool (because the writable snapshots already exist at this point in time and they aren't expected to) but also continuing to perform successive steps. This isn't a general solution, of course, but more of a workaround for this one possible scenario.
With that said, being somehow able to preview changes proposed by this tool would also be beneficial, especially after altering its configuration.
A more elaborate snapshot selection mechanism would be appreciated, comparable to what Snapper does, that is selecting a configurable number of daily, weekly, etc. snapshots to be included in the generated manual boot stanza.
Generated boot stanzas' names are initialized using a hardcoded format string which is not ideal. It would be more convenient to provide a way for users to define their own format string using a combination of predefined variables (time of the source snapshot's creation, its numerical ID, etc.) along with some entirely arbitrary parts.
But, before trying to implement any of these shiny features this project's source code should be properly documented and tests should be written for it because, presently, there aren't any. The latter is also a pretty considerable effort due to the sheer number of different test cases. Luckily, all of the external dependencies (OS commands, third-party library calls and similar) are abstracted away which means that no significant preparatory steps regarding the codebase to be tested are required beforehand.
================================================
FILE: pyproject.toml
================================================
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
================================================
FILE: setup.cfg
================================================
[metadata]
name = refind_btrfs
version = 0.6.5
description = Generate rEFInd manual boot stanzas from Btrfs snapshots
long_description = file: README.md
keywords = rEFInd, btrfs
url = https://github.com/Venom1991/refind-btrfs
author = Luka Žaja
author_email = luka.zaja@protonmail.com
maintainer = Luka Žaja
maintainer_email = luka.zaja@protonmail.com
license = GNU General Public License v3 or later (GPLv3+)
license_file = LICENSE.txt
platforms = Linux
classifiers =
Development Status :: 4 - Beta
Intended Audience :: End Users/Desktop
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Natural Language :: English
Operating System :: POSIX :: Linux
Programming Language :: Python :: 3.11
Topic :: System :: Boot
[options]
package_dir =
=src
packages = find:
include_package_data = True
install_requires =
antlr4-python3-runtime
injector
more-itertools
pid
semantic-version
systemd-python
tomlkit
transitions
typeguard
watchdog
python_requires = >= 3.11
[options.extras_require]
custom_icon = Pillow
[options.entry_points]
console_scripts =
refind-btrfs = refind_btrfs:main
[options.packages.find]
where = src
[bdist_wheel]
universal = False
================================================
FILE: setup.py
================================================
# region Licensing
# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
""" refind-btrfs - Generate rEFInd manual boot stanzas from Btrfs snapshots
Copyright (C) 2020-2024 Luka Žaja
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
# endregion
import setuptools
with open("README.md", "r", encoding="utf-8") as readme:
long_description = readme.read()
setuptools.setup(
name="refind-btrfs",
version="0.6.5",
author="Luka Žaja",
author_email="luka.zaja@protonmail.com",
description="Generate rEFInd manual boot stanzas from Btrfs snapshots",
long_description=long_description,
long_description_content_type="text/markdown",
keywords="rEFInd, btrfs",
url="https://github.com/Venom1991/refind-btrfs",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.11",
"Topic :: System :: Boot",
],
package_dir={"": "src"},
packages=setuptools.find_packages(where="src"),
include_package_data=True,
install_requires=[
"antlr4-python3-runtime",
"injector",
"more-itertools",
"pid",
"semantic-version",
"systemd-python",
"tomlkit",
"transitions",
"typeguard",
"watchdog",
],
entry_points={
"console_scripts": [
"refind-btrfs=refind_btrfs:main",
],
},
extras_require={"custom_icon": ["Pillow"]},
python_requires=">=3.11",
)
================================================
FILE: src/refind_btrfs/__init__.py
================================================
# region Licensing
# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
""" refind-btrfs - Generate rEFInd manual boot stanzas from Btrfs snapshots
Copyright (C) 2020-2024 Luka Žaja
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
# endregion
import os
from argparse import ArgumentParser
from typing import Optional
from injector import Injector
from refind_btrfs.common import constants
from refind_btrfs.common.abc import BaseRunner
from refind_btrfs.common.abc.factories import BaseLoggerFactory
from refind_btrfs.common.enums import RunMode
from refind_btrfs.common.exceptions import PackageConfigError
from refind_btrfs.utility.helpers import check_access_rights, checked_cast, none_throws
from refind_btrfs.utility.injector_modules import CLIModule, WatchdogModule
def initialize_injector() -> Optional[Injector]:
one_time_mode = RunMode.ONE_TIME.value
background_mode = RunMode.BACKGROUND.value
parser = ArgumentParser(
prog="refind-btrfs",
usage="%(prog)s [options]",
description="Generate rEFInd manual boot stanzas from Btrfs snapshots",
)
parser.add_argument(
"-rm",
"--run-mode",
help="Mode of execution",
choices=[one_time_mode, background_mode],
type=str,
nargs="?",
const=one_time_mode,
default=one_time_mode,
)
arguments = parser.parse_args()
run_mode = checked_cast(str, none_throws(arguments.run_mode))
if run_mode == one_time_mode:
return Injector(CLIModule)
elif run_mode == background_mode:
return Injector(WatchdogModule)
return None
def main() -> int:
exit_code = os.EX_OK
injector = none_throws(initialize_injector())
logger_factory = injector.get(BaseLoggerFactory)
logger = logger_factory.logger(__name__)
try:
check_access_rights()
runner = injector.get(BaseRunner)
exit_code = runner.run()
except PackageConfigError as e:
exit_code = constants.EX_NOT_OK
logger.error(e.formatted_message)
except PermissionError as e:
exit_code = e.errno
logger.error(e.strerror)
except Exception:
exit_code = constants.EX_NOT_OK
logger.exception(constants.MESSAGE_UNEXPECTED_ERROR)
return exit_code
================================================
FILE: src/refind_btrfs/__main__.py
================================================
# region Licensing
# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
""" refind-btrfs - Generate rEFInd manual boot stanzas from Btrfs snapshots
Copyright (C) 2020-2024 Luka Žaja
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
# endregion
import sys
from . import main
if __name__ == "__main__":
sys.exit(main())
================================================
FILE: src/refind_btrfs/boot/__init__.py
================================================
# region Licensing
# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
""" refind-btrfs - Generate rEFInd manual boot stanzas from Btrfs snapshots
Copyright (C) 2020-2024 Luka Žaja
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
# endregion
from .boot_options import BootOptions
from .boot_stanza import BootStanza
from .refind_config import RefindConfig
from .sub_menu import SubMenu
================================================
FILE: src/refind_btrfs/boot/antlr4/RefindConfigLexer.g4
================================================
/*
SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>
SPDX-License-Identifier: GPL-3.0-or-later
refind-btrfs - Generate rEFInd manual boot stanzas from Btrfs snapshots
Copyright (C) 2020-2024 Luka Žaja
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
lexer grammar RefindConfigLexer;
WHITESPACE : [ \t]+ -> skip ;
NEWLINE : '\r'?'\n' -> skip ;
EMPTY : WHITESPACE? NEWLINE -> skip ;
COMMENT : '#' (~[\n])* NEWLINE? -> skip ;
IGNORED_OPTION
: (
'also_scan_dirs'
| 'also_scan_tools'
| 'banner'
| 'banner_scale'
| 'big_icon_size'
| 'csr_values'
| 'default_selection'
| 'don\'t_scan_dirs'
| 'don\'t_scan_files'
| 'don\'t_scan_firmware'
| 'don\'t_scan_tools'
| 'don\'t_scan_volumes'
| 'dont_scan_dirs'
| 'dont_scan_files'
| 'dont_scan_firmware'
| 'dont_scan_tools'
| 'dont_scan_volumes'
| 'enable_and_lock_vmx'
| 'enable_mouse'
| 'enable_touch'
| 'extra_kernel_version_strings'
| 'fold_linux_kernels'
| 'follow_symlinks'
| 'font'
| 'hideui'
| 'icons_dir'
| 'linux_prefixes'
| 'log_level'
| 'max_tags'
| 'mouse_size'
| 'mouse_speed'
| 'resolution'
| 'scan_all_linux_kernels'
| 'scan_delay'
| 'scan_driver_dirs'
| 'scanfor'
| 'screensaver'
| 'selection_big'
| 'selection_small'
| 'showtools'
| 'shutdown_after_timeout'
| 'small_icon_size'
| 'spoof_osx_version'
| 'support_gzipped_loaders'
| 'textmode'
| 'textonly'
| 'timeout'
| 'uefi_deep_legacy_scan'
| 'use_graphics_for'
| 'use_nvram'
| 'windows_recovery_files'
| 'write_systemd_vars'
) (~[\n])* NEWLINE? -> skip ;
MENU_ENTRY : (MAIN_MENU_ENTRY | SUB_MENU_ENTRY) ;
fragment MAIN_MENU_ENTRY : 'menuentry' ;
fragment SUB_MENU_ENTRY : 'submenuentry' ;
VOLUME : 'volume' ;
LOADER : 'loader' ;
INITRD : 'initrd' ;
ICON : 'icon' ;
OS_TYPE : 'ostype' WHITESPACE -> pushMode(STRICT_PARAMETER_MODE) ;
GRAPHICS : 'graphics' WHITESPACE -> pushMode(STRICT_PARAMETER_MODE) ;
BOOT_OPTIONS : 'options' ;
ADD_BOOT_OPTIONS : 'add_options' ;
FIRMWARE_BOOTNUM : 'firmware_bootnum' ;
DISABLED : 'disabled' ;
INCLUDE : 'include' ;
OPEN_BRACE : '{' ;
CLOSE_BRACE : '}' ;
HEX_INTEGER : HEX_DIGIT+ ;
fragment HEX_DIGIT: [0-9a-fA-F] ;
STRING: (SINGLE_QUOTED_STRING | DOUBLE_QUOTED_STRING | UNQUOTED_STRING) ;
fragment SINGLE_QUOTED_STRING : '\'' (~[\n])+ '\'' ;
fragment DOUBLE_QUOTED_STRING : '"' (~[\n])+ '"' ;
fragment UNQUOTED_STRING : (~[ \t\n])+ ;
mode STRICT_PARAMETER_MODE;
OS_TYPE_PARAMETER : ('MacOS' | 'Linux' | 'ELILO' | 'Windows' | 'XOM') -> popMode ;
GRAPHICS_PARAMETER : ('on' | 'off') -> popMode ;
================================================
FILE: src/refind_btrfs/boot/antlr4/RefindConfigLexer.interp
================================================
token literal names:
null
null
null
null
null
null
null
'volume'
'loader'
'initrd'
'icon'
null
null
'options'
'add_options'
'firmware_bootnum'
'disabled'
'include'
'{'
'}'
null
null
null
null
token symbolic names:
null
WHITESPACE
NEWLINE
EMPTY
COMMENT
IGNORED_OPTION
MENU_ENTRY
VOLUME
LOADER
INITRD
ICON
OS_TYPE
GRAPHICS
BOOT_OPTIONS
ADD_BOOT_OPTIONS
FIRMWARE_BOOTNUM
DISABLED
INCLUDE
OPEN_BRACE
CLOSE_BRACE
HEX_INTEGER
STRING
OS_TYPE_PARAMETER
GRAPHICS_PARAMETER
rule names:
WHITESPACE
NEWLINE
EMPTY
COMMENT
IGNORED_OPTION
MENU_ENTRY
MAIN_MENU_ENTRY
SUB_MENU_ENTRY
VOLUME
LOADER
INITRD
ICON
OS_TYPE
GRAPHICS
BOOT_OPTIONS
ADD_BOOT_OPTIONS
FIRMWARE_BOOTNUM
DISABLED
INCLUDE
OPEN_BRACE
CLOSE_BRACE
HEX_INTEGER
HEX_DIGIT
STRING
SINGLE_QUOTED_STRING
DOUBLE_QUOTED_STRING
UNQUOTED_STRING
OS_TYPE_PARAMETER
GRAPHICS_PARAMETER
channel names:
DEFAULT_TOKEN_CHANNEL
HIDDEN
mode names:
DEFAULT_MODE
STRICT_PARAMETER_MODE
atn:
[4, 0, 23, 1036, 6, -1, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 1, 0, 4, 0, 62, 8, 0, 11, 0, 12, 0, 63, 1, 0, 1, 0, 1, 1, 3, 1, 69, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 76, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 5, 3, 84, 8, 3, 10, 3, 12, 3, 87, 9, 3, 1, 3, 3, 3, 90, 8, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 818, 8, 4, 1, 4, 5, 4, 821, 8, 4, 10, 4, 12, 4, 824, 9, 4, 1, 4, 3, 4, 827, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 3, 5, 833, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 4, 21, 967, 8, 21, 11, 21, 12, 21, 968, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 3, 23, 976, 8, 23, 1, 24, 1, 24, 4, 24, 980, 8, 24, 11, 24, 12, 24, 981, 1, 24, 1, 24, 1, 25, 1, 25, 4, 25, 988, 8, 25, 11, 25, 12, 25, 989, 1, 25, 1, 25, 1, 26, 4, 26, 995, 8, 26, 11, 26, 12, 26, 996, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 1024, 8, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 1033, 8, 28, 1, 28, 1, 28, 0, 0, 29, 2, 1, 4, 2, 6, 3, 8, 4, 10, 5, 12, 6, 14, 0, 16, 0, 18, 7, 20, 8, 22, 9, 24, 10, 26, 11, 28, 12, 30, 13, 32, 14, 34, 15, 36, 16, 38, 17, 40, 18, 42, 19, 44, 20, 46, 0, 48, 21, 50, 0, 52, 0, 54, 0, 56, 22, 58, 23, 2, 0, 1, 4, 2, 0, 9, 9, 32, 32, 1, 0, 10, 10, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 9, 10, 32, 32, 1098, 0, 2, 1, 0, 0, 0, 0, 4, 1, 0, 0, 0, 0, 6, 1, 0, 0, 0, 0, 8, 1, 0, 0, 0, 0, 10, 1, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 18, 1, 0, 0, 0, 0, 20, 1, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 24, 1, 0, 0, 0, 0, 26, 1, 0, 0, 0, 0, 28, 1, 0, 0, 0, 0, 30, 1, 0, 0, 0, 0, 32, 1, 0, 0, 0, 0, 34, 1, 0, 0, 0, 0, 36, 1, 0, 0, 0, 0, 38, 1, 0, 0, 0, 0, 40, 1, 0, 0, 0, 0, 42, 1, 0, 0, 0, 0, 44, 1, 0, 0, 0, 0, 48, 1, 0, 0, 0, 1, 56, 1, 0, 0, 0, 1, 58, 1, 0, 0, 0, 2, 61, 1, 0, 0, 0, 4, 68, 1, 0, 0, 0, 6, 75, 1, 0, 0, 0, 8, 81, 1, 0, 0, 0, 10, 817, 1, 0, 0, 0, 12, 832, 1, 0, 0, 0, 14, 834, 1, 0, 0, 0, 16, 844, 1, 0, 0, 0, 18, 857, 1, 0, 0, 0, 20, 864, 1, 0, 0, 0, 22, 871, 1, 0, 0, 0, 24, 878, 1, 0, 0, 0, 26, 883, 1, 0, 0, 0, 28, 894, 1, 0, 0, 0, 30, 907, 1, 0, 0, 0, 32, 915, 1, 0, 0, 0, 34, 927, 1, 0, 0, 0, 36, 944, 1, 0, 0, 0, 38, 953, 1, 0, 0, 0, 40, 961, 1, 0, 0, 0, 42, 963, 1, 0, 0, 0, 44, 966, 1, 0, 0, 0, 46, 970, 1, 0, 0, 0, 48, 975, 1, 0, 0, 0, 50, 977, 1, 0, 0, 0, 52, 985, 1, 0, 0, 0, 54, 994, 1, 0, 0, 0, 56, 1023, 1, 0, 0, 0, 58, 1032, 1, 0, 0, 0, 60, 62, 7, 0, 0, 0, 61, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 61, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 65, 1, 0, 0, 0, 65, 66, 6, 0, 0, 0, 66, 3, 1, 0, 0, 0, 67, 69, 5, 13, 0, 0, 68, 67, 1, 0, 0, 0, 68, 69, 1, 0, 0, 0, 69, 70, 1, 0, 0, 0, 70, 71, 5, 10, 0, 0, 71, 72, 1, 0, 0, 0, 72, 73, 6, 1, 0, 0, 73, 5, 1, 0, 0, 0, 74, 76, 3, 2, 0, 0, 75, 74, 1, 0, 0, 0, 75, 76, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 78, 3, 4, 1, 0, 78, 79, 1, 0, 0, 0, 79, 80, 6, 2, 0, 0, 80, 7, 1, 0, 0, 0, 81, 85, 5, 35, 0, 0, 82, 84, 8, 1, 0, 0, 83, 82, 1, 0, 0, 0, 84, 87, 1, 0, 0, 0, 85, 83, 1, 0, 0, 0, 85, 86, 1, 0, 0, 0, 86, 89, 1, 0, 0, 0, 87, 85, 1, 0, 0, 0, 88, 90, 3, 4, 1, 0, 89, 88, 1, 0, 0, 0, 89, 90, 1, 0, 0, 0, 90, 91, 1, 0, 0, 0, 91, 92, 6, 3, 0, 0, 92, 9, 1, 0, 0, 0, 93, 94, 5, 97, 0, 0, 94, 95, 5, 108, 0, 0, 95, 96, 5, 115, 0, 0, 96, 97, 5, 111, 0, 0, 97, 98, 5, 95, 0, 0, 98, 99, 5, 115, 0, 0, 99, 100, 5, 99, 0, 0, 100, 101, 5, 97, 0, 0, 101, 102, 5, 110, 0, 0, 102, 103, 5, 95, 0, 0, 103, 104, 5, 100, 0, 0, 104, 105, 5, 105, 0, 0, 105, 106, 5, 114, 0, 0, 106, 818, 5, 115, 0, 0, 107, 108, 5, 97, 0, 0, 108, 109, 5, 108, 0, 0, 109, 110, 5, 115, 0, 0, 110, 111, 5, 111, 0, 0, 111, 112, 5, 95, 0, 0, 112, 113, 5, 115, 0, 0, 113, 114, 5, 99, 0, 0, 114, 115, 5, 97, 0, 0, 115, 116, 5, 110, 0, 0, 116, 117, 5, 95, 0, 0, 117, 118, 5, 116, 0, 0, 118, 119, 5, 111, 0, 0, 119, 120, 5, 111, 0, 0, 120, 121, 5, 108, 0, 0, 121, 818, 5, 115, 0, 0, 122, 123, 5, 98, 0, 0, 123, 124, 5, 97, 0, 0, 124, 125, 5, 110, 0, 0, 125, 126, 5, 110, 0, 0, 126, 127, 5, 101, 0, 0, 127, 818, 5, 114, 0, 0, 128, 129, 5, 98, 0, 0, 129, 130, 5, 97, 0, 0, 130, 131, 5, 110, 0, 0, 131, 132, 5, 110, 0, 0, 132, 133, 5, 101, 0, 0, 133, 134, 5, 114, 0, 0, 134, 135, 5, 95, 0, 0, 135, 136, 5, 115, 0, 0, 136, 137, 5, 99, 0, 0, 137, 138, 5, 97, 0, 0, 138, 139, 5, 108, 0, 0, 139, 818, 5, 101, 0, 0, 140, 141, 5, 98, 0, 0, 141, 142, 5, 105, 0, 0, 142, 143, 5, 103, 0, 0, 143, 144, 5, 95, 0, 0, 144, 145, 5, 105, 0, 0, 145, 146, 5, 99, 0, 0, 146, 147, 5, 111, 0, 0, 147, 148, 5, 110, 0, 0, 148, 149, 5, 95, 0, 0, 149, 150, 5, 115, 0, 0, 150, 151, 5, 105, 0, 0, 151, 152, 5, 122, 0, 0, 152, 818, 5, 101, 0, 0, 153, 154, 5, 99, 0, 0, 154, 155, 5, 115, 0, 0, 155, 156, 5, 114, 0, 0, 156, 157, 5, 95, 0, 0, 157, 158, 5, 118, 0, 0, 158, 159, 5, 97, 0, 0, 159, 160, 5, 108, 0, 0, 160, 161, 5, 117, 0, 0, 161, 162, 5, 101, 0, 0, 162, 818, 5, 115, 0, 0, 163, 164, 5, 100, 0, 0, 164, 165, 5, 101, 0, 0, 165, 166, 5, 102, 0, 0, 166, 167, 5, 97, 0, 0, 167, 168, 5, 117, 0, 0, 168, 169, 5, 108, 0, 0, 169, 170, 5, 116, 0, 0, 170, 171, 5, 95, 0, 0, 171, 172, 5, 115, 0, 0, 172, 173, 5, 101, 0, 0, 173, 174, 5, 108, 0, 0, 174, 175, 5, 101, 0, 0, 175, 176, 5, 99, 0, 0, 176, 177, 5, 116, 0, 0, 177, 178, 5, 105, 0, 0, 178, 179, 5, 111, 0, 0, 179, 818, 5, 110, 0, 0, 180, 181, 5, 100, 0, 0, 181, 182, 5, 111, 0, 0, 182, 183, 5, 110, 0, 0, 183, 184, 5, 39, 0, 0, 184, 185, 5, 116, 0, 0, 185, 186, 5, 95, 0, 0, 186, 187, 5, 115, 0, 0, 187, 188, 5, 99, 0, 0, 188, 189, 5, 97, 0, 0, 189, 190, 5, 110, 0, 0, 190, 191, 5, 95, 0, 0, 191, 192, 5, 100, 0, 0, 192, 193, 5, 105, 0, 0, 193, 194, 5, 114, 0, 0, 194, 818, 5, 115, 0, 0, 195, 196, 5, 100, 0, 0, 196, 197, 5, 111, 0, 0, 197, 198, 5, 110, 0, 0, 198, 199, 5, 39, 0, 0, 199, 200, 5, 116, 0, 0, 200, 201, 5, 95, 0, 0, 201, 202, 5, 115, 0, 0, 202, 203, 5, 99, 0, 0, 203, 204, 5, 97, 0, 0, 204, 205, 5, 110, 0, 0, 205, 206, 5, 95, 0, 0, 206, 207, 5, 102, 0, 0, 207, 208, 5, 105, 0, 0, 208, 209, 5, 108, 0, 0, 209, 210, 5, 101, 0, 0, 210, 818, 5, 115, 0, 0, 211, 212, 5, 100, 0, 0, 212, 213, 5, 111, 0, 0, 213, 214, 5, 110, 0, 0, 214, 215, 5, 39, 0, 0, 215, 216, 5, 116, 0, 0, 216, 217, 5, 95, 0, 0, 217, 218, 5, 115, 0, 0, 218, 219, 5, 99, 0, 0, 219, 220, 5, 97, 0, 0, 220, 221, 5, 110, 0, 0, 221, 222, 5, 95, 0, 0, 222, 223, 5, 102, 0, 0, 223, 224, 5, 105, 0, 0, 224, 225, 5, 114, 0, 0, 225, 226, 5, 109, 0, 0, 226, 227, 5, 119, 0, 0, 227, 228, 5, 97, 0, 0, 228, 229, 5, 114, 0, 0, 229, 818, 5, 101, 0, 0, 230, 231, 5, 100, 0, 0, 231, 232, 5, 111, 0, 0, 232, 233, 5, 110, 0, 0, 233, 234, 5, 39, 0, 0, 234, 235, 5, 116, 0, 0, 235, 236, 5, 95, 0, 0, 236, 237, 5, 115, 0, 0, 237, 238, 5, 99, 0, 0, 238, 239, 5, 97, 0, 0, 239, 240, 5, 110, 0, 0, 240, 241, 5, 95, 0, 0, 241, 242, 5, 116, 0, 0, 242, 243, 5, 111, 0, 0, 243, 244, 5, 111, 0, 0, 244, 245, 5, 108, 0, 0, 245, 818, 5, 115, 0, 0, 246, 247, 5, 100, 0, 0, 247, 248, 5, 111, 0, 0, 248, 249, 5, 110, 0, 0, 249, 250, 5, 39, 0, 0, 250, 251, 5, 116, 0, 0, 251, 252, 5, 95, 0, 0, 252, 253, 5, 115, 0, 0, 253, 254, 5, 99, 0, 0, 254, 255, 5, 97, 0, 0, 255, 256, 5, 110, 0, 0, 256, 257, 5, 95, 0, 0, 257, 258, 5, 118, 0, 0, 258, 259, 5, 111, 0, 0, 259, 260, 5, 108, 0, 0, 260, 261, 5, 117, 0, 0, 261, 262, 5, 109, 0, 0, 262, 263, 5, 101, 0, 0, 263, 818, 5, 115, 0, 0, 264, 265, 5, 100, 0, 0, 265, 266, 5, 111, 0, 0, 266, 267, 5, 110, 0, 0, 267, 268, 5, 116, 0, 0, 268, 269, 5, 95, 0, 0, 269, 270, 5, 115, 0, 0, 270, 271, 5, 99, 0, 0, 271, 272, 5, 97, 0, 0, 272, 273, 5, 110, 0, 0, 273, 274, 5, 95, 0, 0, 274, 275, 5, 100, 0, 0, 275, 276, 5, 105, 0, 0, 276, 277, 5, 114, 0, 0, 277, 818, 5, 115, 0, 0, 278, 279, 5, 100, 0, 0, 279, 280, 5, 111, 0, 0, 280, 281, 5, 110, 0, 0, 281, 282, 5, 116, 0, 0, 282, 283, 5, 95, 0, 0, 283, 284, 5, 115, 0, 0, 284, 285, 5, 99, 0, 0, 285, 286, 5, 97, 0, 0, 286, 287, 5, 110, 0, 0, 287, 288, 5, 95, 0, 0, 288, 289, 5, 102, 0, 0, 289, 290, 5, 105, 0, 0, 290, 291, 5, 108, 0, 0, 291, 292, 5, 101, 0, 0, 292, 818, 5, 115, 0, 0, 293, 294, 5, 100, 0, 0, 294, 295, 5, 111, 0, 0, 295, 296, 5, 110, 0, 0, 296, 297, 5, 116, 0, 0, 297, 298, 5, 95, 0, 0, 298, 299, 5, 115, 0, 0, 299, 300, 5, 99, 0, 0, 300, 301, 5, 97, 0, 0, 301, 302, 5, 110, 0, 0, 302, 303, 5, 95, 0, 0, 303, 304, 5, 102, 0, 0, 304, 305, 5, 105, 0, 0, 305, 306, 5, 114, 0, 0, 306, 307, 5, 109, 0, 0, 307, 308, 5, 119, 0, 0, 308, 309, 5, 97, 0, 0, 309, 310, 5, 114, 0, 0, 310, 818, 5, 101, 0, 0, 311, 312, 5, 100, 0, 0, 312, 313, 5, 111, 0, 0, 313, 314, 5, 110, 0, 0, 314, 315, 5, 116, 0, 0, 315, 316, 5, 95, 0, 0, 316, 317, 5, 115, 0, 0, 317, 318, 5, 99, 0, 0, 318, 319, 5, 97, 0, 0, 319, 320, 5, 110, 0, 0, 320, 321, 5, 95, 0, 0, 321, 322, 5, 116, 0, 0, 322, 323, 5, 111, 0, 0, 323, 324, 5, 111, 0, 0, 324, 325, 5, 108, 0, 0, 325, 818, 5, 115, 0, 0, 326, 327, 5, 100, 0, 0, 327, 328, 5, 111, 0, 0, 328, 329, 5, 110, 0, 0, 329, 330, 5, 116, 0, 0, 330, 331, 5, 95, 0, 0, 331, 332, 5, 115, 0, 0, 332, 333, 5, 99, 0, 0, 333, 334, 5, 97, 0, 0, 334, 335, 5, 110, 0, 0, 335, 336, 5, 95, 0, 0, 336, 337, 5, 118, 0, 0, 337, 338, 5, 111, 0, 0, 338, 339, 5, 108, 0, 0, 339, 340, 5, 117, 0, 0, 340, 341, 5, 109, 0, 0, 341, 342, 5, 101, 0, 0, 342, 818, 5, 115, 0, 0, 343, 344, 5, 101, 0, 0, 344, 345, 5, 110, 0, 0, 345, 346, 5, 97, 0, 0, 346, 347, 5, 98, 0, 0, 347, 348, 5, 108, 0, 0, 348, 349, 5, 101, 0, 0, 349, 350, 5, 95, 0, 0, 350, 351, 5, 97, 0, 0, 351, 352, 5, 110, 0, 0, 352, 353, 5, 100, 0, 0, 353, 354, 5, 95, 0, 0, 354, 355, 5, 108, 0, 0, 355, 356, 5, 111, 0, 0, 356, 357, 5, 99, 0, 0, 357, 358, 5, 107, 0, 0, 358, 359, 5, 95, 0, 0, 359, 360, 5, 118, 0, 0, 360, 361, 5, 109, 0, 0, 361, 818, 5, 120, 0, 0, 362, 363, 5, 101, 0, 0, 363, 364, 5, 110, 0, 0, 364, 365, 5, 97, 0, 0, 365, 366, 5, 98, 0, 0, 366, 367, 5, 108, 0, 0, 367, 368, 5, 101, 0, 0, 368, 369, 5, 95, 0, 0, 369, 370, 5, 109, 0, 0, 370, 371, 5, 111, 0, 0, 371, 372, 5, 117, 0, 0, 372, 373, 5, 115, 0, 0, 373, 818, 5, 101, 0, 0, 374, 375, 5, 101, 0, 0, 375, 376, 5, 110, 0, 0, 376, 377, 5, 97, 0, 0, 377, 378, 5, 98, 0, 0, 378, 379, 5, 108, 0, 0, 379, 380, 5, 101, 0, 0, 380, 381, 5, 95, 0, 0, 381, 382, 5, 116, 0, 0, 382, 383, 5, 111, 0, 0, 383, 384, 5, 117, 0, 0, 384, 385, 5, 99, 0, 0, 385, 818, 5, 104, 0, 0, 386, 387, 5, 101, 0, 0, 387, 388, 5, 120, 0, 0, 388, 389, 5, 116, 0, 0, 389, 390, 5, 114, 0, 0, 390, 391, 5, 97, 0, 0, 391, 392, 5, 95, 0, 0, 392, 393, 5, 107, 0, 0, 393, 394, 5, 101, 0, 0, 394, 395, 5, 114, 0, 0, 395, 396, 5, 110, 0, 0, 396, 397, 5, 101, 0, 0, 397, 398, 5, 108, 0, 0, 398, 399, 5, 95, 0, 0, 399, 400, 5, 118, 0, 0, 400, 401, 5, 101, 0, 0, 401, 402, 5, 114, 0, 0, 402, 403, 5, 115, 0, 0, 403, 404, 5, 105, 0, 0, 404, 405, 5, 111, 0, 0, 405, 406, 5, 110, 0, 0, 406, 407, 5, 95, 0, 0, 407, 408, 5, 115, 0, 0, 408, 409, 5, 116, 0, 0, 409, 410, 5, 114, 0, 0, 410, 411, 5, 105, 0, 0, 411, 412, 5, 110, 0, 0, 412, 413, 5, 103, 0, 0, 413, 818, 5, 115, 0, 0, 414, 415, 5, 102, 0, 0, 415, 416, 5, 111, 0, 0, 416, 417, 5, 108, 0, 0, 417, 418, 5, 100, 0, 0, 418, 419, 5, 95, 0, 0, 419, 420, 5, 108, 0, 0, 420, 421, 5, 105, 0, 0, 421, 422, 5, 110, 0, 0, 422, 423, 5, 117, 0, 0, 423, 424, 5, 120, 0, 0, 424, 425, 5, 95, 0, 0, 425, 426, 5, 107, 0, 0, 426, 427, 5, 101, 0, 0, 427, 428, 5, 114, 0, 0, 428, 429, 5, 110, 0, 0, 429, 430, 5, 101, 0, 0, 430, 431, 5, 108, 0, 0, 431, 818, 5, 115, 0, 0, 432, 433, 5, 102, 0, 0, 433, 434, 5, 111, 0, 0, 434, 435, 5, 108, 0, 0, 435, 436, 5, 108, 0, 0, 436, 437, 5, 111, 0, 0, 437, 438, 5, 119, 0, 0, 438, 439, 5, 95, 0, 0, 439, 440, 5, 115, 0, 0, 440, 441, 5, 121, 0, 0, 441, 442, 5, 109, 0, 0, 442, 443, 5, 108, 0, 0, 443, 444, 5, 105, 0, 0, 444, 445, 5, 110, 0, 0, 445, 446, 5, 107, 0, 0, 446, 818, 5, 115, 0, 0, 447, 448, 5, 102, 0, 0, 448, 449, 5, 111, 0, 0, 449, 450, 5, 110, 0, 0, 450, 818, 5, 116, 0, 0, 451, 452, 5, 104, 0, 0, 452, 453, 5, 105, 0, 0, 453, 454, 5, 100, 0, 0, 454, 455, 5, 101, 0, 0, 455, 456, 5, 117, 0, 0, 456, 818, 5, 105, 0, 0, 457, 458, 5, 105, 0, 0, 458, 459, 5, 99, 0, 0, 459, 460, 5, 111, 0, 0, 460, 461, 5, 110, 0, 0, 461, 462, 5, 115, 0, 0, 462, 463, 5, 95, 0, 0, 463, 464, 5, 100, 0, 0, 464, 465, 5, 105, 0, 0, 465, 818, 5, 114, 0, 0, 466, 467, 5, 108, 0, 0, 467, 468, 5, 105, 0, 0, 468, 469, 5, 110, 0, 0, 469, 470, 5, 117, 0, 0, 470, 471, 5, 120, 0, 0, 471, 472, 5, 95, 0, 0, 472, 473, 5, 112, 0, 0, 473, 474, 5, 114, 0, 0, 474, 475, 5, 101, 0, 0, 475, 476, 5, 102, 0, 0, 476, 477, 5, 105, 0, 0, 477, 478, 5, 120, 0, 0, 478, 479, 5, 101, 0, 0, 479, 818, 5, 115, 0, 0, 480, 481, 5, 108, 0, 0, 481, 482, 5, 111, 0, 0, 482, 483, 5, 103, 0, 0, 483, 484, 5, 95, 0, 0, 484, 485, 5, 108, 0, 0, 485, 486, 5, 101, 0, 0, 486, 487, 5, 118, 0, 0, 487, 488, 5, 101, 0, 0, 488, 818, 5, 108, 0, 0, 489, 490, 5, 109, 0, 0, 490, 491, 5, 97, 0, 0, 491, 492, 5, 120, 0, 0, 492, 493, 5, 95, 0, 0, 493, 494, 5, 116, 0, 0, 494, 495, 5, 97, 0, 0, 495, 496, 5, 103, 0, 0, 496, 818, 5, 115, 0, 0, 497, 498, 5, 109, 0, 0, 498, 499, 5, 111, 0, 0, 499, 500, 5, 117, 0, 0, 500, 501, 5, 115, 0, 0, 501, 502, 5, 101, 0, 0, 502, 503, 5, 95, 0, 0, 503, 504, 5, 115, 0, 0, 504, 505, 5, 105, 0, 0, 505, 506, 5, 122, 0, 0, 506, 818, 5, 101, 0, 0, 507, 508, 5, 109, 0, 0, 508, 509, 5, 111, 0, 0, 509, 510, 5, 117, 0, 0, 510, 511, 5, 115, 0, 0, 511, 512, 5, 101, 0, 0, 512, 513, 5, 95, 0, 0, 513, 514, 5, 115, 0, 0, 514, 515, 5, 112, 0, 0, 515, 516, 5, 101, 0, 0, 516, 517, 5, 101, 0, 0, 517, 818, 5, 100, 0, 0, 518, 519, 5, 114, 0, 0, 519, 520, 5, 101, 0, 0, 520, 521, 5, 115, 0, 0, 521, 522, 5, 111, 0, 0, 522, 523, 5, 108, 0, 0, 523, 524, 5, 117, 0, 0, 524, 525, 5, 116, 0, 0, 525, 526, 5, 105, 0, 0, 526, 527, 5, 111, 0, 0, 527, 818, 5, 110, 0, 0, 528, 529, 5, 115, 0, 0, 529, 530, 5, 99, 0, 0, 530, 531, 5, 97, 0, 0, 531, 532, 5, 110, 0, 0, 532, 533, 5, 95, 0, 0, 533, 534, 5, 97, 0, 0, 534, 535, 5, 108, 0, 0, 535, 536, 5, 108, 0, 0, 536, 537, 5, 95, 0, 0, 537, 538, 5, 108, 0, 0, 538, 539, 5, 105, 0, 0, 539, 540, 5, 110, 0, 0, 540, 541, 5, 117, 0, 0, 541, 542, 5, 120, 0, 0, 542, 543, 5, 95, 0, 0, 543, 544, 5, 107, 0, 0, 544, 545, 5, 101, 0, 0, 545, 546, 5, 114, 0, 0, 546, 547, 5, 110, 0, 0, 547, 548, 5, 101, 0, 0, 548, 549, 5, 108, 0, 0, 549, 818, 5, 115, 0, 0, 550, 551, 5, 115, 0, 0, 551, 552, 5, 99, 0, 0, 552, 553, 5, 97, 0, 0, 553, 554, 5, 110, 0, 0, 554, 555, 5, 95, 0, 0, 555, 556, 5, 100, 0, 0, 556, 557, 5, 101, 0, 0, 557, 558, 5, 108, 0, 0, 558, 559, 5, 97, 0, 0, 559, 818, 5, 121, 0, 0, 560, 561, 5, 115, 0, 0, 561, 562, 5, 99, 0, 0, 562, 563, 5, 97, 0, 0, 563, 564, 5, 110, 0, 0, 564, 565, 5, 95, 0, 0, 565, 566, 5, 100, 0, 0, 566, 567, 5, 114, 0, 0, 567, 568, 5, 105, 0, 0, 568, 569, 5, 118, 0, 0, 569, 570, 5, 101, 0, 0, 570, 571, 5, 114, 0, 0, 571, 572, 5, 95, 0, 0, 572, 573, 5, 100, 0, 0, 573, 574, 5, 105, 0, 0, 574, 575, 5, 114, 0, 0, 575, 818, 5, 115, 0, 0, 576, 577, 5, 115, 0, 0, 577, 578, 5, 99, 0, 0, 578, 579, 5, 97, 0, 0, 579, 580, 5, 110, 0, 0, 580, 581, 5, 102, 0, 0, 581, 582, 5, 111, 0, 0, 582, 818, 5, 114, 0, 0, 583, 584, 5, 115, 0, 0, 584, 585, 5, 99, 0, 0, 585, 586, 5, 114, 0, 0, 586, 587, 5, 101, 0, 0, 587, 588, 5, 101, 0, 0, 588, 589, 5, 110, 0, 0, 589, 590, 5, 115, 0, 0, 590, 591, 5, 97, 0, 0, 591, 592, 5, 118, 0, 0, 592, 593, 5, 101, 0, 0, 593, 818, 5, 114, 0, 0, 594, 595, 5, 115, 0, 0, 595, 596, 5, 101, 0, 0, 596, 597, 5, 108, 0, 0, 597, 598, 5, 101, 0, 0, 598, 599, 5, 99, 0, 0, 599, 600, 5, 116, 0, 0, 600, 601, 5, 105, 0, 0, 601, 602, 5, 111, 0, 0, 602, 603, 5, 110, 0, 0, 603, 604, 5, 95, 0, 0, 604, 605, 5, 98, 0, 0, 605, 606, 5, 105, 0, 0, 606, 818, 5, 103, 0, 0, 607, 608, 5, 115, 0, 0, 608, 609, 5, 101, 0, 0, 609, 610, 5, 108, 0, 0, 610, 611, 5, 101, 0, 0, 611, 612, 5, 99, 0, 0, 612, 613, 5, 116, 0, 0, 613, 614, 5, 105, 0, 0, 614, 615, 5, 111, 0, 0, 615, 616, 5, 110, 0, 0, 616, 617, 5, 95, 0, 0, 617, 618, 5, 115, 0, 0, 618, 619, 5, 109, 0, 0, 619, 620, 5, 97, 0, 0, 620, 621, 5, 108, 0, 0, 621, 818, 5, 108, 0, 0, 622, 623, 5, 115, 0, 0, 623, 624, 5, 104, 0, 0, 624, 625, 5, 111, 0, 0, 625, 626, 5, 119, 0, 0, 626, 627, 5, 116, 0, 0, 627, 628, 5, 111, 0, 0, 628, 629, 5, 111, 0, 0, 629, 630, 5, 108, 0, 0, 630, 818, 5, 115, 0, 0, 631, 632, 5, 115, 0, 0, 632, 633, 5, 104, 0, 0, 633, 634, 5, 117, 0, 0, 634, 635, 5, 116, 0, 0, 635, 636, 5, 100, 0, 0, 636, 637, 5, 111, 0, 0, 637, 638, 5, 119, 0, 0, 638, 639, 5, 110, 0, 0, 639, 640, 5, 95, 0, 0, 640, 641, 5, 97, 0, 0, 641, 642, 5, 102, 0, 0, 642, 643, 5, 116, 0, 0, 643, 644, 5, 101, 0, 0, 644, 645, 5, 114, 0, 0, 645, 646, 5, 95, 0, 0, 646, 647, 5, 116, 0, 0, 647, 648, 5, 105, 0, 0, 648, 649, 5, 109, 0, 0, 649, 650, 5, 101, 0, 0, 650, 651, 5, 111, 0, 0, 651, 652, 5, 117, 0, 0, 652, 818, 5, 116, 0, 0, 653, 654, 5, 115, 0, 0, 654, 655, 5, 109, 0, 0, 655, 656, 5, 97, 0, 0, 656, 657, 5, 108, 0, 0, 657, 658, 5, 108, 0, 0, 658, 659, 5, 95, 0, 0, 659, 660, 5, 105, 0, 0, 660, 661, 5, 99, 0, 0, 661, 662, 5, 111, 0, 0, 662, 663, 5, 110, 0, 0, 663, 664, 5, 95, 0, 0, 664, 665, 5, 115, 0, 0, 665, 666, 5, 105, 0, 0, 666, 667, 5, 122, 0, 0, 667, 818, 5, 101, 0, 0, 668, 669, 5, 115, 0, 0, 669, 670, 5, 112, 0, 0, 670, 671, 5, 111, 0, 0, 671, 672, 5, 111, 0, 0, 672, 673, 5, 102, 0, 0, 673, 674, 5, 95, 0, 0, 674, 675, 5, 111, 0, 0, 675, 676, 5, 115, 0, 0, 676, 677, 5, 120, 0, 0, 677, 678, 5, 95, 0, 0, 678, 679, 5, 118, 0, 0, 679, 680, 5, 101, 0, 0, 680, 681, 5, 114, 0, 0, 681, 682, 5, 115, 0, 0, 682, 683, 5, 105, 0, 0, 683, 684, 5, 111, 0, 0, 684, 818, 5, 110, 0, 0, 685, 686, 5, 115, 0, 0, 686, 687, 5, 117, 0, 0, 687, 688, 5, 112, 0, 0, 688, 689, 5, 112, 0, 0, 689, 690, 5, 111, 0, 0, 690, 691, 5, 114, 0, 0, 691, 692, 5, 116, 0, 0, 692, 693, 5, 95, 0, 0, 693, 694, 5, 103, 0, 0, 694, 695, 5, 122, 0, 0, 695, 696, 5, 105, 0, 0, 696, 697, 5, 112, 0, 0, 697, 698, 5, 112, 0, 0, 698, 699, 5, 101, 0, 0, 699, 700, 5, 100, 0, 0, 700, 701, 5, 95, 0, 0, 701, 702, 5, 108, 0, 0, 702, 703, 5, 111, 0, 0, 703, 704, 5, 97, 0, 0, 704, 705, 5, 100, 0, 0, 705, 706, 5, 101, 0, 0, 706, 707, 5, 114, 0, 0, 707, 818, 5, 115, 0, 0, 708, 709, 5, 116, 0, 0, 709, 710, 5, 101, 0, 0, 710, 711, 5, 120, 0, 0, 711, 712, 5, 116, 0, 0, 712, 713, 5, 109, 0, 0, 713, 714, 5, 111, 0, 0, 714, 715, 5, 100, 0, 0, 715, 818, 5, 101, 0, 0, 716, 717, 5, 116, 0, 0, 717, 718, 5, 101, 0, 0, 718, 719, 5, 120, 0, 0, 719, 720, 5, 116, 0, 0, 720, 721, 5, 111, 0, 0, 721, 722, 5, 110, 0, 0, 722, 723, 5, 108, 0, 0, 723, 818, 5, 121, 0, 0, 724, 725, 5, 116, 0, 0, 725, 726, 5, 105, 0, 0, 726, 727, 5, 109, 0, 0, 727, 728, 5, 101, 0, 0, 728, 729, 5, 111, 0, 0, 729, 730, 5, 117, 0, 0, 730, 818, 5, 116, 0, 0, 731, 732, 5, 117, 0, 0, 732, 733, 5, 101, 0, 0, 733, 734, 5, 102, 0, 0, 734, 735, 5, 105, 0, 0, 735, 736, 5, 95, 0, 0, 736, 737, 5, 100, 0, 0, 737, 738, 5, 101, 0, 0, 738, 739, 5, 101, 0, 0, 739, 740, 5, 112, 0, 0, 740, 741, 5, 95, 0, 0, 741, 742, 5, 108, 0, 0, 742, 743, 5, 101, 0, 0, 743, 744, 5, 103, 0, 0, 744, 745, 5, 97, 0, 0, 745, 746, 5, 99, 0, 0, 746, 747, 5, 121, 0, 0, 747, 748, 5, 95, 0, 0, 748, 749, 5, 115, 0, 0, 749, 750, 5, 99, 0, 0, 750, 751, 5, 97, 0, 0, 751, 818, 5, 110, 0, 0, 752, 753, 5, 117, 0, 0, 753, 754, 5, 115, 0, 0, 754, 755, 5, 101, 0, 0, 755, 756, 5, 95, 0, 0, 756, 757, 5, 103, 0, 0, 757, 758, 5, 114, 0, 0, 758, 759, 5, 97, 0, 0, 759, 760, 5, 112, 0, 0, 760, 761, 5, 104, 0, 0, 761, 762, 5, 105, 0, 0, 762, 763, 5, 99, 0, 0, 763, 764, 5, 115, 0, 0, 764, 765, 5, 95, 0, 0, 765, 766, 5, 102, 0, 0, 766, 767, 5, 111, 0, 0, 767, 818, 5, 114, 0, 0, 768, 769, 5, 117, 0, 0, 769, 770, 5, 115, 0, 0, 770, 771, 5, 101, 0, 0, 771, 772, 5, 95, 0, 0, 772, 773, 5, 110, 0, 0, 773, 774, 5, 118, 0, 0, 774, 775, 5, 114, 0, 0, 775, 776, 5, 97, 0, 0, 776, 818, 5, 109, 0, 0, 777, 778, 5, 119, 0, 0, 778, 779, 5, 105, 0, 0, 779, 780, 5, 110, 0, 0, 780, 781, 5, 100, 0, 0, 781, 782, 5, 111, 0, 0, 782, 783, 5, 119, 0, 0, 783, 784, 5, 115, 0, 0, 784, 785, 5, 95, 0, 0, 785, 786, 5, 114, 0, 0, 786, 787, 5, 101, 0, 0, 787, 788, 5, 99, 0, 0, 788, 789, 5, 111, 0, 0, 789, 790, 5, 118, 0, 0, 790, 791, 5, 101, 0, 0, 791, 792, 5, 114, 0, 0, 792, 793, 5, 121, 0, 0, 793, 794, 5, 95, 0, 0, 794, 795, 5, 102, 0, 0, 795, 796, 5, 105, 0, 0, 796, 797, 5, 108, 0, 0, 797, 798, 5, 101, 0, 0, 798, 818, 5, 115, 0, 0, 799, 800, 5, 119, 0, 0, 800, 801, 5, 114, 0, 0, 801, 802, 5, 105, 0, 0, 802, 803, 5, 116, 0, 0, 803, 804, 5, 101, 0, 0, 804, 805, 5, 95, 0, 0, 805, 806, 5, 115, 0, 0, 806, 807, 5, 121, 0, 0, 807, 808, 5, 115, 0, 0, 808, 809, 5, 116, 0, 0, 809, 810, 5, 101, 0, 0, 810, 811, 5, 109, 0, 0, 811, 812, 5, 100, 0, 0, 812, 813, 5, 95, 0, 0, 813, 814, 5, 118, 0, 0, 814, 815, 5, 97, 0, 0, 815, 816, 5, 114, 0, 0, 816, 818, 5, 115, 0, 0, 817, 93, 1, 0, 0, 0, 817, 107, 1, 0, 0, 0, 817, 122, 1, 0, 0, 0, 817, 128, 1, 0, 0, 0, 817, 140, 1, 0, 0, 0, 817, 153, 1, 0, 0, 0, 817, 163, 1, 0, 0, 0, 817, 180, 1, 0, 0, 0, 817, 195, 1, 0, 0, 0, 817, 211, 1, 0, 0, 0, 817, 230, 1, 0, 0, 0, 817, 246, 1, 0, 0, 0, 817, 264, 1, 0, 0, 0, 817, 278, 1, 0, 0, 0, 817, 293, 1, 0, 0, 0, 817, 311, 1, 0, 0, 0, 817, 326, 1, 0, 0, 0, 817, 343, 1, 0, 0, 0, 817, 362, 1, 0, 0, 0, 817, 374, 1, 0, 0, 0, 817, 386, 1, 0, 0, 0, 817, 414, 1, 0, 0, 0, 817, 432, 1, 0, 0, 0, 817, 447, 1, 0, 0, 0, 817, 451, 1, 0, 0, 0, 817, 457, 1, 0, 0, 0, 817, 466, 1, 0, 0, 0, 817, 480, 1, 0, 0, 0, 817, 489, 1, 0, 0, 0, 817, 497, 1, 0, 0, 0, 817, 507, 1, 0, 0, 0, 817, 518, 1, 0, 0, 0, 817, 528, 1, 0, 0, 0, 817, 550, 1, 0, 0, 0, 817, 560, 1, 0, 0, 0, 817, 576, 1, 0, 0, 0, 817, 583, 1, 0, 0, 0, 817, 594, 1, 0, 0, 0, 817, 607, 1, 0, 0, 0, 817, 622, 1, 0, 0, 0, 817, 631, 1, 0, 0, 0, 817, 653, 1, 0, 0, 0, 817, 668, 1, 0, 0, 0, 817, 685, 1, 0, 0, 0, 817, 708, 1, 0, 0, 0, 817, 716, 1, 0, 0, 0, 817, 724, 1, 0, 0, 0, 817, 731, 1, 0, 0, 0, 817, 752, 1, 0, 0, 0, 817, 768, 1, 0, 0, 0, 817, 777, 1, 0, 0, 0, 817, 799, 1, 0, 0, 0, 818, 822, 1, 0, 0, 0, 819, 821, 8, 1, 0, 0, 820, 819, 1, 0, 0, 0, 821, 824, 1, 0, 0, 0, 822, 820, 1, 0, 0, 0, 822, 823, 1, 0, 0, 0, 823, 826, 1, 0, 0, 0, 824, 822, 1, 0, 0, 0, 825, 827, 3, 4, 1, 0, 826, 825, 1, 0, 0, 0, 826, 827, 1, 0, 0, 0, 827, 828, 1, 0, 0, 0, 828, 829, 6, 4, 0, 0, 829, 11, 1, 0, 0, 0, 830, 833, 3, 14, 6, 0, 831, 833, 3, 16, 7, 0, 832, 830, 1, 0, 0, 0, 832, 831, 1, 0, 0, 0, 833, 13, 1, 0, 0, 0, 834, 835, 5, 109, 0, 0, 835, 836, 5, 101, 0, 0, 836, 837, 5, 110, 0, 0, 837, 838, 5, 117, 0, 0, 838, 839, 5, 101, 0, 0, 839, 840, 5, 110, 0, 0, 840, 841, 5, 116, 0, 0, 841, 842, 5, 114, 0, 0, 842, 843, 5, 121, 0, 0, 843, 15, 1, 0, 0, 0, 844, 845, 5, 115, 0, 0, 845, 846, 5, 117, 0, 0, 846, 847, 5, 98, 0, 0, 847, 848, 5, 109, 0, 0, 848, 849, 5, 101, 0, 0, 849, 850, 5, 110, 0, 0, 850, 851, 5, 117, 0, 0, 851, 852, 5, 101, 0, 0, 852, 853, 5, 110, 0, 0, 853, 854, 5, 116, 0, 0, 854, 855, 5, 114, 0, 0, 855, 856, 5, 121, 0, 0, 856, 17, 1, 0, 0, 0, 857, 858, 5, 118, 0, 0, 858, 859, 5, 111, 0, 0, 859, 860, 5, 108, 0, 0, 860, 861, 5, 117, 0, 0, 861, 862, 5, 109, 0, 0, 862, 863, 5, 101, 0, 0, 863, 19, 1, 0, 0, 0, 864, 865, 5, 108, 0, 0, 865, 866, 5, 111, 0, 0, 866, 867, 5, 97, 0, 0, 867, 868, 5, 100, 0, 0, 868, 869, 5, 101, 0, 0, 869, 870, 5, 114, 0, 0, 870, 21, 1, 0, 0, 0, 871, 872, 5, 105, 0, 0, 872, 873, 5, 110, 0, 0, 873, 874, 5, 105, 0, 0, 874, 875, 5, 116, 0, 0, 875, 876, 5, 114, 0, 0, 876, 877, 5, 100, 0, 0, 877, 23, 1, 0, 0, 0, 878, 879, 5, 105, 0, 0, 879, 880, 5, 99, 0, 0, 880, 881, 5, 111, 0, 0, 881, 882, 5, 110, 0, 0, 882, 25, 1, 0, 0, 0, 883, 884, 5, 111, 0, 0, 884, 885, 5, 115, 0, 0, 885, 886, 5, 116, 0, 0, 886, 887, 5, 121, 0, 0, 887, 888, 5, 112, 0, 0, 888, 889, 5, 101, 0, 0, 889, 890, 1, 0, 0, 0, 890, 891, 3, 2, 0, 0, 891, 892, 1, 0, 0, 0, 892, 893, 6, 12, 1, 0, 893, 27, 1, 0, 0, 0, 894, 895, 5, 103, 0, 0, 895, 896, 5, 114, 0, 0, 896, 897, 5, 97, 0, 0, 897, 898, 5, 112, 0, 0, 898, 899, 5, 104, 0, 0, 899, 900, 5, 105, 0, 0, 900, 901, 5, 99, 0, 0, 901, 902, 5, 115, 0, 0, 902, 903, 1, 0, 0, 0, 903, 904, 3, 2, 0, 0, 904, 905, 1, 0, 0, 0, 905, 906, 6, 13, 1, 0, 906, 29, 1, 0, 0, 0, 907, 908, 5, 111, 0, 0, 908, 909, 5, 112, 0, 0, 909, 910, 5, 116, 0, 0, 910, 911, 5, 105, 0, 0, 911, 912, 5, 111, 0, 0, 912, 913, 5, 110, 0, 0, 913, 914, 5, 115, 0, 0, 914, 31, 1, 0, 0, 0, 915, 916, 5, 97, 0, 0, 916, 917, 5, 100, 0, 0, 917, 918, 5, 100, 0, 0, 918, 919, 5, 95, 0, 0, 919, 920, 5, 111, 0, 0, 920, 921, 5, 112, 0, 0, 921, 922, 5, 116, 0, 0, 922, 923, 5, 105, 0, 0, 923, 924, 5, 111, 0, 0, 924, 925, 5, 110, 0, 0, 925, 926, 5, 115, 0, 0, 926, 33, 1, 0, 0, 0, 927, 928, 5, 102, 0, 0, 928, 929, 5, 105, 0, 0, 929, 930, 5, 114, 0, 0, 930, 931, 5, 109, 0, 0, 931, 932, 5, 119, 0, 0, 932, 933, 5, 97, 0, 0, 933, 934, 5, 114, 0, 0, 934, 935, 5, 101, 0, 0, 935, 936, 5, 95, 0, 0, 936, 937, 5, 98, 0, 0, 937, 938, 5, 111, 0, 0, 938, 939, 5, 111, 0, 0, 939, 940, 5, 116, 0, 0, 940, 941, 5, 110, 0, 0, 941, 942, 5, 117, 0, 0, 942, 943, 5, 109, 0, 0, 943, 35, 1, 0, 0, 0, 944, 945, 5, 100, 0, 0, 945, 946, 5, 105, 0, 0, 946, 947, 5, 115, 0, 0, 947, 948, 5, 97, 0, 0, 948, 949, 5, 98, 0, 0, 949, 950, 5, 108, 0, 0, 950, 951, 5, 101, 0, 0, 951, 952, 5, 100, 0, 0, 952, 37, 1, 0, 0, 0, 953, 954, 5, 105, 0, 0, 954, 955, 5, 110, 0, 0, 955, 956, 5, 99, 0, 0, 956, 957, 5, 108, 0, 0, 957, 958, 5, 117, 0, 0, 958, 959, 5, 100, 0, 0, 959, 960, 5, 101, 0, 0, 960, 39, 1, 0, 0, 0, 961, 962, 5, 123, 0, 0, 962, 41, 1, 0, 0, 0, 963, 964, 5, 125, 0, 0, 964, 43, 1, 0, 0, 0, 965, 967, 3, 46, 22, 0, 966, 965, 1, 0, 0, 0, 967, 968, 1, 0, 0, 0, 968, 966, 1, 0, 0, 0, 968, 969, 1, 0, 0, 0, 969, 45, 1, 0, 0, 0, 970, 971, 7, 2, 0, 0, 971, 47, 1, 0, 0, 0, 972, 976, 3, 50, 24, 0, 973, 976, 3, 52, 25, 0, 974, 976, 3, 54, 26, 0, 975, 972, 1, 0, 0, 0, 975, 973, 1, 0, 0, 0, 975, 974, 1, 0, 0, 0, 976, 49, 1, 0, 0, 0, 977, 979, 5, 39, 0, 0, 978, 980, 8, 1, 0, 0, 979, 978, 1, 0, 0, 0, 980, 981, 1, 0, 0, 0, 981, 979, 1, 0, 0, 0, 981, 982, 1, 0, 0, 0, 982, 983, 1, 0, 0, 0, 983, 984, 5, 39, 0, 0, 984, 51, 1, 0, 0, 0, 985, 987, 5, 34, 0, 0, 986, 988, 8, 1, 0, 0, 987, 986, 1, 0, 0, 0, 988, 989, 1, 0, 0, 0, 989, 987, 1, 0, 0, 0, 989, 990, 1, 0, 0, 0, 990, 991, 1, 0, 0, 0, 991, 992, 5, 34, 0, 0, 992, 53, 1, 0, 0, 0, 993, 995, 8, 3, 0, 0, 994, 993, 1, 0, 0, 0, 995, 996, 1, 0, 0, 0, 996, 994, 1, 0, 0, 0, 996, 997, 1, 0, 0, 0, 997, 55, 1, 0, 0, 0, 998, 999, 5, 77, 0, 0, 999, 1000, 5, 97, 0, 0, 1000, 1001, 5, 99, 0, 0, 1001, 1002, 5, 79, 0, 0, 1002, 1024, 5, 83, 0, 0, 1003, 1004, 5, 76, 0, 0, 1004, 1005, 5, 105, 0, 0, 1005, 1006, 5, 110, 0, 0, 1006, 1007, 5, 117, 0, 0, 1007, 1024, 5, 120, 0, 0, 1008, 1009, 5, 69, 0, 0, 1009, 1010, 5, 76, 0, 0, 1010, 1011, 5, 73, 0, 0, 1011, 1012, 5, 76, 0, 0, 1012, 1024, 5, 79, 0, 0, 1013, 1014, 5, 87, 0, 0, 1014, 1015, 5, 105, 0, 0, 1015, 1016, 5, 110, 0, 0, 1016, 1017, 5, 100, 0, 0, 1017, 1018, 5, 111, 0, 0, 1018, 1019, 5, 119, 0, 0, 1019, 1024, 5, 115, 0, 0, 1020, 1021, 5, 88, 0, 0, 1021, 1022, 5, 79, 0, 0, 1022, 1024, 5, 77, 0, 0, 1023, 998, 1, 0, 0, 0, 1023, 1003, 1, 0, 0, 0, 1023, 1008, 1, 0, 0, 0, 1023, 1013, 1, 0, 0, 0, 1023, 1020, 1, 0, 0, 0, 1024, 1025, 1, 0, 0, 0, 1025, 1026, 6, 27, 2, 0, 1026, 57, 1, 0, 0, 0, 1027, 1028, 5, 111, 0, 0, 1028, 1033, 5, 110, 0, 0, 1029, 1030, 5, 111, 0, 0, 1030, 1031, 5, 102, 0, 0, 1031, 1033, 5, 102, 0, 0, 1032, 1027, 1, 0, 0, 0, 1032, 1029, 1, 0, 0, 0, 1033, 1034, 1, 0, 0, 0, 1034, 1035, 6, 28, 2, 0, 1035, 59, 1, 0, 0, 0, 18, 0, 1, 63, 68, 75, 85, 89, 817, 822, 826, 832, 968, 975, 981, 989, 996, 1023, 1032, 3, 6, 0, 0, 5, 1, 0, 4, 0, 0]
================================================
FILE: src/refind_btrfs/boot/antlr4/RefindConfigLexer.py
================================================
# Generated from c:/Users/Luka/Projects/Python/refind-btrfs/src/refind_btrfs/boot/antlr4/RefindConfigLexer.g4 by ANTLR 4.13.1
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
from typing import TextIO
else:
from typing.io import TextIO
def serializedATN():
return [
4,0,23,1036,6,-1,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,
5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,
12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,
19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,
25,2,26,7,26,2,27,7,27,2,28,7,28,1,0,4,0,62,8,0,11,0,12,0,63,1,0,
1,0,1,1,3,1,69,8,1,1,1,1,1,1,1,1,1,1,2,3,2,76,8,2,1,2,1,2,1,2,1,
2,1,3,1,3,5,3,84,8,3,10,3,12,3,87,9,3,1,3,3,3,90,8,3,1,3,1,3,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
1,4,1,4,1,4,3,4,818,8,4,1,4,5,4,821,8,4,10,4,12,4,824,9,4,1,4,3,
4,827,8,4,1,4,1,4,1,5,1,5,3,5,833,8,5,1,6,1,6,1,6,1,6,1,6,1,6,1,
6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,
7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,10,1,
10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,
12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,
13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,
14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,
15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,
16,1,16,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,17,1,
17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,19,1,19,1,
20,1,20,1,21,4,21,967,8,21,11,21,12,21,968,1,22,1,22,1,23,1,23,1,
23,3,23,976,8,23,1,24,1,24,4,24,980,8,24,11,24,12,24,981,1,24,1,
24,1,25,1,25,4,25,988,8,25,11,25,12,25,989,1,25,1,25,1,26,4,26,995,
8,26,11,26,12,26,996,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,
1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,
1,27,1,27,1,27,3,27,1024,8,27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,
3,28,1033,8,28,1,28,1,28,0,0,29,2,1,4,2,6,3,8,4,10,5,12,6,14,0,16,
0,18,7,20,8,22,9,24,10,26,11,28,12,30,13,32,14,34,15,36,16,38,17,
40,18,42,19,44,20,46,0,48,21,50,0,52,0,54,0,56,22,58,23,2,0,1,4,
2,0,9,9,32,32,1,0,10,10,3,0,48,57,65,70,97,102,2,0,9,10,32,32,1098,
0,2,1,0,0,0,0,4,1,0,0,0,0,6,1,0,0,0,0,8,1,0,0,0,0,10,1,0,0,0,0,12,
1,0,0,0,0,18,1,0,0,0,0,20,1,0,0,0,0,22,1,0,0,0,0,24,1,0,0,0,0,26,
1,0,0,0,0,28,1,0,0,0,0,30,1,0,0,0,0,32,1,0,0,0,0,34,1,0,0,0,0,36,
1,0,0,0,0,38,1,0,0,0,0,40,1,0,0,0,0,42,1,0,0,0,0,44,1,0,0,0,0,48,
1,0,0,0,1,56,1,0,0,0,1,58,1,0,0,0,2,61,1,0,0,0,4,68,1,0,0,0,6,75,
1,0,0,0,8,81,1,0,0,0,10,817,1,0,0,0,12,832,1,0,0,0,14,834,1,0,0,
0,16,844,1,0,0,0,18,857,1,0,0,0,20,864,1,0,0,0,22,871,1,0,0,0,24,
878,1,0,0,0,26,883,1,0,0,0,28,894,1,0,0,0,30,907,1,0,0,0,32,915,
1,0,0,0,34,927,1,0,0,0,36,944,1,0,0,0,38,953,1,0,0,0,40,961,1,0,
0,0,42,963,1,0,0,0,44,966,1,0,0,0,46,970,1,0,0,0,48,975,1,0,0,0,
50,977,1,0,0,0,52,985,1,0,0,0,54,994,1,0,0,0,56,1023,1,0,0,0,58,
1032,1,0,0,0,60,62,7,0,0,0,61,60,1,0,0,0,62,63,1,0,0,0,63,61,1,0,
0,0,63,64,1,0,0,0,64,65,1,0,0,0,65,66,6,0,0,0,66,3,1,0,0,0,67,69,
5,13,0,0,68,67,1,0,0,0,68,69,1,0,0,0,69,70,1,0,0,0,70,71,5,10,0,
0,71,72,1,0,0,0,72,73,6,1,0,0,73,5,1,0,0,0,74,76,3,2,0,0,75,74,1,
0,0,0,75,76,1,0,0,0,76,77,1,0,0,0,77,78,3,4,1,0,78,79,1,0,0,0,79,
80,6,2,0,0,80,7,1,0,0,0,81,85,5,35,0,0,82,84,8,1,0,0,83,82,1,0,0,
0,84,87,1,0,0,0,85,83,1,0,0,0,85,86,1,0,0,0,86,89,1,0,0,0,87,85,
1,0,0,0,88,90,3,4,1,0,89,88,1,0,0,0,89,90,1,0,0,0,90,91,1,0,0,0,
91,92,6,3,0,0,92,9,1,0,0,0,93,94,5,97,0,0,94,95,5,108,0,0,95,96,
5,115,0,0,96,97,5,111,0,0,97,98,5,95,0,0,98,99,5,115,0,0,99,100,
5,99,0,0,100,101,5,97,0,0,101,102,5,110,0,0,102,103,5,95,0,0,103,
104,5,100,0,0,104,105,5,105,0,0,105,106,5,114,0,0,106,818,5,115,
0,0,107,108,5,97,0,0,108,109,5,108,0,0,109,110,5,115,0,0,110,111,
5,111,0,0,111,112,5,95,0,0,112,113,5,115,0,0,113,114,5,99,0,0,114,
115,5,97,0,0,115,116,5,110,0,0,116,117,5,95,0,0,117,118,5,116,0,
0,118,119,5,111,0,0,119,120,5,111,0,0,120,121,5,108,0,0,121,818,
5,115,0,0,122,123,5,98,0,0,123,124,5,97,0,0,124,125,5,110,0,0,125,
126,5,110,0,0,126,127,5,101,0,0,127,818,5,114,0,0,128,129,5,98,0,
0,129,130,5,97,0,0,130,131,5,110,0,0,131,132,5,110,0,0,132,133,5,
101,0,0,133,134,5,114,0,0,134,135,5,95,0,0,135,136,5,115,0,0,136,
137,5,99,0,0,137,138,5,97,0,0,138,139,5,108,0,0,139,818,5,101,0,
0,140,141,5,98,0,0,141,142,5,105,0,0,142,143,5,103,0,0,143,144,5,
95,0,0,144,145,5,105,0,0,145,146,5,99,0,0,146,147,5,111,0,0,147,
148,5,110,0,0,148,149,5,95,0,0,149,150,5,115,0,0,150,151,5,105,0,
0,151,152,5,122,0,0,152,818,5,101,0,0,153,154,5,99,0,0,154,155,5,
115,0,0,155,156,5,114,0,0,156,157,5,95,0,0,157,158,5,118,0,0,158,
159,5,97,0,0,159,160,5,108,0,0,160,161,5,117,0,0,161,162,5,101,0,
0,162,818,5,115,0,0,163,164,5,100,0,0,164,165,5,101,0,0,165,166,
5,102,0,0,166,167,5,97,0,0,167,168,5,117,0,0,168,169,5,108,0,0,169,
170,5,116,0,0,170,171,5,95,0,0,171,172,5,115,0,0,172,173,5,101,0,
0,173,174,5,108,0,0,174,175,5,101,0,0,175,176,5,99,0,0,176,177,5,
116,0,0,177,178,5,105,0,0,178,179,5,111,0,0,179,818,5,110,0,0,180,
181,5,100,0,0,181,182,5,111,0,0,182,183,5,110,0,0,183,184,5,39,0,
0,184,185,5,116,0,0,185,186,5,95,0,0,186,187,5,115,0,0,187,188,5,
99,0,0,188,189,5,97,0,0,189,190,5,110,0,0,190,191,5,95,0,0,191,192,
5,100,0,0,192,193,5,105,0,0,193,194,5,114,0,0,194,818,5,115,0,0,
195,196,5,100,0,0,196,197,5,111,0,0,197,198,5,110,0,0,198,199,5,
39,0,0,199,200,5,116,0,0,200,201,5,95,0,0,201,202,5,115,0,0,202,
203,5,99,0,0,203,204,5,97,0,0,204,205,5,110,0,0,205,206,5,95,0,0,
206,207,5,102,0,0,207,208,5,105,0,0,208,209,5,108,0,0,209,210,5,
101,0,0,210,818,5,115,0,0,211,212,5,100,0,0,212,213,5,111,0,0,213,
214,5,110,0,0,214,215,5,39,0,0,215,216,5,116,0,0,216,217,5,95,0,
0,217,218,5,115,0,0,218,219,5,99,0,0,219,220,5,97,0,0,220,221,5,
110,0,0,221,222,5,95,0,0,222,223,5,102,0,0,223,224,5,105,0,0,224,
225,5,114,0,0,225,226,5,109,0,0,226,227,5,119,0,0,227,228,5,97,0,
0,228,229,5,114,0,0,229,818,5,101,0,0,230,231,5,100,0,0,231,232,
5,111,0,0,232,233,5,110,0,0,233,234,5,39,0,0,234,235,5,116,0,0,235,
236,5,95,0,0,236,237,5,115,0,0,237,238,5,99,0,0,238,239,5,97,0,0,
239,240,5,110,0,0,240,241,5,95,0,0,241,242,5,116,0,0,242,243,5,111,
0,0,243,244,5,111,0,0,244,245,5,108,0,0,245,818,5,115,0,0,246,247,
5,100,0,0,247,248,5,111,0,0,248,249,5,110,0,0,249,250,5,39,0,0,250,
251,5,116,0,0,251,252,5,95,0,0,252,253,5,115,0,0,253,254,5,99,0,
0,254,255,5,97,0,0,255,256,5,110,0,0,256,257,5,95,0,0,257,258,5,
118,0,0,258,259,5,111,0,0,259,260,5,108,0,0,260,261,5,117,0,0,261,
262,5,109,0,0,262,263,5,101,0,0,263,818,5,115,0,0,264,265,5,100,
0,0,265,266,5,111,0,0,266,267,5,110,0,0,267,268,5,116,0,0,268,269,
5,95,0,0,269,270,5,115,0,0,270,271,5,99,0,0,271,272,5,97,0,0,272,
273,5,110,0,0,273,274,5,95,0,0,274,275,5,100,0,0,275,276,5,105,0,
0,276,277,5,114,0,0,277,818,5,115,0,0,278,279,5,100,0,0,279,280,
5,111,0,0,280,281,5,110,0,0,281,282,5,116,0,0,282,283,5,95,0,0,283,
284,5,115,0,0,284,285,5,99,0,0,285,286,5,97,0,0,286,287,5,110,0,
0,287,288,5,95,0,0,288,289,5,102,0,0,289,290,5,105,0,0,290,291,5,
108,0,0,291,292,5,101,0,0,292,818,5,115,0,0,293,294,5,100,0,0,294,
295,5,111,0,0,295,296,5,110,0,0,296,297,5,116,0,0,297,298,5,95,0,
0,298,299,5,115,0,0,299,300,5,99,0,0,300,301,5,97,0,0,301,302,5,
110,0,0,302,303,5,95,0,0,303,304,5,102,0,0,304,305,5,105,0,0,305,
306,5,114,0,0,306,307,5,109,0,0,307,308,5,119,0,0,308,309,5,97,0,
0,309,310,5,114,0,0,310,818,5,101,0,0,311,312,5,100,0,0,312,313,
5,111,0,0,313,314,5,110,0,0,314,315,5,116,0,0,315,316,5,95,0,0,316,
317,5,115,0,0,317,318,5,99,0,0,318,319,5,97,0,0,319,320,5,110,0,
0,320,321,5,95,0,0,321,322,5,116,0,0,322,323,5,111,0,0,323,324,5,
111,0,0,324,325,5,108,0,0,325,818,5,115,0,0,326,327,5,100,0,0,327,
328,5,111,0,0,328,329,5,110,0,0,329,330,5,116,0,0,330,331,5,95,0,
0,331,332,5,115,0,0,332,333,5,99,0,0,333,334,5,97,0,0,334,335,5,
110,0,0,335,336,5,95,0,0,336,337,5,118,0,0,337,338,5,111,0,0,338,
339,5,108,0,0,339,340,5,117,0,0,340,341,5,109,0,0,341,342,5,101,
0,0,342,818,5,115,0,0,343,344,5,101,0,0,344,345,5,110,0,0,345,346,
5,97,0,0,346,347,5,98,0,0,347,348,5,108,0,0,348,349,5,101,0,0,349,
350,5,95,0,0,350,351,5,97,0,0,351,352,5,110,0,0,352,353,5,100,0,
0,353,354,5,95,0,0,354,355,5,108,0,0,355,356,5,111,0,0,356,357,5,
99,0,0,357,358,5,107,0,0,358,359,5,95,0,0,359,360,5,118,0,0,360,
361,5,109,0,0,361,818,5,120,0,0,362,363,5,101,0,0,363,364,5,110,
0,0,364,365,5,97,0,0,365,366,5,98,0,0,366,367,5,108,0,0,367,368,
5,101,0,0,368,369,5,95,0,0,369,370,5,109,0,0,370,371,5,111,0,0,371,
372,5,117,0,0,372,373,5,115,0,0,373,818,5,101,0,0,374,375,5,101,
0,0,375,376,5,110,0,0,376,377,5,97,0,0,377,378,5,98,0,0,378,379,
5,108,0,0,379,380,5,101,0,0,380,381,5,95,0,0,381,382,5,116,0,0,382,
383,5,111,0,0,383,384,5,117,0,0,384,385,5,99,0,0,385,818,5,104,0,
0,386,387,5,101,0,0,387,388,5,120,0,0,388,389,5,116,0,0,389,390,
5,114,0,0,390,391,5,97,0,0,391,392,5,95,0,0,392,393,5,107,0,0,393,
394,5,101,0,0,394,395,5,114,0,0,395,396,5,110,0,0,396,397,5,101,
0,0,397,398,5,108,0,0,398,399,5,95,0,0,399,400,5,118,0,0,400,401,
5,101,0,0,401,402,5,114,0,0,402,403,5,115,0,0,403,404,5,105,0,0,
404,405,5,111,0,0,405,406,5,110,0,0,406,407,5,95,0,0,407,408,5,115,
0,0,408,409,5,116,0,0,409,410,5,114,0,0,410,411,5,105,0,0,411,412,
5,110,0,0,412,413,5,103,0,0,413,818,5,115,0,0,414,415,5,102,0,0,
415,416,5,111,0,0,416,417,5,108,0,0,417,418,5,100,0,0,418,419,5,
95,0,0,419,420,5,108,0,0,420,421,5,105,0,0,421,422,5,110,0,0,422,
423,5,117,0,0,423,424,5,120,0,0,424,425,5,95,0,0,425,426,5,107,0,
0,426,427,5,101,0,0,427,428,5,114,0,0,428,429,5,110,0,0,429,430,
5,101,0,0,430,431,5,108,0,0,431,818,5,115,0,0,432,433,5,102,0,0,
433,434,5,111,0,0,434,435,5,108,0,0,435,436,5,108,0,0,436,437,5,
111,0,0,437,438,5,119,0,0,438,439,5,95,0,0,439,440,5,115,0,0,440,
441,5,121,0,0,441,442,5,109,0,0,442,443,5,108,0,0,443,444,5,105,
0,0,444,445,5,110,0,0,445,446,5,107,0,0,446,818,5,115,0,0,447,448,
5,102,0,0,448,449,5,111,0,0,449,450,5,110,0,0,450,818,5,116,0,0,
451,452,5,104,0,0,452,453,5,105,0,0,453,454,5,100,0,0,454,455,5,
101,0,0,455,456,5,117,0,0,456,818,5,105,0,0,457,458,5,105,0,0,458,
459,5,99,0,0,459,460,5,111,0,0,460,461,5,110,0,0,461,462,5,115,0,
0,462,463,5,95,0,0,463,464,5,100,0,0,464,465,5,105,0,0,465,818,5,
114,0,0,466,467,5,108,0,0,467,468,5,105,0,0,468,469,5,110,0,0,469,
470,5,117,0,0,470,471,5,120,0,0,471,472,5,95,0,0,472,473,5,112,0,
0,473,474,5,114,0,0,474,475,5,101,0,0,475,476,5,102,0,0,476,477,
5,105,0,0,477,478,5,120,0,0,478,479,5,101,0,0,479,818,5,115,0,0,
480,481,5,108,0,0,481,482,5,111,0,0,482,483,5,103,0,0,483,484,5,
95,0,0,484,485,5,108,0,0,485,486,5,101,0,0,486,487,5,118,0,0,487,
488,5,101,0,0,488,818,5,108,0,0,489,490,5,109,0,0,490,491,5,97,0,
0,491,492,5,120,0,0,492,493,5,95,0,0,493,494,5,116,0,0,494,495,5,
97,0,0,495,496,5,103,0,0,496,818,5,115,0,0,497,498,5,109,0,0,498,
499,5,111,0,0,499,500,5,117,0,0,500,501,5,115,0,0,501,502,5,101,
0,0,502,503,5,95,0,0,503,504,5,115,0,0,504,505,5,105,0,0,505,506,
5,122,0,0,506,818,5,101,0,0,507,508,5,109,0,0,508,509,5,111,0,0,
509,510,5,117,0,0,510,511,5,115,0,0,511,512,5,101,0,0,512,513,5,
95,0,0,513,514,5,115,0,0,514,515,5,112,0,0,515,516,5,101,0,0,516,
517,5,101,0,0,517,818,5,100,0,0,518,519,5,114,0,0,519,520,5,101,
0,0,520,521,5,115,0,0,521,522,5,111,0,0,522,523,5,108,0,0,523,524,
5,117,0,0,524,525,5,116,0,0,525,526,5,105,0,0,526,527,5,111,0,0,
527,818,5,110,0,0,528,529,5,115,0,0,529,530,5,99,0,0,530,531,5,97,
0,0,531,532,5,110,0,0,532,533,5,95,0,0,533,534,5,97,0,0,534,535,
5,108,0,0,535,536,5,108,0,0,536,537,5,95,0,0,537,538,5,108,0,0,538,
539,5,105,0,0,539,540,5,110,0,0,540,541,5,117,0,0,541,542,5,120,
0,0,542,543,5,95,0,0,543,544,5,107,0,0,544,545,5,101,0,0,545,546,
5,114,0,0,546,547,5,110,0,0,547,548,5,101,0,0,548,549,5,108,0,0,
549,818,5,115,0,0,550,551,5,115,0,0,551,552,5,99,0,0,552,553,5,97,
0,0,553,554,5,110,0,0,554,555,5,95,0,0,555,556,5,100,0,0,556,557,
5,101,0,0,557,558,5,108,0,0,558,559,5,97,0,0,559,818,5,121,0,0,560,
561,5,115,0,0,561,562,5,99,0,0,562,563,5,97,0,0,563,564,5,110,0,
0,564,565,5,95,0,0,565,566,5,100,0,0,566,567,5,114,0,0,567,568,5,
105,0,0,568,569,5,118,0,0,569,570,5,101,0,0,570,571,5,114,0,0,571,
572,5,95,0,0,572,573,5,100,0,0,573,574,5,105,0,0,574,575,5,114,0,
0,575,818,5,115,0,0,576,577,5,115,0,0,577,578,5,99,0,0,578,579,5,
97,0,0,579,580,5,110,0,0,580,581,5,102,0,0,581,582,5,111,0,0,582,
818,5,114,0,0,583,584,5,115,0,0,584,585,5,99,0,0,585,586,5,114,0,
0,586,587,5,101,0,0,587,588,5,101,0,0,588,589,5,110,0,0,589,590,
5,115,0,0,590,591,5,97,0,0,591,592,5,118,0,0,592,593,5,101,0,0,593,
818,5,114,0,0,594,595,5,115,0,0,595,596,5,101,0,0,596,597,5,108,
0,0,597,598,5,101,0,0,598,599,5,99,0,0,599,600,5,116,0,0,600,601,
5,105,0,0,601,602,5,111,0,0,602,603,5,110,0,0,603,604,5,95,0,0,604,
605,5,98,0,0,605,606,5,105,0,0,606,818,5,103,0,0,607,608,5,115,0,
0,608,609,5,101,0,0,609,610,5,108,0,0,610,611,5,101,0,0,611,612,
5,99,0,0,612,613,5,116,0,0,613,614,5,105,0,0,614,615,5,111,0,0,615,
616,5,110,0,0,616,617,5,95,0,0,617,618,5,115,0,0,618,619,5,109,0,
0,619,620,5,97,0,0,620,621,5,108,0,0,621,818,5,108,0,0,622,623,5,
115,0,0,623,624,5,104,0,0,624,625,5,111,0,0,625,626,5,119,0,0,626,
627,5,116,0,0,627,628,5,111,0,0,628,629,5,111,0,0,629,630,5,108,
0,0,630,818,5,115,0,0,631,632,5,115,0,0,632,633,5,104,0,0,633,634,
5,117,0,0,634,635,5,116,0,0,635,636,5,100,0,0,636,637,5,111,0,0,
637,638,5,119,0,0,638,639,5,110,0,0,639,640,5,95,0,0,640,641,5,97,
0,0,641,642,5,102,0,0,642,643,5,116,0,0,643,644,5,101,0,0,644,645,
5,114,0,0,645,646,5,95,0,0,646,647,5,116,0,0,647,648,5,105,0,0,648,
649,5,109,0,0,649,650,5,101,0,0,650,651,5,111,0,0,651,652,5,117,
0,0,652,818,5,116,0,0,653,654,5,115,0,0,654,655,5,109,0,0,655,656,
5,97,0,0,656,657,5,108,0,0,657,658,5,108,0,0,658,659,5,95,0,0,659,
660,5,105,0,0,660,661,5,99,0,0,661,662,5,111,0,0,662,663,5,110,0,
0,663,664,5,95,0,0,664,665,5,115,0,0,665,666,5,105,0,0,666,667,5,
122,0,0,667,818,5,101,0,0,668,669,5,115,0,0,669,670,5,112,0,0,670,
671,5,111,0,0,671,672,5,111,0,0,672,673,5,102,0,0,673,674,5,95,0,
0,674,675,5,111,0,0,675,676,5,115,0,0,676,677,5,120,0,0,677,678,
5,95,0,0,678,679,5,118,0,0,679,680,5,101,0,0,680,681,5,114,0,0,681,
682,5,115,0,0,682,683,5,105,0,0,683,684,5,111,0,0,684,818,5,110,
0,0,685,686,5,115,0,0,686,687,5,117,0,0,687,688,5,112,0,0,688,689,
5,112,0,0,689,690,5,111,0,0,690,691,5,114,0,0,691,692,5,116,0,0,
692,693,5,95,0,0,693,694,5,103,0,0,694,695,5,122,0,0,695,696,5,105,
0,0,696,697,5,112,0,0,697,698,5,112,0,0,698,699,5,101,0,0,699,700,
5,100,0,0,700,701,5,95,0,0,701,702,5,108,0,0,702,703,5,111,0,0,703,
704,5,97,0,0,704,705,5,100,0,0,705,706,5,101,0,0,706,707,5,114,0,
0,707,818,5,115,0,0,708,709,5,116,0,0,709,710,5,101,0,0,710,711,
5,120,0,0,711,712,5,116,0,0,712,713,5,109,0,0,713,714,5,111,0,0,
714,715,5,100,0,0,715,818,5,101,0,0,716,717,5,116,0,0,717,718,5,
101,0,0,718,719,5,120,0,0,719,720,5,116,0,0,720,721,5,111,0,0,721,
722,5,110,0,0,722,723,5,108,0,0,723,818,5,121,0,0,724,725,5,116,
0,0,725,726,5,105,0,0,726,727,5,109,0,0,727,728,5,101,0,0,728,729,
5,111,0,0,729,730,5,117,0,0,730,818,5,116,0,0,731,732,5,117,0,0,
732,733,5,101,0,0,733,734,5,102,0,0,734,735,5,105,0,0,735,736,5,
95,0,0,736,737,5,100,0,0,737,738,5,101,0,0,738,739,5,101,0,0,739,
740,5,112,0,0,740,741,5,95,0,0,741,742,5,108,0,0,742,743,5,101,0,
0,743,744,5,103,0,0,744,745,5,97,0,0,745,746,5,99,0,0,746,747,5,
121,0,0,747,748,5,95,0,0,748,749,5,115,0,0,749,750,5,99,0,0,750,
751,5,97,0,0,751,818,5,110,0,0,752,753,5,117,0,0,753,754,5,115,0,
0,754,755,5,101,0,0,755,756,5,95,0,0,756,757,5,103,0,0,757,758,5,
114,0,0,758,759,5,97,0,0,759,760,5,112,0,0,760,761,5,104,0,0,761,
762,5,105,0,0,762,763,5,99,0,0,763,764,5,115,0,0,764,765,5,95,0,
0,765,766,5,102,0,0,766,767,5,111,0,0,767,818,5,114,0,0,768,769,
5,117,0,0,769,770,5,115,0,0,770,771,5,101,0,0,771,772,5,95,0,0,772,
773,5,110,0,0,773,774,5,118,0,0,774,775,5,114,0,0,775,776,5,97,0,
0,776,818,5,109,0,0,777,778,5,119,0,0,778,779,5,105,0,0,779,780,
5,110,0,0,780,781,5,100,0,0,781,782,5,111,0,0,782,783,5,119,0,0,
783,784,5,115,0,0,784,785,5,95,0,0,785,786,5,114,0,0,786,787,5,101,
0,0,787,788,5,99,0,0,788,789,5,111,0,0,789,790,5,118,0,0,790,791,
5,101,0,0,791,792,5,114,0,0,792,793,5,121,0,0,793,794,5,95,0,0,794,
795,5,102,0,0,795,796,5,105,0,0,796,797,5,108,0,0,797,798,5,101,
0,0,798,818,5,115,0,0,799,800,5,119,0,0,800,801,5,114,0,0,801,802,
5,105,0,0,802,803,5,116,0,0,803,804,5,101,0,0,804,805,5,95,0,0,805,
806,5,115,0,0,806,807,5,121,0,0,807,808,5,115,0,0,808,809,5,116,
0,0,809,810,5,101,0,0,810,811,5,109,0,0,811,812,5,100,0,0,812,813,
5,95,0,0,813,814,5,118,0,0,814,815,5,97,0,0,815,816,5,114,0,0,816,
818,5,115,0,0,817,93,1,0,0,0,817,107,1,0,0,0,817,122,1,0,0,0,817,
128,1,0,0,0,817,140,1,0,0,0,817,153,1,0,0,0,817,163,1,0,0,0,817,
180,1,0,0,0,817,195,1,0,0,0,817,211,1,0,0,0,817,230,1,0,0,0,817,
246,1,0,0,0,817,264,1,0,0,0,817,278,1,0,0,0,817,293,1,0,0,0,817,
311,1,0,0,0,817,326,1,0,0,0,817,343,1,0,0,0,817,362,1,0,0,0,817,
374,1,0,0,0,817,386,1,0,0,0,817,414,1,0,0,0,817,432,1,0,0,0,817,
447,1,0,0,0,817,451,1,0,0,0,817,457,1,0,0,0,817,466,1,0,0,0,817,
480,1,0,0,0,817,489,1,0,0,0,817,497,1,0,0,0,817,507,1,0,0,0,817,
518,1,0,0,0,817,528,1,0,0,0,817,550,1,0,0,0,817,560,1,0,0,0,817,
576,1,0,0,0,817,583,1,0,0,0,817,594,1,0,0,0,817,607,1,0,0,0,817,
622,1,0,0,0,817,631,1,0,0,0,817,653,1,0,0,0,817,668,1,0,0,0,817,
685,1,0,0,0,817,708,1,0,0,0,817,716,1,0,0,0,817,724,1,0,0,0,817,
731,1,0,0,0,817,752,1,0,0,0,817,768,1,0,0,0,817,777,1,0,0,0,817,
799,1,0,0,0,818,822,1,0,0,0,819,821,8,1,0,0,820,819,1,0,0,0,821,
824,1,0,0,0,822,820,1,0,0,0,822,823,1,0,0,0,823,826,1,0,0,0,824,
822,1,0,0,0,825,827,3,4,1,0,826,825,1,0,0,0,826,827,1,0,0,0,827,
828,1,0,0,0,828,829,6,4,0,0,829,11,1,0,0,0,830,833,3,14,6,0,831,
833,3,16,7,0,832,830,1,0,0,0,832,831,1,0,0,0,833,13,1,0,0,0,834,
835,5,109,0,0,835,836,5,101,0,0,836,837,5,110,0,0,837,838,5,117,
0,0,838,839,5,101,0,0,839,840,5,110,0,0,840,841,5,116,0,0,841,842,
5,114,0,0,842,843,5,121,0,0,843,15,1,0,0,0,844,845,5,115,0,0,845,
846,5,117,0,0,846,847,5,98,0,0,847,848,5,109,0,0,848,849,5,101,0,
0,849,850,5,110,0,0,850,851,5,117,0,0,851,852,5,101,0,0,852,853,
5,110,0,0,853,854,5,116,0,0,854,855,5,114,0,0,855,856,5,121,0,0,
856,17,1,0,0,0,857,858,5,118,0,0,858,859,5,111,0,0,859,860,5,108,
0,0,860,861,5,117,0,0,861,862,5,109,0,0,862,863,5,101,0,0,863,19,
1,0,0,0,864,865,5,108,0,0,865,866,5,111,0,0,866,867,5,97,0,0,867,
868,5,100,0,0,868,869,5,101,0,0,869,870,5,114,0,0,870,21,1,0,0,0,
871,872,5,105,0,0,872,873,5,110,0,0,873,874,5,105,0,0,874,875,5,
116,0,0,875,876,5,114,0,0,876,877,5,100,0,0,877,23,1,0,0,0,878,879,
5,105,0,0,879,880,5,99,0,0,880,881,5,111,0,0,881,882,5,110,0,0,882,
25,1,0,0,0,883,884,5,111,0,0,884,885,5,115,0,0,885,886,5,116,0,0,
886,887,5,121,0,0,887,888,5,112,0,0,888,889,5,101,0,0,889,890,1,
0,0,0,890,891,3,2,0,0,891,892,1,0,0,0,892,893,6,12,1,0,893,27,1,
0,0,0,894,895,5,103,0,0,895,896,5,114,0,0,896,897,5,97,0,0,897,898,
5,112,0,0,898,899,5,104,0,0,899,900,5,105,0,0,900,901,5,99,0,0,901,
902,5,115,0,0,902,903,1,0,0,0,903,904,3,2,0,0,904,905,1,0,0,0,905,
906,6,13,1,0,906,29,1,0,0,0,907,908,5,111,0,0,908,909,5,112,0,0,
909,910,5,116,0,0,910,911,5,105,0,0,911,912,5,111,0,0,912,913,5,
110,0,0,913,914,5,115,0,0,914,31,1,0,0,0,915,916,5,97,0,0,916,917,
5,100,0,0,917,918,5,100,0,0,918,919,5,95,0,0,919,920,5,111,0,0,920,
921,5,112,0,0,921,922,5,116,0,0,922,923,5,105,0,0,923,924,5,111,
0,0,924,925,5,110,0,0,925,926,5,115,0,0,926,33,1,0,0,0,927,928,5,
102,0,0,928,929,5,105,0,0,929,930,5,114,0,0,930,931,5,109,0,0,931,
932,5,119,0,0,932,933,5,97,0,0,933,934,5,114,0,0,934,935,5,101,0,
0,935,936,5,95,0,0,936,937,5,98,0,0,937,938,5,111,0,0,938,939,5,
111,0,0,939,940,5,116,0,0,940,941,5,110,0,0,941,942,5,117,0,0,942,
943,5,109,0,0,943,35,1,0,0,0,944,945,5,100,0,0,945,946,5,105,0,0,
946,947,5,115,0,0,947,948,5,97,0,0,948,949,5,98,0,0,949,950,5,108,
0,0,950,951,5,101,0,0,951,952,5,100,0,0,952,37,1,0,0,0,953,954,5,
105,0,0,954,955,5,110,0,0,955,956,5,99,0,0,956,957,5,108,0,0,957,
958,5,117,0,0,958,959,5,100,0,0,959,960,5,101,0,0,960,39,1,0,0,0,
961,962,5,123,0,0,962,41,1,0,0,0,963,964,5,125,0,0,964,43,1,0,0,
0,965,967,3,46,22,0,966,965,1,0,0,0,967,968,1,0,0,0,968,966,1,0,
0,0,968,969,1,0,0,0,969,45,1,0,0,0,970,971,7,2,0,0,971,47,1,0,0,
0,972,976,3,50,24,0,973,976,3,52,25,0,974,976,3,54,26,0,975,972,
1,0,0,0,975,973,1,0,0,0,975,974,1,0,0,0,976,49,1,0,0,0,977,979,5,
39,0,0,978,980,8,1,0,0,979,978,1,0,0,0,980,981,1,0,0,0,981,979,1,
0,0,0,981,982,1,0,0,0,982,983,1,0,0,0,983,984,5,39,0,0,984,51,1,
0,0,0,985,987,5,34,0,0,986,988,8,1,0,0,987,986,1,0,0,0,988,989,1,
0,0,0,989,987,1,0,0,0,989,990,1,0,0,0,990,991,1,0,0,0,991,992,5,
34,0,0,992,53,1,0,0,0,993,995,8,3,0,0,994,993,1,0,0,0,995,996,1,
0,0,0,996,994,1,0,0,0,996,997,1,0,0,0,997,55,1,0,0,0,998,999,5,77,
0,0,999,1000,5,97,0,0,1000,1001,5,99,0,0,1001,1002,5,79,0,0,1002,
1024,5,83,0,0,1003,1004,5,76,0,0,1004,1005,5,105,0,0,1005,1006,5,
110,0,0,1006,1007,5,117,0,0,1007,1024,5,120,0,0,1008,1009,5,69,0,
0,1009,1010,5,76,0,0,1010,1011,5,73,0,0,1011,1012,5,76,0,0,1012,
1024,5,79,0,0,1013,1014,5,87,0,0,1014,1015,5,105,0,0,1015,1016,5,
110,0,0,1016,1017,5,100,0,0,1017,1018,5,111,0,0,1018,1019,5,119,
0,0,1019,1024,5,115,0,0,1020,1021,5,88,0,0,1021,1022,5,79,0,0,1022,
1024,5,77,0,0,1023,998,1,0,0,0,1023,1003,1,0,0,0,1023,1008,1,0,0,
0,1023,1013,1,0,0,0,1023,1020,1,0,0,0,1024,1025,1,0,0,0,1025,1026,
6,27,2,0,1026,57,1,0,0,0,1027,1028,5,111,0,0,1028,1033,5,110,0,0,
1029,1030,5,111,0,0,1030,1031,5,102,0,0,1031,1033,5,102,0,0,1032,
1027,1,0,0,0,1032,1029,1,0,0,0,1033,1034,1,0,0,0,1034,1035,6,28,
2,0,1035,59,1,0,0,0,18,0,1,63,68,75,85,89,817,822,826,832,968,975,
981,989,996,1023,1032,3,6,0,0,5,1,0,4,0,0
]
class RefindConfigLexer(Lexer):
atn = ATNDeserializer().deserialize(serializedATN())
decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]
STRICT_PARAMETER_MODE = 1
WHITESPACE = 1
NEWLINE = 2
EMPTY = 3
COMMENT = 4
IGNORED_OPTION = 5
MENU_ENTRY = 6
VOLUME = 7
LOADER = 8
INITRD = 9
ICON = 10
OS_TYPE = 11
GRAPHICS = 12
BOOT_OPTIONS = 13
ADD_BOOT_OPTIONS = 14
FIRMWARE_BOOTNUM = 15
DISABLED = 16
INCLUDE = 17
OPEN_BRACE = 18
CLOSE_BRACE = 19
HEX_INTEGER = 20
STRING = 21
OS_TYPE_PARAMETER = 22
GRAPHICS_PARAMETER = 23
channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ]
modeNames = [ "DEFAULT_MODE", "STRICT_PARAMETER_MODE" ]
literalNames = [ "<INVALID>",
"'volume'", "'loader'", "'initrd'", "'icon'", "'options'", "'add_options'",
"'firmware_bootnum'", "'disabled'", "'include'", "'{'", "'}'" ]
symbolicNames = [ "<INVALID>",
"WHITESPACE", "NEWLINE", "EMPTY", "COMMENT", "IGNORED_OPTION",
"MENU_ENTRY", "VOLUME", "LOADER", "INITRD", "ICON", "OS_TYPE",
"GRAPHICS", "BOOT_OPTIONS", "ADD_BOOT_OPTIONS", "FIRMWARE_BOOTNUM",
"DISABLED", "INCLUDE", "OPEN_BRACE", "CLOSE_BRACE", "HEX_INTEGER",
"STRING", "OS_TYPE_PARAMETER", "GRAPHICS_PARAMETER" ]
ruleNames = [ "WHITESPACE", "NEWLINE", "EMPTY", "COMMENT", "IGNORED_OPTION",
"MENU_ENTRY", "MAIN_MENU_ENTRY", "SUB_MENU_ENTRY", "VOLUME",
"LOADER", "INITRD", "ICON", "OS_TYPE", "GRAPHICS", "BOOT_OPTIONS",
"ADD_BOOT_OPTIONS", "FIRMWARE_BOOTNUM", "DISABLED", "INCLUDE",
"OPEN_BRACE", "CLOSE_BRACE", "HEX_INTEGER", "HEX_DIGIT",
"STRING", "SINGLE_QUOTED_STRING", "DOUBLE_QUOTED_STRING",
"UNQUOTED_STRING", "OS_TYPE_PARAMETER", "GRAPHICS_PARAMETER" ]
grammarFileName = "RefindConfigLexer.g4"
def __init__(self, input=None, output:TextIO = sys.stdout):
super().__init__(input, output)
self.checkVersion("4.13.1")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None
self._predicates = None
================================================
FILE: src/refind_btrfs/boot/antlr4/RefindConfigLexer.tokens
================================================
WHITESPACE=1
NEWLINE=2
EMPTY=3
COMMENT=4
IGNORED_OPTION=5
MENU_ENTRY=6
VOLUME=7
LOADER=8
INITRD=9
ICON=10
OS_TYPE=11
GRAPHICS=12
BOOT_OPTIONS=13
ADD_BOOT_OPTIONS=14
FIRMWARE_BOOTNUM=15
DISABLED=16
INCLUDE=17
OPEN_BRACE=18
CLOSE_BRACE=19
HEX_INTEGER=20
STRING=21
OS_TYPE_PARAMETER=22
GRAPHICS_PARAMETER=23
'volume'=7
'loader'=8
'initrd'=9
'icon'=10
'options'=13
'add_options'=14
'firmware_bootnum'=15
'disabled'=16
'include'=17
'{'=18
'}'=19
================================================
FILE: src/refind_btrfs/boot/antlr4/RefindConfigParser.g4
================================================
/*
SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>
SPDX-License-Identifier: GPL-3.0-or-later
refind-btrfs - Generate rEFInd manual boot stanzas from Btrfs snapshots
Copyright (C) 2020-2024 Luka Žaja
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
parser grammar RefindConfigParser;
options { tokenVocab=RefindConfigLexer; }
refind : config_option* EOF ;
config_option
: boot_stanza
| include
;
// "menuentry" section
boot_stanza : menu_entry OPEN_BRACE main_option+ CLOSE_BRACE ;
menu_entry : MENU_ENTRY STRING ;
main_option
: volume
| loader
| main_initrd
| icon
| os_type
| graphics
| main_boot_options
| firmware_bootnum
| disabled
| sub_menu
;
volume : VOLUME STRING ;
loader : LOADER STRING ;
main_initrd : INITRD STRING ;
icon : ICON STRING ;
os_type : OS_TYPE OS_TYPE_PARAMETER ;
graphics : GRAPHICS GRAPHICS_PARAMETER ;
main_boot_options : BOOT_OPTIONS STRING ;
firmware_bootnum: FIRMWARE_BOOTNUM HEX_INTEGER ;
disabled : DISABLED;
// "submenuentry" section
sub_menu : menu_entry OPEN_BRACE sub_option+ CLOSE_BRACE ;
sub_option
: loader
| sub_initrd
| graphics
| sub_boot_options
| add_boot_options
| disabled
;
sub_initrd : INITRD STRING? ;
sub_boot_options : BOOT_OPTIONS STRING? ;
add_boot_options : ADD_BOOT_OPTIONS STRING ;
// "include" section
include : INCLUDE STRING ;
================================================
FILE: src/refind_btrfs/boot/antlr4/RefindConfigParser.interp
================================================
token literal names:
null
null
null
null
null
null
null
'volume'
'loader'
'initrd'
'icon'
null
null
'options'
'add_options'
'firmware_bootnum'
'disabled'
'include'
'{'
'}'
null
null
null
null
token symbolic names:
null
WHITESPACE
NEWLINE
EMPTY
COMMENT
IGNORED_OPTION
MENU_ENTRY
VOLUME
LOADER
INITRD
ICON
OS_TYPE
GRAPHICS
BOOT_OPTIONS
ADD_BOOT_OPTIONS
FIRMWARE_BOOTNUM
DISABLED
INCLUDE
OPEN_BRACE
CLOSE_BRACE
HEX_INTEGER
STRING
OS_TYPE_PARAMETER
GRAPHICS_PARAMETER
rule names:
refind
config_option
boot_stanza
menu_entry
main_option
volume
loader
main_initrd
icon
os_type
graphics
main_boot_options
firmware_bootnum
disabled
sub_menu
sub_option
sub_initrd
sub_boot_options
add_boot_options
include
atn:
[4, 1, 23, 134, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 1, 0, 5, 0, 42, 8, 0, 10, 0, 12, 0, 45, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 51, 8, 1, 1, 2, 1, 2, 1, 2, 4, 2, 56, 8, 2, 11, 2, 12, 2, 57, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 75, 8, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 4, 14, 106, 8, 14, 11, 14, 12, 14, 107, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 118, 8, 15, 1, 16, 1, 16, 3, 16, 122, 8, 16, 1, 17, 1, 17, 3, 17, 126, 8, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 0, 0, 20, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 0, 0, 133, 0, 43, 1, 0, 0, 0, 2, 50, 1, 0, 0, 0, 4, 52, 1, 0, 0, 0, 6, 61, 1, 0, 0, 0, 8, 74, 1, 0, 0, 0, 10, 76, 1, 0, 0, 0, 12, 79, 1, 0, 0, 0, 14, 82, 1, 0, 0, 0, 16, 85, 1, 0, 0, 0, 18, 88, 1, 0, 0, 0, 20, 91, 1, 0, 0, 0, 22, 94, 1, 0, 0, 0, 24, 97, 1, 0, 0, 0, 26, 100, 1, 0, 0, 0, 28, 102, 1, 0, 0, 0, 30, 117, 1, 0, 0, 0, 32, 119, 1, 0, 0, 0, 34, 123, 1, 0, 0, 0, 36, 127, 1, 0, 0, 0, 38, 130, 1, 0, 0, 0, 40, 42, 3, 2, 1, 0, 41, 40, 1, 0, 0, 0, 42, 45, 1, 0, 0, 0, 43, 41, 1, 0, 0, 0, 43, 44, 1, 0, 0, 0, 44, 46, 1, 0, 0, 0, 45, 43, 1, 0, 0, 0, 46, 47, 5, 0, 0, 1, 47, 1, 1, 0, 0, 0, 48, 51, 3, 4, 2, 0, 49, 51, 3, 38, 19, 0, 50, 48, 1, 0, 0, 0, 50, 49, 1, 0, 0, 0, 51, 3, 1, 0, 0, 0, 52, 53, 3, 6, 3, 0, 53, 55, 5, 18, 0, 0, 54, 56, 3, 8, 4, 0, 55, 54, 1, 0, 0, 0, 56, 57, 1, 0, 0, 0, 57, 55, 1, 0, 0, 0, 57, 58, 1, 0, 0, 0, 58, 59, 1, 0, 0, 0, 59, 60, 5, 19, 0, 0, 60, 5, 1, 0, 0, 0, 61, 62, 5, 6, 0, 0, 62, 63, 5, 21, 0, 0, 63, 7, 1, 0, 0, 0, 64, 75, 3, 10, 5, 0, 65, 75, 3, 12, 6, 0, 66, 75, 3, 14, 7, 0, 67, 75, 3, 16, 8, 0, 68, 75, 3, 18, 9, 0, 69, 75, 3, 20, 10, 0, 70, 75, 3, 22, 11, 0, 71, 75, 3, 24, 12, 0, 72, 75, 3, 26, 13, 0, 73, 75, 3, 28, 14, 0, 74, 64, 1, 0, 0, 0, 74, 65, 1, 0, 0, 0, 74, 66, 1, 0, 0, 0, 74, 67, 1, 0, 0, 0, 74, 68, 1, 0, 0, 0, 74, 69, 1, 0, 0, 0, 74, 70, 1, 0, 0, 0, 74, 71, 1, 0, 0, 0, 74, 72, 1, 0, 0, 0, 74, 73, 1, 0, 0, 0, 75, 9, 1, 0, 0, 0, 76, 77, 5, 7, 0, 0, 77, 78, 5, 21, 0, 0, 78, 11, 1, 0, 0, 0, 79, 80, 5, 8, 0, 0, 80, 81, 5, 21, 0, 0, 81, 13, 1, 0, 0, 0, 82, 83, 5, 9, 0, 0, 83, 84, 5, 21, 0, 0, 84, 15, 1, 0, 0, 0, 85, 86, 5, 10, 0, 0, 86, 87, 5, 21, 0, 0, 87, 17, 1, 0, 0, 0, 88, 89, 5, 11, 0, 0, 89, 90, 5, 22, 0, 0, 90, 19, 1, 0, 0, 0, 91, 92, 5, 12, 0, 0, 92, 93, 5, 23, 0, 0, 93, 21, 1, 0, 0, 0, 94, 95, 5, 13, 0, 0, 95, 96, 5, 21, 0, 0, 96, 23, 1, 0, 0, 0, 97, 98, 5, 15, 0, 0, 98, 99, 5, 20, 0, 0, 99, 25, 1, 0, 0, 0, 100, 101, 5, 16, 0, 0, 101, 27, 1, 0, 0, 0, 102, 103, 3, 6, 3, 0, 103, 105, 5, 18, 0, 0, 104, 106, 3, 30, 15, 0, 105, 104, 1, 0, 0, 0, 106, 107, 1, 0, 0, 0, 107, 105, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 110, 5, 19, 0, 0, 110, 29, 1, 0, 0, 0, 111, 118, 3, 12, 6, 0, 112, 118, 3, 32, 16, 0, 113, 118, 3, 20, 10, 0, 114, 118, 3, 34, 17, 0, 115, 118, 3, 36, 18, 0, 116, 118, 3, 26, 13, 0, 117, 111, 1, 0, 0, 0, 117, 112, 1, 0, 0, 0, 117, 113, 1, 0, 0, 0, 117, 114, 1, 0, 0, 0, 117, 115, 1, 0, 0, 0, 117, 116, 1, 0, 0, 0, 118, 31, 1, 0, 0, 0, 119, 121, 5, 9, 0, 0, 120, 122, 5, 21, 0, 0, 121, 120, 1, 0, 0, 0, 121, 122, 1, 0, 0, 0, 122, 33, 1, 0, 0, 0, 123, 125, 5, 13, 0, 0, 124, 126, 5, 21, 0, 0, 125, 124, 1, 0, 0, 0, 125, 126, 1, 0, 0, 0, 126, 35, 1, 0, 0, 0, 127, 128, 5, 14, 0, 0, 128, 129, 5, 21, 0, 0, 129, 37, 1, 0, 0, 0, 130, 131, 5, 17, 0, 0, 131, 132, 5, 21, 0, 0, 132, 39, 1, 0, 0, 0, 8, 43, 50, 57, 74, 107, 117, 121, 125]
================================================
FILE: src/refind_btrfs/boot/antlr4/RefindConfigParser.py
================================================
# Generated from c:/Users/Luka/Projects/Python/refind-btrfs/src/refind_btrfs/boot/antlr4/RefindConfigParser.g4 by ANTLR 4.13.1
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
from typing import TextIO
else:
from typing.io import TextIO
def serializedATN():
return [
4,1,23,134,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,
6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,
2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,1,0,
5,0,42,8,0,10,0,12,0,45,9,0,1,0,1,0,1,1,1,1,3,1,51,8,1,1,2,1,2,1,
2,4,2,56,8,2,11,2,12,2,57,1,2,1,2,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,
4,1,4,1,4,1,4,1,4,1,4,3,4,75,8,4,1,5,1,5,1,5,1,6,1,6,1,6,1,7,1,7,
1,7,1,8,1,8,1,8,1,9,1,9,1,9,1,10,1,10,1,10,1,11,1,11,1,11,1,12,1,
12,1,12,1,13,1,13,1,14,1,14,1,14,4,14,106,8,14,11,14,12,14,107,1,
14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,3,15,118,8,15,1,16,1,16,3,
16,122,8,16,1,17,1,17,3,17,126,8,17,1,18,1,18,1,18,1,19,1,19,1,19,
1,19,0,0,20,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,
38,0,0,133,0,43,1,0,0,0,2,50,1,0,0,0,4,52,1,0,0,0,6,61,1,0,0,0,8,
74,1,0,0,0,10,76,1,0,0,0,12,79,1,0,0,0,14,82,1,0,0,0,16,85,1,0,0,
0,18,88,1,0,0,0,20,91,1,0,0,0,22,94,1,0,0,0,24,97,1,0,0,0,26,100,
1,0,0,0,28,102,1,0,0,0,30,117,1,0,0,0,32,119,1,0,0,0,34,123,1,0,
0,0,36,127,1,0,0,0,38,130,1,0,0,0,40,42,3,2,1,0,41,40,1,0,0,0,42,
45,1,0,0,0,43,41,1,0,0,0,43,44,1,0,0,0,44,46,1,0,0,0,45,43,1,0,0,
0,46,47,5,0,0,1,47,1,1,0,0,0,48,51,3,4,2,0,49,51,3,38,19,0,50,48,
1,0,0,0,50,49,1,0,0,0,51,3,1,0,0,0,52,53,3,6,3,0,53,55,5,18,0,0,
54,56,3,8,4,0,55,54,1,0,0,0,56,57,1,0,0,0,57,55,1,0,0,0,57,58,1,
0,0,0,58,59,1,0,0,0,59,60,5,19,0,0,60,5,1,0,0,0,61,62,5,6,0,0,62,
63,5,21,0,0,63,7,1,0,0,0,64,75,3,10,5,0,65,75,3,12,6,0,66,75,3,14,
7,0,67,75,3,16,8,0,68,75,3,18,9,0,69,75,3,20,10,0,70,75,3,22,11,
0,71,75,3,24,12,0,72,75,3,26,13,0,73,75,3,28,14,0,74,64,1,0,0,0,
74,65,1,0,0,0,74,66,1,0,0,0,74,67,1,0,0,0,74,68,1,0,0,0,74,69,1,
0,0,0,74,70,1,0,0,0,74,71,1,0,0,0,74,72,1,0,0,0,74,73,1,0,0,0,75,
9,1,0,0,0,76,77,5,7,0,0,77,78,5,21,0,0,78,11,1,0,0,0,79,80,5,8,0,
0,80,81,5,21,0,0,81,13,1,0,0,0,82,83,5,9,0,0,83,84,5,21,0,0,84,15,
1,0,0,0,85,86,5,10,0,0,86,87,5,21,0,0,87,17,1,0,0,0,88,89,5,11,0,
0,89,90,5,22,0,0,90,19,1,0,0,0,91,92,5,12,0,0,92,93,5,23,0,0,93,
21,1,0,0,0,94,95,5,13,0,0,95,96,5,21,0,0,96,23,1,0,0,0,97,98,5,15,
0,0,98,99,5,20,0,0,99,25,1,0,0,0,100,101,5,16,0,0,101,27,1,0,0,0,
102,103,3,6,3,0,103,105,5,18,0,0,104,106,3,30,15,0,105,104,1,0,0,
0,106,107,1,0,0,0,107,105,1,0,0,0,107,108,1,0,0,0,108,109,1,0,0,
0,109,110,5,19,0,0,110,29,1,0,0,0,111,118,3,12,6,0,112,118,3,32,
16,0,113,118,3,20,10,0,114,118,3,34,17,0,115,118,3,36,18,0,116,118,
3,26,13,0,117,111,1,0,0,0,117,112,1,0,0,0,117,113,1,0,0,0,117,114,
1,0,0,0,117,115,1,0,0,0,117,116,1,0,0,0,118,31,1,0,0,0,119,121,5,
9,0,0,120,122,5,21,0,0,121,120,1,0,0,0,121,122,1,0,0,0,122,33,1,
0,0,0,123,125,5,13,0,0,124,126,5,21,0,0,125,124,1,0,0,0,125,126,
1,0,0,0,126,35,1,0,0,0,127,128,5,14,0,0,128,129,5,21,0,0,129,37,
1,0,0,0,130,131,5,17,0,0,131,132,5,21,0,0,132,39,1,0,0,0,8,43,50,
57,74,107,117,121,125
]
class RefindConfigParser ( Parser ):
grammarFileName = "RefindConfigParser.g4"
atn = ATNDeserializer().deserialize(serializedATN())
decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]
sharedContextCache = PredictionContextCache()
literalNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
"<INVALID>", "<INVALID>", "<INVALID>", "'volume'",
"'loader'", "'initrd'", "'icon'", "<INVALID>", "<INVALID>",
"'options'", "'add_options'", "'firmware_bootnum'",
"'disabled'", "'include'", "'{'", "'}'" ]
symbolicNames = [ "<INVALID>", "WHITESPACE", "NEWLINE", "EMPTY", "COMMENT",
"IGNORED_OPTION", "MENU_ENTRY", "VOLUME", "LOADER",
"INITRD", "ICON", "OS_TYPE", "GRAPHICS", "BOOT_OPTIONS",
"ADD_BOOT_OPTIONS", "FIRMWARE_BOOTNUM", "DISABLED",
"INCLUDE", "OPEN_BRACE", "CLOSE_BRACE", "HEX_INTEGER",
"STRING", "OS_TYPE_PARAMETER", "GRAPHICS_PARAMETER" ]
RULE_refind = 0
RULE_config_option = 1
RULE_boot_stanza = 2
RULE_menu_entry = 3
RULE_main_option = 4
RULE_volume = 5
RULE_loader = 6
RULE_main_initrd = 7
RULE_icon = 8
RULE_os_type = 9
RULE_graphics = 10
RULE_main_boot_options = 11
RULE_firmware_bootnum = 12
RULE_disabled = 13
RULE_sub_menu = 14
RULE_sub_option = 15
RULE_sub_initrd = 16
RULE_sub_boot_options = 17
RULE_add_boot_options = 18
RULE_include = 19
ruleNames = [ "refind", "config_option", "boot_stanza", "menu_entry",
"main_option", "volume", "loader", "main_initrd", "icon",
"os_type", "graphics", "main_boot_options", "firmware_bootnum",
"disabled", "sub_menu", "sub_option", "sub_initrd", "sub_boot_options",
"add_boot_options", "include" ]
EOF = Token.EOF
WHITESPACE=1
NEWLINE=2
EMPTY=3
COMMENT=4
IGNORED_OPTION=5
MENU_ENTRY=6
VOLUME=7
LOADER=8
INITRD=9
ICON=10
OS_TYPE=11
GRAPHICS=12
BOOT_OPTIONS=13
ADD_BOOT_OPTIONS=14
FIRMWARE_BOOTNUM=15
DISABLED=16
INCLUDE=17
OPEN_BRACE=18
CLOSE_BRACE=19
HEX_INTEGER=20
STRING=21
OS_TYPE_PARAMETER=22
GRAPHICS_PARAMETER=23
def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
super().__init__(input, output)
self.checkVersion("4.13.1")
self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
self._predicates = None
class RefindContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
self.parser = parser
def EOF(self):
return self.getToken(RefindConfigParser.EOF, 0)
def config_option(self, i:int=None):
if i is None:
return self.getTypedRuleContexts(RefindConfigParser.Config_optionContext)
else:
return self.getTypedRuleContext(RefindConfigParser.Config_optionContext,i)
def getRuleIndex(self):
return RefindConfigParser.RULE_refind
def accept(self, visitor:ParseTreeVisitor):
if hasattr( visitor, "visitRefind" ):
return visitor.visitRefind(self)
else:
return visitor.visitChildren(self)
def refind(self):
localctx = RefindConfigParser.RefindContext(self, self._ctx, self.state)
self.enterRule(localctx, 0, self.RULE_refind)
self._la = 0 # Token type
try:
self.enterOuterAlt(localctx, 1)
self.state = 43
self._errHandler.sync(self)
_la = self._input.LA(1)
while _la==6 or _la==17:
self.state = 40
self.config_option()
self.state = 45
self._errHandler.sync(self)
_la = self._input.LA(1)
self.state = 46
self.match(RefindConfigParser.EOF)
except RecognitionException as re:
localctx.exception = re
self._errHandler.reportError(self, re)
self._errHandler.recover(self, re)
finally:
self.exitRule()
return localctx
class Config_optionContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
self.parser = parser
def boot_stanza(self):
return self.getTypedRuleContext(RefindConfigParser.Boot_stanzaContext,0)
def include(self):
return self.getTypedRuleContext(RefindConfigParser.IncludeContext,0)
def getRuleIndex(self):
return RefindConfigParser.RULE_config_option
def accept(self, visitor:ParseTreeVisitor):
if hasattr( visitor, "visitConfig_option" ):
return visitor.visitConfig_option(self)
else:
return visitor.visitChildren(self)
def config_option(self):
localctx = RefindConfigParser.Config_optionContext(self, self._ctx, self.state)
self.enterRule(localctx, 2, self.RULE_config_option)
try:
self.state = 50
self._errHandler.sync(self)
token = self._input.LA(1)
if token in [6]:
self.enterOuterAlt(localctx, 1)
self.state = 48
self.boot_stanza()
pass
elif token in [17]:
self.enterOuterAlt(localctx, 2)
self.state = 49
self.include()
pass
else:
raise NoViableAltException(self)
except RecognitionException as re:
localctx.exception = re
self._errHandler.reportError(self, re)
self._errHandler.recover(self, re)
finally:
self.exitRule()
return localctx
class Boot_stanzaContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
self.parser = parser
def menu_entry(self):
return self.getTypedRuleContext(RefindConfigParser.Menu_entryContext,0)
def OPEN_BRACE(self):
return self.getToken(RefindConfigParser.OPEN_BRACE, 0)
def CLOSE_BRACE(self):
return self.getToken(RefindConfigParser.CLOSE_BRACE, 0)
def main_option(self, i:int=None):
if i is None:
return self.getTypedRuleContexts(RefindConfigParser.Main_optionContext)
else:
return self.getTypedRuleContext(RefindConfigParser.Main_optionContext,i)
def getRuleIndex(self):
return RefindConfigParser.RULE_boot_stanza
def accept(self, visitor:ParseTreeVisitor):
if hasattr( visitor, "visitBoot_stanza" ):
return visitor.visitBoot_stanza(self)
else:
return visitor.visitChildren(self)
def boot_stanza(self):
localctx = RefindConfigParser.Boot_stanzaContext(self, self._ctx, self.state)
self.enterRule(localctx, 4, self.RULE_boot_stanza)
self._la = 0 # Token type
try:
self.enterOuterAlt(localctx, 1)
self.state = 52
self.menu_entry()
self.state = 53
self.match(RefindConfigParser.OPEN_BRACE)
self.state = 55
self._errHandler.sync(self)
_la = self._input.LA(1)
while True:
self.state = 54
self.main_option()
self.state = 57
self._errHandler.sync(self)
_la = self._input.LA(1)
if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & 114624) != 0)):
break
self.state = 59
self.match(RefindConfigParser.CLOSE_BRACE)
except RecognitionException as re:
localctx.exception = re
self._errHandler.reportError(self, re)
self._errHandler.recover(self, re)
finally:
self.exitRule()
return localctx
class Menu_entryContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
self.parser = parser
def MENU_ENTRY(self):
return self.getToken(RefindConfigParser.MENU_ENTRY, 0)
def STRING(self):
return self.getToken(RefindConfigParser.STRING, 0)
def getRuleIndex(self):
return RefindConfigParser.RULE_menu_entry
def accept(self, visitor:ParseTreeVisitor):
if hasattr( visitor, "visitMenu_entry" ):
return visitor.visitMenu_entry(self)
else:
return visitor.visitChildren(self)
def menu_entry(self):
localctx = RefindConfigParser.Menu_entryContext(self, self._ctx, self.state)
self.enterRule(localctx, 6, self.RULE_menu_entry)
try:
self.enterOuterAlt(localctx, 1)
self.state = 61
self.match(RefindConfigParser.MENU_ENTRY)
self.state = 62
self.match(RefindConfigParser.STRING)
except RecognitionException as re:
localctx.exception = re
self._errHandler.reportError(self, re)
self._errHandler.recover(self, re)
finally:
self.exitRule()
return localctx
class Main_optionContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
self.parser = parser
def volume(self):
return self.getTypedRuleContext(RefindConfigParser.VolumeContext,0)
def loader(self):
return self.getTypedRuleContext(RefindConfigParser.LoaderContext,0)
def main_initrd(self):
return self.getTypedRuleContext(RefindConfigParser.Main_initrdContext,0)
def icon(self):
return self.getTypedRuleContext(RefindConfigParser.IconContext,0)
def os_type(self):
return self.getTypedRuleContext(RefindConfigParser.Os_typeContext,0)
def graphics(self):
return self.getTypedRuleContext(RefindConfigParser.GraphicsContext,0)
def main_boot_options(self):
return self.getTypedRuleContext(RefindConfigParser.Main_boot_optionsContext,0)
def firmware_bootnum(self):
return self.getTypedRuleContext(RefindConfigParser.Firmware_bootnumContext,0)
def disabled(self):
return self.getTypedRuleContext(RefindConfigParser.DisabledContext,0)
def sub_menu(self):
return self.getTypedRuleContext(RefindConfigParser.Sub_menuContext,0)
def getRuleIndex(self):
return RefindConfigParser.RULE_main_option
def accept(self, visitor:ParseTreeVisitor):
if hasattr( visitor, "visitMain_option" ):
return visitor.visitMain_option(self)
else:
return visitor.visitChildren(self)
def main_option(self):
localctx = RefindConfigParser.Main_optionContext(self, self._ctx, self.state)
self.enterRule(localctx, 8, self.RULE_main_option)
try:
self.state = 74
self._errHandler.sync(self)
token = self._input.LA(1)
if token in [7]:
self.enterOuterAlt(localctx, 1)
self.state = 64
self.volume()
pass
elif token in [8]:
self.enterOuterAlt(localctx, 2)
self.state = 65
self.loader()
pass
elif token in [9]:
self.enterOuterAlt(localctx, 3)
self.state = 66
self.main_initrd()
pass
elif token in [10]:
self.enterOuterAlt(localctx, 4)
self.state = 67
self.icon()
pass
elif token in [11]:
self.enterOuterAlt(localctx, 5)
self.state = 68
self.os_type()
pass
elif token in [12]:
self.enterOuterAlt(localctx, 6)
self.state = 69
self.graphics()
pass
elif token in [13]:
self.enterOuterAlt(localctx, 7)
self.state = 70
self.main_boot_options()
pass
elif token in [15]:
self.enterOuterAlt(localctx, 8)
self.state = 71
self.firmware_bootnum()
pass
elif token in [16]:
self.enterOuterAlt(localctx, 9)
self.state = 72
self.disabled()
pass
elif token in [6]:
self.enterOuterAlt(localctx, 10)
self.state = 73
self.sub_menu()
pass
else:
raise NoViableAltException(self)
except RecognitionException as re:
localctx.exception = re
self._errHandler.reportError(self, re)
self._errHandler.recover(self, re)
finally:
self.exitRule()
return localctx
class VolumeContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
self.parser = parser
def VOLUME(self):
return self.getToken(RefindConfigParser.VOLUME, 0)
def STRING(self):
return self.getToken(RefindConfigParser.STRING, 0)
def getRuleIndex(self):
return RefindConfigParser.RULE_volume
def accept(self, visitor:ParseTreeVisitor):
if hasattr( visitor, "visitVolume" ):
return visitor.visitVolume(self)
else:
return visitor.visitChildren(self)
def volume(self):
localctx = RefindConfigParser.VolumeContext(self, self._ctx, self.state)
self.enterRule(localctx, 10, self.RULE_volume)
try:
self.enterOuterAlt(localctx, 1)
self.state = 76
self.match(RefindConfigParser.VOLUME)
self.state = 77
self.match(RefindConfigParser.STRING)
except RecognitionException as re:
localctx.exception = re
self._errHandler.reportError(self, re)
self._errHandler.recover(self, re)
finally:
self.exitRule()
return localctx
class LoaderContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
self.parser = parser
def LOADER(self):
return self.getToken(RefindConfigParser.LOADER, 0)
def STRING(self):
return self.getToken(RefindConfigParser.STRING, 0)
def getRuleIndex(self):
return RefindConfigParser.RULE_loader
def accept(self, visitor:ParseTreeVisitor):
if hasattr( visitor, "visitLoader" ):
return visitor.visitLoader(self)
else:
return visitor.visitChildren(self)
def loader(self):
localctx = RefindConfigParser.LoaderContext(self, self._ctx, self.state)
self.enterRule(localctx, 12, self.RULE_loader)
try:
self.enterOuterAlt(localctx, 1)
self.state = 79
self.match(RefindConfigParser.LOADER)
self.state = 80
self.match(RefindConfigParser.STRING)
except RecognitionException as re:
localctx.exception = re
self._errHandler.reportError(self, re)
self._errHandler.recover(self, re)
finally:
self.exitRule()
return localctx
class Main_initrdContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
self.parser = parser
def INITRD(self):
return self.getToken(RefindConfigParser.INITRD, 0)
def STRING(self):
return self.getToken(RefindConfigParser.STRING, 0)
def getRuleIndex(self):
return RefindConfigParser.RULE_main_initrd
def accept(self, visitor:ParseTreeVisitor):
if hasattr( visitor, "visitMain_initrd" ):
return visitor.visitMain_initrd(self)
else:
return visitor.visitChildren(self)
def main_initrd(self):
localctx = RefindConfigParser.Main_initrdContext(self, self._ctx, self.state)
self.enterRule(localctx, 14, self.RULE_main_initrd)
try:
self.enterOuterAlt(localctx, 1)
self.state = 82
self.match(RefindConfigParser.INITRD)
self.state = 83
self.match(RefindConfigParser.STRING)
except RecognitionException as re:
localctx.exception = re
self._errHandler.reportError(self, re)
self._errHandler.recover(self, re)
finally:
self.exitRule()
return localctx
class IconContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
self.parser = parser
def ICON(self):
return self.getToken(RefindConfigParser.ICON, 0)
def STRING(self):
return self.getToken(RefindConfigParser.STRING, 0)
def getRuleIndex(self):
return RefindConfigParser.RULE_icon
def accept(self, visitor:ParseTreeVisitor):
if hasattr( visitor, "visitIcon" ):
return visitor.visitIcon(self)
else:
return visitor.visitChildren(self)
def icon(self):
localctx = RefindConfigParser.IconContext(self, self._ctx, self.state)
self.enterRule(localctx, 16, self.RULE_icon)
try:
self.enterOuterAlt(localctx, 1)
self.state = 85
self.match(RefindConfigParser.ICON)
self.state = 86
self.match(RefindConfigParser.STRING)
except RecognitionException as re:
localctx.exception = re
self._errHandler.reportError(self, re)
self._errHandler.recover(self, re)
finally:
self.exitRule()
return localctx
class Os_typeContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
self.parser = parser
def OS_TYPE(self):
return self.getToken(RefindConfigParser.OS_TYPE, 0)
def OS_TYPE_PARAMETER(self):
return self.getToken(RefindConfigParser.OS_TYPE_PARAMETER, 0)
def getRuleIndex(self):
return RefindConfigParser.RULE_os_type
def accept(self, visitor:ParseTreeVisitor):
if hasattr( visitor, "visitOs_type" ):
return visitor.visitOs_type(self)
else:
return visitor.visitChildren(self)
def os_type(self):
localctx = RefindConfigParser.Os_typeContext(self, self._ctx, self.state)
self.enterRule(localctx, 18, self.RULE_os_type)
try:
self.enterOuterAlt(localctx, 1)
self.state = 88
self.match(RefindConfigParser.OS_TYPE)
self.state = 89
self.match(RefindConfigParser.OS_TYPE_PARAMETER)
except RecognitionException as re:
localctx.exception = re
self._errHandler.reportError(self, re)
self._errHandler.recover(self, re)
finally:
self.exitRule()
return localctx
class GraphicsContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
self.parser = parser
def GRAPHICS(self):
return self.getToken(RefindConfigParser.GRAPHICS, 0)
def GRAPHICS_PARAMETER(self):
return self.getToken(RefindConfigParser.GRAPHICS_PARAMETER, 0)
def getRuleIndex(self):
return RefindConfigParser.RULE_graphics
def accept(self, visitor:ParseTreeVisitor):
if hasattr( visitor, "visitGraphics" ):
return visitor.visitGraphics(self)
else:
return visitor.visitChildren(self)
def graphics(self):
localctx = RefindConfigParser.GraphicsContext(self, self._ctx, self.state)
self.enterRule(localctx, 20, self.RULE_graphics)
try:
self.enterOuterAlt(localctx, 1)
self.state = 91
self.match(RefindConfigParser.GRAPHICS)
self.state = 92
self.match(RefindConfigParser.GRAPHICS_PARAMETER)
except RecognitionException as re:
localctx.exception = re
self._errHandler.reportError(self, re)
self._errHandler.recover(self, re)
finally:
self.exitRule()
return localctx
class Main_boot_optionsContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
self.parser = parser
def BOOT_OPTIONS(self):
return self.getToken(RefindConfigParser.BOOT_OPTIONS, 0)
def STRING(self):
return self.getToken(RefindConfigParser.STRING, 0)
def getRuleIndex(self):
return RefindConfigParser.RULE_main_boot_options
def accept(self, visitor:ParseTreeVisitor):
if hasattr( visitor, "visitMain_boot_options" ):
return visitor.visitMain_boot_options(self)
else:
return visitor.visitChildren(self)
def main_boot_options(self):
localctx = RefindConfigParser.Main_boot_optionsContext(self, self._ctx, self.state)
self.enterRule(localctx, 22, self.RULE_main_boot_options)
try:
self.enterOuterAlt(localctx, 1)
self.state = 94
self.match(RefindConfigParser.BOOT_OPTIONS)
self.state = 95
self.match(RefindConfigParser.STRING)
except RecognitionException as re:
localctx.exception = re
self._errHandler.reportError(self, re)
self._errHandler.recover(self, re)
finally:
self.exitRule()
return localctx
class Firmware_bootnumContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
self.parser = parser
def FIRMWARE_BOOTNUM(self):
return self.getToken(RefindConfigParser.FIRMWARE_BOOTNUM, 0)
def HEX_INTEGER(self):
return self.getToken(RefindConfigParser.HEX_INTEGER, 0)
def getRuleIndex(self):
return RefindConfigParser.RULE_firmware_bootnum
def accept(self, visitor:ParseTreeVisitor):
if hasattr( visitor, "visitFirmware_bootnum" ):
return visitor.visitFirmware_bootnum(self)
else:
return visitor.visitChildren(self)
def firmware_bootnum(self):
localctx = RefindConfigParser.Firmware_bootnumContext(self, self._ctx, self.state)
self.enterRule(localctx, 24, self.RULE_firmware_bootnum)
try:
self.enterOuterAlt(localctx, 1)
self.state = 97
self.match(RefindConfigParser.FIRMWARE_BOOTNUM)
self.state = 98
self.match(RefindConfigParser.HEX_INTEGER)
except RecognitionException as re:
localctx.exception = re
self._errHandler.reportError(self, re)
self._errHandler.recover(self, re)
finally:
self.exitRule()
return localctx
class DisabledContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
self.parser
gitextract_hh9l_b0o/
├── .gitignore
├── .pylintrc
├── .vscode/
│ ├── launch.json
│ └── settings.json
├── LICENSE.txt
├── MANIFEST.in
├── README.md
├── pyproject.toml
├── requirements.txt
├── setup.cfg
├── setup.py
├── src/
│ └── refind_btrfs/
│ ├── __init__.py
│ ├── __main__.py
│ ├── boot/
│ │ ├── __init__.py
│ │ ├── antlr4/
│ │ │ ├── RefindConfigLexer.g4
│ │ │ ├── RefindConfigLexer.interp
│ │ │ ├── RefindConfigLexer.py
│ │ │ ├── RefindConfigLexer.tokens
│ │ │ ├── RefindConfigParser.g4
│ │ │ ├── RefindConfigParser.interp
│ │ │ ├── RefindConfigParser.py
│ │ │ ├── RefindConfigParser.tokens
│ │ │ ├── RefindConfigParserVisitor.py
│ │ │ └── __init__.py
│ │ ├── boot_options.py
│ │ ├── boot_stanza.py
│ │ ├── file_refind_config_provider.py
│ │ ├── migrations/
│ │ │ ├── __init__.py
│ │ │ ├── icon_migration_strategies.py
│ │ │ ├── main_migration_strategies.py
│ │ │ ├── migration.py
│ │ │ └── state.py
│ │ ├── refind_config.py
│ │ ├── refind_listeners.py
│ │ ├── refind_visitors.py
│ │ └── sub_menu.py
│ ├── common/
│ │ ├── __init__.py
│ │ ├── abc/
│ │ │ ├── __init__.py
│ │ │ ├── base_config.py
│ │ │ ├── base_runner.py
│ │ │ ├── commands/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── device_command.py
│ │ │ │ ├── icon_command.py
│ │ │ │ └── subvolume_command.py
│ │ │ ├── factories/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── base_device_command_factory.py
│ │ │ │ ├── base_icon_command_factory.py
│ │ │ │ ├── base_logger_factory.py
│ │ │ │ └── base_subvolume_command_factory.py
│ │ │ └── providers/
│ │ │ ├── __init__.py
│ │ │ ├── base_package_config_provider.py
│ │ │ ├── base_persistence_provider.py
│ │ │ └── base_refind_config_provider.py
│ │ ├── boot_files_check_result.py
│ │ ├── checkable_observer.py
│ │ ├── configurable_mixin.py
│ │ ├── constants.py
│ │ ├── enums.py
│ │ ├── exceptions.py
│ │ └── package_config.py
│ ├── console/
│ │ ├── __init__.py
│ │ └── cli_runner.py
│ ├── data/
│ │ ├── refind-btrfs
│ │ ├── refind-btrfs.conf-sample
│ │ └── refind-btrfs.service
│ ├── device/
│ │ ├── __init__.py
│ │ ├── block_device.py
│ │ ├── filesystem.py
│ │ ├── mount_options.py
│ │ ├── partition.py
│ │ ├── partition_table.py
│ │ └── subvolume.py
│ ├── service/
│ │ ├── __init__.py
│ │ ├── snapshot_event_handler.py
│ │ ├── snapshot_observer.py
│ │ └── watchdog_runner.py
│ ├── state_management/
│ │ ├── __init__.py
│ │ ├── conditions.py
│ │ ├── model.py
│ │ └── refind_btrfs_machine.py
│ ├── system/
│ │ ├── __init__.py
│ │ ├── btrfsutil_command.py
│ │ ├── command_factories.py
│ │ ├── findmnt_command.py
│ │ ├── fstab_command.py
│ │ ├── lsblk_command.py
│ │ └── pillow_command.py
│ └── utility/
│ ├── __init__.py
│ ├── file_package_config_provider.py
│ ├── helpers.py
│ ├── injector_modules.py
│ ├── level_aware_formatter.py
│ ├── logger_factories.py
│ └── shelve_persistence_provider.py
└── tests/
└── .keep
SYMBOL INDEX (762 symbols across 58 files)
FILE: src/refind_btrfs/__init__.py
function initialize_injector (line 39) | def initialize_injector() -> Optional[Injector]:
function main (line 70) | def main() -> int:
FILE: src/refind_btrfs/boot/antlr4/RefindConfigLexer.py
function serializedATN (line 11) | def serializedATN():
class RefindConfigLexer (line 382) | class RefindConfigLexer(Lexer):
method __init__ (line 439) | def __init__(self, input=None, output:TextIO = sys.stdout):
FILE: src/refind_btrfs/boot/antlr4/RefindConfigParser.py
function serializedATN (line 11) | def serializedATN():
class RefindConfigParser (line 58) | class RefindConfigParser ( Parser ):
method __init__ (line 133) | def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
class RefindContext (line 142) | class RefindContext(ParserRuleContext):
method __init__ (line 145) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method EOF (line 149) | def EOF(self):
method config_option (line 152) | def config_option(self, i:int=None):
method getRuleIndex (line 159) | def getRuleIndex(self):
method accept (line 162) | def accept(self, visitor:ParseTreeVisitor):
method refind (line 171) | def refind(self):
class Config_optionContext (line 199) | class Config_optionContext(ParserRuleContext):
method __init__ (line 202) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method boot_stanza (line 206) | def boot_stanza(self):
method include (line 210) | def include(self):
method getRuleIndex (line 214) | def getRuleIndex(self):
method accept (line 217) | def accept(self, visitor:ParseTreeVisitor):
method config_option (line 226) | def config_option(self):
class Boot_stanzaContext (line 256) | class Boot_stanzaContext(ParserRuleContext):
method __init__ (line 259) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method menu_entry (line 263) | def menu_entry(self):
method OPEN_BRACE (line 267) | def OPEN_BRACE(self):
method CLOSE_BRACE (line 270) | def CLOSE_BRACE(self):
method main_option (line 273) | def main_option(self, i:int=None):
method getRuleIndex (line 280) | def getRuleIndex(self):
method accept (line 283) | def accept(self, visitor:ParseTreeVisitor):
method boot_stanza (line 292) | def boot_stanza(self):
class Menu_entryContext (line 326) | class Menu_entryContext(ParserRuleContext):
method __init__ (line 329) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method MENU_ENTRY (line 333) | def MENU_ENTRY(self):
method STRING (line 336) | def STRING(self):
method getRuleIndex (line 339) | def getRuleIndex(self):
method accept (line 342) | def accept(self, visitor:ParseTreeVisitor):
method menu_entry (line 351) | def menu_entry(self):
class Main_optionContext (line 370) | class Main_optionContext(ParserRuleContext):
method __init__ (line 373) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method volume (line 377) | def volume(self):
method loader (line 381) | def loader(self):
method main_initrd (line 385) | def main_initrd(self):
method icon (line 389) | def icon(self):
method os_type (line 393) | def os_type(self):
method graphics (line 397) | def graphics(self):
method main_boot_options (line 401) | def main_boot_options(self):
method firmware_bootnum (line 405) | def firmware_bootnum(self):
method disabled (line 409) | def disabled(self):
method sub_menu (line 413) | def sub_menu(self):
method getRuleIndex (line 417) | def getRuleIndex(self):
method accept (line 420) | def accept(self, visitor:ParseTreeVisitor):
method main_option (line 429) | def main_option(self):
class VolumeContext (line 499) | class VolumeContext(ParserRuleContext):
method __init__ (line 502) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method VOLUME (line 506) | def VOLUME(self):
method STRING (line 509) | def STRING(self):
method getRuleIndex (line 512) | def getRuleIndex(self):
method accept (line 515) | def accept(self, visitor:ParseTreeVisitor):
method volume (line 524) | def volume(self):
class LoaderContext (line 543) | class LoaderContext(ParserRuleContext):
method __init__ (line 546) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method LOADER (line 550) | def LOADER(self):
method STRING (line 553) | def STRING(self):
method getRuleIndex (line 556) | def getRuleIndex(self):
method accept (line 559) | def accept(self, visitor:ParseTreeVisitor):
method loader (line 568) | def loader(self):
class Main_initrdContext (line 587) | class Main_initrdContext(ParserRuleContext):
method __init__ (line 590) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method INITRD (line 594) | def INITRD(self):
method STRING (line 597) | def STRING(self):
method getRuleIndex (line 600) | def getRuleIndex(self):
method accept (line 603) | def accept(self, visitor:ParseTreeVisitor):
method main_initrd (line 612) | def main_initrd(self):
class IconContext (line 631) | class IconContext(ParserRuleContext):
method __init__ (line 634) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method ICON (line 638) | def ICON(self):
method STRING (line 641) | def STRING(self):
method getRuleIndex (line 644) | def getRuleIndex(self):
method accept (line 647) | def accept(self, visitor:ParseTreeVisitor):
method icon (line 656) | def icon(self):
class Os_typeContext (line 675) | class Os_typeContext(ParserRuleContext):
method __init__ (line 678) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method OS_TYPE (line 682) | def OS_TYPE(self):
method OS_TYPE_PARAMETER (line 685) | def OS_TYPE_PARAMETER(self):
method getRuleIndex (line 688) | def getRuleIndex(self):
method accept (line 691) | def accept(self, visitor:ParseTreeVisitor):
method os_type (line 700) | def os_type(self):
class GraphicsContext (line 719) | class GraphicsContext(ParserRuleContext):
method __init__ (line 722) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method GRAPHICS (line 726) | def GRAPHICS(self):
method GRAPHICS_PARAMETER (line 729) | def GRAPHICS_PARAMETER(self):
method getRuleIndex (line 732) | def getRuleIndex(self):
method accept (line 735) | def accept(self, visitor:ParseTreeVisitor):
method graphics (line 744) | def graphics(self):
class Main_boot_optionsContext (line 763) | class Main_boot_optionsContext(ParserRuleContext):
method __init__ (line 766) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method BOOT_OPTIONS (line 770) | def BOOT_OPTIONS(self):
method STRING (line 773) | def STRING(self):
method getRuleIndex (line 776) | def getRuleIndex(self):
method accept (line 779) | def accept(self, visitor:ParseTreeVisitor):
method main_boot_options (line 788) | def main_boot_options(self):
class Firmware_bootnumContext (line 807) | class Firmware_bootnumContext(ParserRuleContext):
method __init__ (line 810) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method FIRMWARE_BOOTNUM (line 814) | def FIRMWARE_BOOTNUM(self):
method HEX_INTEGER (line 817) | def HEX_INTEGER(self):
method getRuleIndex (line 820) | def getRuleIndex(self):
method accept (line 823) | def accept(self, visitor:ParseTreeVisitor):
method firmware_bootnum (line 832) | def firmware_bootnum(self):
class DisabledContext (line 851) | class DisabledContext(ParserRuleContext):
method __init__ (line 854) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method DISABLED (line 858) | def DISABLED(self):
method getRuleIndex (line 861) | def getRuleIndex(self):
method accept (line 864) | def accept(self, visitor:ParseTreeVisitor):
method disabled (line 873) | def disabled(self):
class Sub_menuContext (line 890) | class Sub_menuContext(ParserRuleContext):
method __init__ (line 893) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method menu_entry (line 897) | def menu_entry(self):
method OPEN_BRACE (line 901) | def OPEN_BRACE(self):
method CLOSE_BRACE (line 904) | def CLOSE_BRACE(self):
method sub_option (line 907) | def sub_option(self, i:int=None):
method getRuleIndex (line 914) | def getRuleIndex(self):
method accept (line 917) | def accept(self, visitor:ParseTreeVisitor):
method sub_menu (line 926) | def sub_menu(self):
class Sub_optionContext (line 960) | class Sub_optionContext(ParserRuleContext):
method __init__ (line 963) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method loader (line 967) | def loader(self):
method sub_initrd (line 971) | def sub_initrd(self):
method graphics (line 975) | def graphics(self):
method sub_boot_options (line 979) | def sub_boot_options(self):
method add_boot_options (line 983) | def add_boot_options(self):
method disabled (line 987) | def disabled(self):
method getRuleIndex (line 991) | def getRuleIndex(self):
method accept (line 994) | def accept(self, visitor:ParseTreeVisitor):
method sub_option (line 1003) | def sub_option(self):
class Sub_initrdContext (line 1053) | class Sub_initrdContext(ParserRuleContext):
method __init__ (line 1056) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method INITRD (line 1060) | def INITRD(self):
method STRING (line 1063) | def STRING(self):
method getRuleIndex (line 1066) | def getRuleIndex(self):
method accept (line 1069) | def accept(self, visitor:ParseTreeVisitor):
method sub_initrd (line 1078) | def sub_initrd(self):
class Sub_boot_optionsContext (line 1104) | class Sub_boot_optionsContext(ParserRuleContext):
method __init__ (line 1107) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method BOOT_OPTIONS (line 1111) | def BOOT_OPTIONS(self):
method STRING (line 1114) | def STRING(self):
method getRuleIndex (line 1117) | def getRuleIndex(self):
method accept (line 1120) | def accept(self, visitor:ParseTreeVisitor):
method sub_boot_options (line 1129) | def sub_boot_options(self):
class Add_boot_optionsContext (line 1155) | class Add_boot_optionsContext(ParserRuleContext):
method __init__ (line 1158) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method ADD_BOOT_OPTIONS (line 1162) | def ADD_BOOT_OPTIONS(self):
method STRING (line 1165) | def STRING(self):
method getRuleIndex (line 1168) | def getRuleIndex(self):
method accept (line 1171) | def accept(self, visitor:ParseTreeVisitor):
method add_boot_options (line 1180) | def add_boot_options(self):
class IncludeContext (line 1199) | class IncludeContext(ParserRuleContext):
method __init__ (line 1202) | def __init__(self, parser, parent:ParserRuleContext=None, invokingSt...
method INCLUDE (line 1206) | def INCLUDE(self):
method STRING (line 1209) | def STRING(self):
method getRuleIndex (line 1212) | def getRuleIndex(self):
method accept (line 1215) | def accept(self, visitor:ParseTreeVisitor):
method include (line 1224) | def include(self):
FILE: src/refind_btrfs/boot/antlr4/RefindConfigParserVisitor.py
class RefindConfigParserVisitor (line 10) | class RefindConfigParserVisitor(ParseTreeVisitor):
method visitRefind (line 13) | def visitRefind(self, ctx:RefindConfigParser.RefindContext):
method visitConfig_option (line 18) | def visitConfig_option(self, ctx:RefindConfigParser.Config_optionConte...
method visitBoot_stanza (line 23) | def visitBoot_stanza(self, ctx:RefindConfigParser.Boot_stanzaContext):
method visitMenu_entry (line 28) | def visitMenu_entry(self, ctx:RefindConfigParser.Menu_entryContext):
method visitMain_option (line 33) | def visitMain_option(self, ctx:RefindConfigParser.Main_optionContext):
method visitVolume (line 38) | def visitVolume(self, ctx:RefindConfigParser.VolumeContext):
method visitLoader (line 43) | def visitLoader(self, ctx:RefindConfigParser.LoaderContext):
method visitMain_initrd (line 48) | def visitMain_initrd(self, ctx:RefindConfigParser.Main_initrdContext):
method visitIcon (line 53) | def visitIcon(self, ctx:RefindConfigParser.IconContext):
method visitOs_type (line 58) | def visitOs_type(self, ctx:RefindConfigParser.Os_typeContext):
method visitGraphics (line 63) | def visitGraphics(self, ctx:RefindConfigParser.GraphicsContext):
method visitMain_boot_options (line 68) | def visitMain_boot_options(self, ctx:RefindConfigParser.Main_boot_opti...
method visitFirmware_bootnum (line 73) | def visitFirmware_bootnum(self, ctx:RefindConfigParser.Firmware_bootnu...
method visitDisabled (line 78) | def visitDisabled(self, ctx:RefindConfigParser.DisabledContext):
method visitSub_menu (line 83) | def visitSub_menu(self, ctx:RefindConfigParser.Sub_menuContext):
method visitSub_option (line 88) | def visitSub_option(self, ctx:RefindConfigParser.Sub_optionContext):
method visitSub_initrd (line 93) | def visitSub_initrd(self, ctx:RefindConfigParser.Sub_initrdContext):
method visitSub_boot_options (line 98) | def visitSub_boot_options(self, ctx:RefindConfigParser.Sub_boot_option...
method visitAdd_boot_options (line 103) | def visitAdd_boot_options(self, ctx:RefindConfigParser.Add_boot_option...
method visitInclude (line 108) | def visitInclude(self, ctx:RefindConfigParser.IncludeContext):
FILE: src/refind_btrfs/boot/boot_options.py
class BootOptions (line 42) | class BootOptions:
method __init__ (line 43) | def __init__(self, raw_options: Optional[str]) -> None:
method __str__ (line 96) | def __str__(self) -> str:
method is_matched_with (line 130) | def is_matched_with(self, block_device: BlockDevice) -> bool:
method migrate_from_to (line 164) | def migrate_from_to(
method merge (line 199) | def merge(cls, all_boot_options: Iterable[BootOptions]) -> Self:
method root_location (line 207) | def root_location(self) -> Optional[str]:
method root_mount_options (line 216) | def root_mount_options(self) -> Optional[MountOptions]:
method initrd_options (line 225) | def initrd_options(self) -> list[str]:
method other_options (line 229) | def other_options(self) -> list[str]:
FILE: src/refind_btrfs/boot/boot_stanza.py
class BootStanza (line 58) | class BootStanza:
method __init__ (line 59) | def __init__(
method __eq__ (line 85) | def __eq__(self, other: object) -> bool:
method __hash__ (line 101) | def __hash__(self):
method __str__ (line 106) | def __str__(self) -> str:
method with_boot_files_check_result (line 177) | def with_boot_files_check_result(
method with_sub_menus (line 215) | def with_sub_menus(self, sub_menus: Iterable[SubMenu]) -> Self:
method is_matched_with (line 221) | def is_matched_with(self, argument: Any) -> bool:
method has_unmatched_boot_files (line 229) | def has_unmatched_boot_files(self) -> bool:
method has_sub_menus (line 237) | def has_sub_menus(self) -> bool:
method can_be_used_for_bootable_snapshot (line 240) | def can_be_used_for_bootable_snapshot(self) -> bool:
method validate_boot_files_check_result (line 253) | def validate_boot_files_check_result(self) -> None:
method validate_icon_path (line 266) | def validate_icon_path(
method _is_matched_with_block_device (line 282) | def _is_matched_with_block_device(self, block_device: BlockDevice) -> ...
method _is_matched_with_loader_filename (line 300) | def _is_matched_with_loader_filename(self, loader_filename: str) -> bool:
method _get_all_boot_file_paths (line 303) | def _get_all_boot_file_paths(
method name (line 332) | def name(self) -> str:
method normalized_name (line 336) | def normalized_name(self) -> str:
method volume (line 340) | def volume(self) -> Optional[str]:
method normalized_volume (line 344) | def normalized_volume(self) -> Optional[str]:
method loader_path (line 356) | def loader_path(self) -> Optional[str]:
method initrd_path (line 360) | def initrd_path(self) -> Optional[str]:
method icon_path (line 364) | def icon_path(self) -> Optional[str]:
method os_type (line 368) | def os_type(self) -> Optional[str]:
method graphics (line 372) | def graphics(self) -> Optional[bool]:
method boot_options (line 376) | def boot_options(self) -> BootOptions:
method firmware_bootnum (line 380) | def firmware_bootnum(self) -> Optional[int]:
method is_disabled (line 384) | def is_disabled(self) -> bool:
method boot_files_check_result (line 388) | def boot_files_check_result(self) -> Optional[BootFilesCheckResult]:
method sub_menus (line 392) | def sub_menus(self) -> Optional[list[SubMenu]]:
method filename (line 396) | def filename(self) -> str:
method all_boot_file_paths (line 407) | def all_boot_file_paths(self) -> DefaultDict[BootFilePathSource, Set[s...
method _loader_filename (line 420) | def _loader_filename(self) -> str:
FILE: src/refind_btrfs/boot/file_refind_config_provider.py
class FileRefindConfigProvider (line 58) | class FileRefindConfigProvider(BaseRefindConfigProvider):
method __init__ (line 62) | def __init__(
method get_config (line 73) | def get_config(self, partition: Partition) -> RefindConfig:
method save_config (line 106) | def save_config(self, config: RefindConfig) -> None:
method append_to_config (line 150) | def append_to_config(self, config: RefindConfig) -> None:
method _read_config_from (line 224) | def _read_config_from(self, config_file_path: Path) -> RefindConfig:
method _read_included_configs_from (line 299) | def _read_included_configs_from(
method _map_to_boot_stanzas (line 315) | def _map_to_boot_stanzas(
method _map_to_includes (line 330) | def _map_to_includes(
FILE: src/refind_btrfs/boot/migrations/icon_migration_strategies.py
class BaseIconMigrationStrategy (line 32) | class BaseIconMigrationStrategy(ABC):
method __init__ (line 33) | def __init__(
method migrate (line 41) | def migrate(self) -> str:
class DefaultMigrationStrategy (line 45) | class DefaultMigrationStrategy(BaseIconMigrationStrategy):
method migrate (line 46) | def migrate(self) -> str:
class CustomMigrationStrategy (line 50) | class CustomMigrationStrategy(BaseIconMigrationStrategy):
method __init__ (line 51) | def __init__(
method migrate (line 62) | def migrate(self) -> str:
class EmbedBtrfsLogoStrategy (line 74) | class EmbedBtrfsLogoStrategy(BaseIconMigrationStrategy):
method __init__ (line 75) | def __init__(
method migrate (line 86) | def migrate(self) -> str:
class IconMigrationFactory (line 98) | class IconMigrationFactory:
method migration_strategy (line 100) | def migration_strategy(
FILE: src/refind_btrfs/boot/migrations/main_migration_strategies.py
class BaseMainMigrationStrategy (line 48) | class BaseMainMigrationStrategy(ABC):
method __init__ (line 49) | def __init__(
method migrate (line 66) | def migrate(self) -> State:
method destination_name (line 70) | def destination_name(self) -> str:
method destination_loader_path (line 91) | def destination_loader_path(self) -> Optional[str]:
method destination_initrd_path (line 104) | def destination_initrd_path(self) -> Optional[str]:
method destination_boot_options (line 117) | def destination_boot_options(self) -> Optional[BootOptions]:
method destination_add_boot_options (line 135) | def destination_add_boot_options(self) -> Optional[BootOptions]:
method include_paths (line 153) | def include_paths(self) -> bool:
method icon (line 157) | def icon(self) -> Icon:
class BootStanzaMigrationStrategy (line 161) | class BootStanzaMigrationStrategy(BaseMainMigrationStrategy):
method __init__ (line 162) | def __init__(
method migrate (line 190) | def migrate(self) -> State:
class SubMenuMigrationStrategy (line 227) | class SubMenuMigrationStrategy(BaseMainMigrationStrategy):
method __init__ (line 228) | def __init__(
method migrate (line 256) | def migrate(self) -> State:
class MainMigrationFactory (line 299) | class MainMigrationFactory:
method migration_strategy (line 303) | def migration_strategy(
method _boot_stanza_overload (line 321) | def _boot_stanza_overload(
method _sub_menu_overload (line 344) | def _sub_menu_overload(
FILE: src/refind_btrfs/boot/migrations/migration.py
class Migration (line 42) | class Migration:
method __init__ (line 43) | def __init__(
method migrate (line 64) | def migrate(
method _migrate_sub_menus (line 131) | def _migrate_sub_menus(
method _is_latest_snapshot (line 170) | def _is_latest_snapshot(self, snapshot: Subvolume) -> bool:
FILE: src/refind_btrfs/boot/migrations/state.py
class State (line 29) | class State(NamedTuple):
FILE: src/refind_btrfs/boot/refind_config.py
class RefindConfig (line 49) | class RefindConfig(BaseConfig):
method __init__ (line 50) | def __init__(self, file_path: Path) -> None:
method with_boot_stanzas (line 56) | def with_boot_stanzas(self, boot_stanzas: Iterable[BootStanza]) -> Self:
method with_included_configs (line 61) | def with_included_configs(self, include_configs: Iterable[RefindConfig...
method get_boot_stanzas_matched_with (line 66) | def get_boot_stanzas_matched_with(
method get_included_configs_difference_from (line 82) | def get_included_configs_difference_from(
method generate_new_from (line 101) | def generate_new_from(
method has_boot_stanzas (line 162) | def has_boot_stanzas(self) -> bool:
method has_included_configs (line 165) | def has_included_configs(self) -> bool:
method is_of_initialization_type (line 168) | def is_of_initialization_type(
method is_generated (line 188) | def is_generated(self) -> bool:
method boot_stanzas (line 195) | def boot_stanzas(self) -> Optional[list[BootStanza]]:
method included_configs (line 199) | def included_configs(self) -> Optional[list[RefindConfig]]:
FILE: src/refind_btrfs/boot/refind_listeners.py
class RefindErrorListener (line 29) | class RefindErrorListener(ErrorListener):
method syntaxError (line 31) | def syntaxError(self, recognizer, offendingSymbol, line, column, msg, e):
FILE: src/refind_btrfs/boot/refind_visitors.py
class ContextWithVisitor (line 41) | class ContextWithVisitor(NamedTuple):
class BootStanzaVisitor (line 46) | class BootStanzaVisitor(RefindConfigParserVisitor):
method visitBoot_stanza (line 47) | def visitBoot_stanza(
class MenuEntryVisitor (line 86) | class MenuEntryVisitor(RefindConfigParserVisitor):
method visitMenu_entry (line 87) | def visitMenu_entry(self, ctx: RefindConfigParser.Menu_entryContext) -...
class OptionVisitor (line 93) | class OptionVisitor(RefindConfigParserVisitor):
method __init__ (line 94) | def __init__(self) -> None:
method map_to_options_dict (line 153) | def map_to_options_dict(
method visitMain_option (line 170) | def visitMain_option(
method visitSub_option (line 175) | def visitSub_option(
method _map_to_option_tuple (line 181) | def _map_to_option_tuple(
class SubMenuVisitor (line 195) | class SubMenuVisitor(RefindConfigParserVisitor):
method visitSub_menu (line 196) | def visitSub_menu(self, ctx: RefindConfigParser.Sub_menuContext) -> Su...
class VolumeVisitor (line 224) | class VolumeVisitor(RefindConfigParserVisitor):
method visitVolume (line 225) | def visitVolume(self, ctx: RefindConfigParser.VolumeContext) -> str:
class LoaderVisitor (line 234) | class LoaderVisitor(RefindConfigParserVisitor):
method visitLoader (line 235) | def visitLoader(self, ctx: RefindConfigParser.LoaderContext) -> str:
class InitrdVisitor (line 241) | class InitrdVisitor(RefindConfigParserVisitor):
method visitMain_initrd (line 242) | def visitMain_initrd(self, ctx: RefindConfigParser.Main_initrdContext)...
method visitSub_initrd (line 247) | def visitSub_initrd(self, ctx: RefindConfigParser.Sub_initrdContext) -...
class IconVisitor (line 256) | class IconVisitor(RefindConfigParserVisitor):
method visitIcon (line 257) | def visitIcon(self, ctx: RefindConfigParser.IconContext) -> str:
class OsTypeVisitor (line 263) | class OsTypeVisitor(RefindConfigParserVisitor):
method visitOs_type (line 264) | def visitOs_type(self, ctx: RefindConfigParser.Os_typeContext) -> str:
class GraphicsVisitor (line 277) | class GraphicsVisitor(RefindConfigParserVisitor):
method visitGraphics (line 278) | def visitGraphics(self, ctx: RefindConfigParser.GraphicsContext) -> bool:
class BootOptionsVisitor (line 291) | class BootOptionsVisitor(RefindConfigParserVisitor):
method visitMain_boot_options (line 292) | def visitMain_boot_options(
method visitSub_boot_options (line 299) | def visitSub_boot_options(
method visitAdd_boot_options (line 309) | def visitAdd_boot_options(
class FirmwareBootnumVisitor (line 317) | class FirmwareBootnumVisitor(RefindConfigParserVisitor):
method visitFirmware_bootnum (line 318) | def visitFirmware_bootnum(
class DisabledVisitor (line 331) | class DisabledVisitor(RefindConfigParserVisitor):
method visitDisabled (line 332) | def visitDisabled(self, ctx: RefindConfigParser.DisabledContext) -> bool:
class IncludeVisitor (line 336) | class IncludeVisitor(RefindConfigParserVisitor):
method visitInclude (line 337) | def visitInclude(self, ctx: RefindConfigParser.IncludeContext) -> str:
FILE: src/refind_btrfs/boot/sub_menu.py
class SubMenu (line 44) | class SubMenu:
method __init__ (line 45) | def __init__(
method __str__ (line 63) | def __str__(self) -> str:
method is_matched_with (line 116) | def is_matched_with(self, block_device: BlockDevice) -> bool:
method can_be_used_for_bootable_snapshot (line 125) | def can_be_used_for_bootable_snapshot(self) -> bool:
method _get_all_boot_file_paths (line 138) | def _get_all_boot_file_paths(
method name (line 168) | def name(self) -> str:
method normalized_name (line 172) | def normalized_name(self) -> str:
method loader_path (line 176) | def loader_path(self) -> Optional[str]:
method initrd_path (line 180) | def initrd_path(self) -> Optional[str]:
method graphics (line 184) | def graphics(self) -> Optional[bool]:
method boot_options (line 188) | def boot_options(self) -> Optional[BootOptions]:
method add_boot_options (line 192) | def add_boot_options(self) -> BootOptions:
method is_disabled (line 196) | def is_disabled(self) -> bool:
method all_boot_file_paths (line 200) | def all_boot_file_paths(self) -> Set[tuple[BootFilePathSource, str]]:
FILE: src/refind_btrfs/common/abc/base_config.py
class BaseConfig (line 35) | class BaseConfig(ABC):
method __init__ (line 36) | def __init__(self, file_path: Path) -> None:
method __eq__ (line 43) | def __eq__(self, other: object) -> bool:
method __hash__ (line 55) | def __hash__(self) -> int:
method __getstate__ (line 58) | def __getstate__(self) -> dict[str, Any]:
method with_initialization_type (line 67) | def with_initialization_type(
method refresh_file_stat (line 74) | def refresh_file_stat(self):
method is_modified (line 80) | def is_modified(self, actual_file_path: Path) -> bool:
method is_of_initialization_type (line 95) | def is_of_initialization_type(
method file_path (line 101) | def file_path(self) -> Path:
method file_stat (line 105) | def file_stat(self) -> Optional[stat_result]:
method initialization_type (line 109) | def initialization_type(self) -> Optional[ConfigInitializationType]:
FILE: src/refind_btrfs/common/abc/base_runner.py
class BaseRunner (line 27) | class BaseRunner(ABC):
method run (line 29) | def run(self) -> int:
FILE: src/refind_btrfs/common/abc/commands/device_command.py
class DeviceCommand (line 31) | class DeviceCommand(ABC):
method get_block_devices (line 33) | def get_block_devices(self) -> Iterator[BlockDevice]:
method get_partition_table_for (line 37) | def get_partition_table_for(self, argument: Any) -> PartitionTable:
method save_partition_table (line 43) | def save_partition_table(self, partition_table: PartitionTable) -> None:
method _block_device_overload (line 47) | def _block_device_overload(self, block_device: BlockDevice) -> Partiti...
method _subvolume_overload (line 51) | def _subvolume_overload(self, subvolume: Subvolume) -> PartitionTable:
method _block_device_partition_table (line 55) | def _block_device_partition_table(
method _subvolume_partition_table (line 61) | def _subvolume_partition_table(self, subvolume: Subvolume) -> Partitio...
FILE: src/refind_btrfs/common/abc/commands/icon_command.py
class IconCommand (line 30) | class IconCommand(ABC):
method validate_custom_icon (line 32) | def validate_custom_icon(
method embed_btrfs_logo_into_source_icon (line 38) | def embed_btrfs_logo_into_source_icon(
FILE: src/refind_btrfs/common/abc/commands/subvolume_command.py
class SubvolumeCommand (line 31) | class SubvolumeCommand(ABC):
method get_subvolume_from (line 33) | def get_subvolume_from(self, filesystem_path: Path) -> Optional[Subvol...
method get_all_source_snapshots_for (line 37) | def get_all_source_snapshots_for(self, parent: Subvolume) -> Iterator[...
method get_all_destination_snapshots (line 41) | def get_all_destination_snapshots(self) -> Iterator[Subvolume]:
method get_bootable_snapshot_from (line 45) | def get_bootable_snapshot_from(self, source: Subvolume) -> Subvolume:
method delete_snapshot (line 49) | def delete_snapshot(self, snapshot: Subvolume) -> None:
FILE: src/refind_btrfs/common/abc/factories/base_device_command_factory.py
class BaseDeviceCommandFactory (line 33) | class BaseDeviceCommandFactory(ABC):
method physical_device_command (line 35) | def physical_device_command(self) -> DeviceCommand:
method live_device_command (line 39) | def live_device_command(self) -> DeviceCommand:
method static_device_command (line 43) | def static_device_command(self) -> DeviceCommand:
FILE: src/refind_btrfs/common/abc/factories/base_icon_command_factory.py
class BaseIconCommandFactory (line 33) | class BaseIconCommandFactory(ABC):
method icon_command (line 35) | def icon_command(self) -> IconCommand:
FILE: src/refind_btrfs/common/abc/factories/base_logger_factory.py
class BaseLoggerFactory (line 31) | class BaseLoggerFactory(ABC):
method logger (line 32) | def logger(self, name: str) -> Logger:
method get_handler (line 48) | def get_handler(self) -> Handler:
FILE: src/refind_btrfs/common/abc/factories/base_subvolume_command_factory.py
class BaseSubvolumeCommandFactory (line 33) | class BaseSubvolumeCommandFactory(ABC):
method subvolume_command (line 35) | def subvolume_command(self) -> SubvolumeCommand:
FILE: src/refind_btrfs/common/abc/providers/base_package_config_provider.py
class BasePackageConfigProvider (line 33) | class BasePackageConfigProvider(ABC):
method get_config (line 35) | def get_config(self) -> PackageConfig:
FILE: src/refind_btrfs/common/abc/providers/base_persistence_provider.py
class BasePersistenceProvider (line 36) | class BasePersistenceProvider(ABC):
method get_package_config (line 38) | def get_package_config(self) -> Optional[PackageConfig]:
method save_package_config (line 42) | def save_package_config(self, value: PackageConfig) -> None:
method get_refind_config (line 46) | def get_refind_config(self, file_path: Path) -> Optional[RefindConfig]:
method save_refind_config (line 50) | def save_refind_config(self, value: RefindConfig) -> None:
method get_previous_run_result (line 54) | def get_previous_run_result(self) -> ProcessingResult:
method save_current_run_result (line 58) | def save_current_run_result(self, value: ProcessingResult) -> None:
FILE: src/refind_btrfs/common/abc/providers/base_refind_config_provider.py
class BaseRefindConfigProvider (line 34) | class BaseRefindConfigProvider(ABC):
method get_config (line 36) | def get_config(self, partition: Partition) -> RefindConfig:
method save_config (line 40) | def save_config(self, config: RefindConfig) -> None:
method append_to_config (line 44) | def append_to_config(self, config: RefindConfig) -> None:
FILE: src/refind_btrfs/common/boot_files_check_result.py
class BootFilesCheckResult (line 30) | class BootFilesCheckResult(NamedTuple):
method has_unmatched_boot_files (line 36) | def has_unmatched_boot_files(self) -> bool:
FILE: src/refind_btrfs/common/checkable_observer.py
class CheckableObserver (line 30) | class CheckableObserver(Observer):
method __init__ (line 31) | def __init__(self):
method check (line 37) | def check(self) -> None:
FILE: src/refind_btrfs/common/configurable_mixin.py
class ConfigurableMixin (line 34) | class ConfigurableMixin:
method __init__ (line 35) | def __init__(self, package_config_provider: BasePackageConfigProvider)...
method package_config (line 39) | def package_config(self) -> PackageConfig:
FILE: src/refind_btrfs/common/enums.py
class AutoNameToLower (line 28) | class AutoNameToLower(Enum):
method _generate_next_value_ (line 31) | def _generate_next_value_(
class RunMode (line 38) | class RunMode(AutoNameToLower):
class LsblkJsonKey (line 44) | class LsblkJsonKey(AutoNameToLower):
class LsblkColumn (line 50) | class LsblkColumn(Enum):
class FindmntJsonKey (line 66) | class FindmntJsonKey(AutoNameToLower):
class FindmntColumn (line 71) | class FindmntColumn(Enum):
class FstabColumn (line 83) | class FstabColumn(Enum):
class PathRelation (line 93) | class PathRelation(Enum):
class ConfigInitializationType (line 101) | class ConfigInitializationType(Enum):
class TopLevelConfigKey (line 107) | class TopLevelConfigKey(AutoNameToLower):
class SnapshotSearchConfigKey (line 117) | class SnapshotSearchConfigKey(AutoNameToLower):
class SnapshotManipulationConfigKey (line 124) | class SnapshotManipulationConfigKey(AutoNameToLower):
class BootStanzaGenerationConfigKey (line 132) | class BootStanzaGenerationConfigKey(AutoNameToLower):
class IconConfigKey (line 141) | class IconConfigKey(AutoNameToLower):
class BootStanzaIconGenerationMode (line 148) | class BootStanzaIconGenerationMode(AutoNameToLower):
class BtrfsLogoConfigKey (line 155) | class BtrfsLogoConfigKey(AutoNameToLower):
class BtrfsLogoVariant (line 163) | class BtrfsLogoVariant(AutoNameToLower):
class BtrfsLogoSize (line 169) | class BtrfsLogoSize(AutoNameToLower):
class BtrfsLogoHorizontalAlignment (line 176) | class BtrfsLogoHorizontalAlignment(AutoNameToLower):
class BtrfsLogoVerticalAlignment (line 183) | class BtrfsLogoVerticalAlignment(AutoNameToLower):
class LocalDbKey (line 190) | class LocalDbKey(AutoNameToLower):
class RefindOption (line 197) | class RefindOption(Enum):
class OSTypeParameter (line 214) | class OSTypeParameter(Enum):
class GraphicsParameter (line 223) | class GraphicsParameter(AutoNameToLower):
class BootFilePathSource (line 229) | class BootFilePathSource(Enum):
class StateNames (line 235) | class StateNames(AutoNameToLower):
FILE: src/refind_btrfs/common/exceptions.py
class RefindBtrfsError (line 30) | class RefindBtrfsError(Exception):
method __init__ (line 31) | def __init__(self, *args: object) -> None:
method __str__ (line 46) | def __str__(self) -> str:
method formatted_message (line 50) | def formatted_message(self) -> str:
method error_type_name (line 54) | def error_type_name(self) -> str:
class PartitionError (line 58) | class PartitionError(RefindBtrfsError):
class SubvolumeError (line 62) | class SubvolumeError(RefindBtrfsError):
class SnapshotMountedAsRootError (line 66) | class SnapshotMountedAsRootError(SubvolumeError):
class SnapshotExcludedFromDeletionError (line 70) | class SnapshotExcludedFromDeletionError(SubvolumeError):
class PackageConfigError (line 74) | class PackageConfigError(RefindBtrfsError):
class RefindConfigError (line 78) | class RefindConfigError(RefindBtrfsError):
class RefindSyntaxError (line 82) | class RefindSyntaxError(RefindBtrfsError):
method __init__ (line 83) | def __init__(self, line: int, column: int, message: str) -> None:
method formatted_message (line 90) | def formatted_message(self) -> str:
class NoChangesDetectedError (line 96) | class NoChangesDetectedError(RefindBtrfsError):
FILE: src/refind_btrfs/common/package_config.py
class SnapshotSearch (line 44) | class SnapshotSearch(NamedTuple):
method __eq__ (line 49) | def __eq__(self, other: object) -> bool:
class SnapshotManipulation (line 62) | class SnapshotManipulation(NamedTuple):
class BtrfsLogo (line 69) | class BtrfsLogo(NamedTuple):
class Icon (line 76) | class Icon(NamedTuple):
class BootStanzaGeneration (line 82) | class BootStanzaGeneration(NamedTuple):
method with_include_paths (line 89) | def with_include_paths(self, boot_device: Optional[BlockDevice]) -> Self:
class PackageConfig (line 104) | class PackageConfig(BaseConfig):
method __init__ (line 105) | def __init__(
method _get_directories_for_watch (line 123) | def _get_directories_for_watch(self) -> Iterator[Path]:
method esp_uuid (line 134) | def esp_uuid(self) -> UUID:
method exit_if_root_is_snapshot (line 138) | def exit_if_root_is_snapshot(self) -> bool:
method exit_if_no_changes_are_detected (line 142) | def exit_if_no_changes_are_detected(self) -> bool:
method snapshot_searches (line 146) | def snapshot_searches(self) -> list[SnapshotSearch]:
method snapshot_manipulation (line 150) | def snapshot_manipulation(self) -> SnapshotManipulation:
method boot_stanza_generation (line 154) | def boot_stanza_generation(self) -> BootStanzaGeneration:
method directories_for_watch (line 158) | def directories_for_watch(self) -> Set[Path]:
FILE: src/refind_btrfs/console/cli_runner.py
class CLIRunner (line 35) | class CLIRunner(BaseRunner):
method __init__ (line 37) | def __init__(
method run (line 43) | def run(self) -> int:
FILE: src/refind_btrfs/device/block_device.py
class BlockDevice (line 36) | class BlockDevice:
method __init__ (line 37) | def __init__(self, name: str, d_type: str, major_minor: str) -> None:
method with_dependencies (line 49) | def with_dependencies(self, dependencies: Iterable[BlockDevice]) -> Self:
method initialize_partition_tables_using (line 54) | def initialize_partition_tables_using(
method is_matched_with (line 72) | def is_matched_with(self, name: str) -> bool:
method has_physical_partition_table (line 86) | def has_physical_partition_table(self) -> bool:
method has_live_partition_table (line 89) | def has_live_partition_table(self) -> bool:
method has_esp (line 92) | def has_esp(self) -> bool:
method has_root (line 95) | def has_root(self) -> bool:
method has_boot (line 98) | def has_boot(self) -> bool:
method try_parse_major_minor (line 102) | def try_parse_major_minor(value: str) -> Union[list[int], list[None]]:
method name (line 111) | def name(self) -> str:
method d_type (line 115) | def d_type(self) -> str:
method major_number (line 119) | def major_number(self) -> Optional[int]:
method minor_number (line 123) | def minor_number(self) -> Optional[int]:
method physical_partition_table (line 127) | def physical_partition_table(
method live_partition_table (line 133) | def live_partition_table(
method dependencies (line 139) | def dependencies(self) -> Optional[list[BlockDevice]]:
method esp (line 143) | def esp(self) -> Optional[Partition]:
method root (line 150) | def root(self) -> Optional[Partition]:
method boot (line 157) | def boot(self) -> Optional[Partition]:
FILE: src/refind_btrfs/device/filesystem.py
class Filesystem (line 36) | class Filesystem:
method __init__ (line 37) | def __init__(self, uuid: str, label: str, fs_type: str, mount_point: s...
method with_dump_and_fsck (line 47) | def with_dump_and_fsck(self, dump: int, fsck: int) -> Self:
method with_mount_options (line 53) | def with_mount_options(self, raw_mount_options: str) -> Self:
method initialize_subvolume_using (line 62) | def initialize_subvolume_using(
method is_of_type (line 75) | def is_of_type(self, fs_type: str) -> bool:
method is_mounted (line 78) | def is_mounted(self) -> bool:
method is_mounted_at (line 81) | def is_mounted_at(self, path: Path) -> bool:
method has_subvolume (line 84) | def has_subvolume(self) -> bool:
method uuid (line 88) | def uuid(self) -> str:
method label (line 92) | def label(self) -> str:
method fs_type (line 96) | def fs_type(self) -> str:
method mount_point (line 100) | def mount_point(self) -> str:
method dump (line 104) | def dump(self) -> Optional[int]:
method fsck (line 108) | def fsck(self) -> Optional[int]:
method mount_options (line 112) | def mount_options(self) -> Optional[MountOptions]:
method subvolume (line 116) | def subvolume(self) -> Optional[Subvolume]:
FILE: src/refind_btrfs/device/mount_options.py
class MountOptions (line 38) | class MountOptions:
method __init__ (line 39) | def __init__(self, raw_mount_options: str) -> None:
method __str__ (line 72) | def __str__(self) -> str:
method is_matched_with (line 94) | def is_matched_with(self, subvolume: Subvolume) -> bool:
method migrate_from_to (line 118) | def migrate_from_to(
method simple_options (line 155) | def simple_options(self) -> list[str]:
method parameterized_options (line 159) | def parameterized_options(self) -> dict[str, str]:
FILE: src/refind_btrfs/device/partition.py
class Partition (line 42) | class Partition:
method __init__ (line 43) | def __init__(self, uuid: str, name: str, label: str) -> None:
method __eq__ (line 51) | def __eq__(self, other: object) -> bool:
method __hash__ (line 60) | def __hash__(self) -> int:
method with_part_type (line 63) | def with_part_type(self, part_type: str) -> Self:
method with_filesystem (line 69) | def with_filesystem(self, filesystem: Filesystem) -> Self:
method is_esp (line 74) | def is_esp(self, uuid: UUID) -> bool:
method is_root (line 96) | def is_root(self) -> bool:
method is_boot (line 106) | def is_boot(self) -> bool:
method search_paths_for (line 116) | def search_paths_for(self, filename: str) -> Optional[list[Path]]:
method uuid (line 131) | def uuid(self) -> str:
method name (line 135) | def name(self) -> str:
method label (line 139) | def label(self) -> str:
method part_type_code (line 143) | def part_type_code(self) -> Optional[int]:
method part_type_uuid (line 147) | def part_type_uuid(self) -> Optional[UUID]:
method filesystem (line 151) | def filesystem(self) -> Optional[Filesystem]:
FILE: src/refind_btrfs/device/partition_table.py
class PartitionTable (line 42) | class PartitionTable:
method __init__ (line 43) | def __init__(self, uuid: str, pt_type: str) -> None:
method __eq__ (line 50) | def __eq__(self, other: object) -> bool:
method __hash__ (line 59) | def __hash__(self) -> int:
method with_esp_uuid (line 62) | def with_esp_uuid(self, esp_uuid: UUID) -> Self:
method with_fstab_file_path (line 67) | def with_fstab_file_path(self, fstab_file_path: Path) -> Self:
method with_partitions (line 72) | def with_partitions(self, partitions: Iterable[Partition]) -> Self:
method is_matched_with (line 77) | def is_matched_with(self, subvolume: Subvolume) -> bool:
method has_partitions (line 88) | def has_partitions(self) -> bool:
method migrate_from_to (line 91) | def migrate_from_to(
method transform_fstab_line (line 103) | def transform_fstab_line(self, fstab_line: str) -> str:
method is_valid_fstab_entry (line 132) | def is_valid_fstab_entry(value: Optional[str]) -> bool:
method uuid (line 150) | def uuid(self) -> str:
method pt_type (line 154) | def pt_type(self) -> str:
method esp_uuid (line 158) | def esp_uuid(self) -> UUID:
method fstab_file_path (line 162) | def fstab_file_path(self) -> Optional[Path]:
method partitions (line 166) | def partitions(self) -> Optional[list[Partition]]:
method esp (line 170) | def esp(self) -> Optional[Partition]:
method root (line 181) | def root(self) -> Optional[Partition]:
method boot (line 192) | def boot(self) -> Optional[Partition]:
FILE: src/refind_btrfs/device/subvolume.py
class NumIdRelation (line 52) | class NumIdRelation(NamedTuple):
class UuidRelation (line 57) | class UuidRelation(NamedTuple):
class Subvolume (line 62) | class Subvolume:
method __init__ (line 63) | def __init__(
method __eq__ (line 86) | def __eq__(self, other: object) -> bool:
method __hash__ (line 95) | def __hash__(self) -> int:
method __lt__ (line 98) | def __lt__(self, other: object) -> bool:
method with_boot_files_check_result (line 111) | def with_boot_files_check_result(self, boot_stanza: BootStanza) -> Self:
method with_snapshots (line 146) | def with_snapshots(self, snapshots: Iterable[Subvolume]) -> Self:
method as_named (line 151) | def as_named(self) -> Self:
method as_located_in (line 169) | def as_located_in(self, parent_directory: Path) -> Self:
method as_writable (line 179) | def as_writable(self) -> Self:
method as_newly_created_from (line 184) | def as_newly_created_from(self, other: Subvolume) -> Self:
method to_destination (line 194) | def to_destination(self, directory: Path) -> Self:
method initialize_partition_table_using (line 209) | def initialize_partition_table_using(
method is_named (line 219) | def is_named(self) -> bool:
method is_snapshot (line 222) | def is_snapshot(self) -> bool:
method is_snapshot_of (line 225) | def is_snapshot_of(self, subvolume: Subvolume) -> bool:
method is_located_in (line 228) | def is_located_in(self, parent_directory: Path) -> bool:
method is_newly_created (line 243) | def is_newly_created(self) -> bool:
method is_static_partition_table_matched_with (line 246) | def is_static_partition_table_matched_with(self, subvolume: Subvolume)...
method has_static_partition_table (line 254) | def has_static_partition_table(self) -> bool:
method has_unmatched_boot_files (line 257) | def has_unmatched_boot_files(self) -> bool:
method has_snapshots (line 265) | def has_snapshots(self) -> bool:
method can_be_added (line 268) | def can_be_added(self, comparison_iterable: Iterable[Subvolume]) -> bool:
method can_be_removed (line 277) | def can_be_removed(
method select_snapshots (line 290) | def select_snapshots(self, count: int) -> Optional[list[Subvolume]]:
method modify_partition_table_using (line 298) | def modify_partition_table_using(
method validate_static_partition_table (line 313) | def validate_static_partition_table(self, subvolume: Subvolume) -> None:
method validate_boot_files_check_result (line 337) | def validate_boot_files_check_result(self) -> None:
method name (line 351) | def name(self) -> Optional[str]:
method filesystem_path (line 355) | def filesystem_path(self) -> Path:
method logical_path (line 359) | def logical_path(self) -> str:
method time_created (line 363) | def time_created(self) -> datetime:
method uuid (line 367) | def uuid(self) -> UUID:
method parent_uuid (line 371) | def parent_uuid(self) -> UUID:
method num_id (line 375) | def num_id(self) -> int:
method parent_num_id (line 379) | def parent_num_id(self) -> int:
method is_read_only (line 383) | def is_read_only(self) -> bool:
method created_from (line 387) | def created_from(self) -> Optional[Subvolume]:
method static_partition_table (line 391) | def static_partition_table(self) -> Optional[PartitionTable]:
method boot_files_check_result (line 395) | def boot_files_check_result(self) -> Optional[BootFilesCheckResult]:
method snapshots (line 399) | def snapshots(self) -> Optional[Set[Subvolume]]:
FILE: src/refind_btrfs/service/snapshot_event_handler.py
class SnapshotEventHandler (line 58) | class SnapshotEventHandler(FileSystemEventHandler, ConfigurableMixin):
method __init__ (line 60) | def __init__(
method on_created (line 78) | def on_created(self, event: FileSystemEvent) -> None:
method on_deleted (line 96) | def on_deleted(self, event: FileSystemEvent) -> None:
method _is_snapshot_created (line 118) | def _is_snapshot_created(self, created_directory: Path) -> bool:
method _is_snapshot_deleted (line 138) | def _is_snapshot_deleted(self, deleted_directory: Path) -> bool:
method _is_or_contains_snapshot (line 173) | def _is_or_contains_snapshot(
FILE: src/refind_btrfs/service/snapshot_observer.py
class SnapshotObserver (line 33) | class SnapshotObserver(CheckableObserver):
method __init__ (line 35) | def __init__(self, logger_factory: BaseLoggerFactory):
method run (line 40) | def run(self) -> None:
FILE: src/refind_btrfs/service/watchdog_runner.py
class WatchdogRunner (line 43) | class WatchdogRunner(BaseRunner):
method __init__ (line 45) | def __init__(
method run (line 60) | def run(self) -> int:
method _terminate (line 127) | def _terminate(self, signal_number: int, frame: Optional[FrameType]) -...
FILE: src/refind_btrfs/state_management/conditions.py
class Conditions (line 49) | class Conditions:
method __init__ (line 50) | def __init__(self, logger_factory: BaseLoggerFactory, model: Model) ->...
method check_filtered_block_devices (line 54) | def check_filtered_block_devices(self) -> bool:
method check_root_subvolume (line 99) | def check_root_subvolume(self) -> bool:
method check_matched_boot_stanzas (line 140) | def check_matched_boot_stanzas(self) -> bool:
method check_prepared_snapshots (line 196) | def check_prepared_snapshots(self) -> bool:
method check_boot_stanzas_with_snapshots (line 231) | def check_boot_stanzas_with_snapshots(self) -> bool:
FILE: src/refind_btrfs/state_management/model.py
class BlockDevices (line 53) | class BlockDevices(NamedTuple):
method none (line 59) | def none(cls) -> Self:
class PreparedSnapshots (line 63) | class PreparedSnapshots(NamedTuple):
method has_changes (line 67) | def has_changes(self) -> bool:
class BootStanzaWithSnapshots (line 73) | class BootStanzaWithSnapshots(NamedTuple):
method has_matched_snapshots (line 79) | def has_matched_snapshots(self) -> bool:
method has_unmatched_snapshots (line 82) | def has_unmatched_snapshots(self) -> bool:
method is_usable (line 85) | def is_usable(self) -> bool:
method replace_matched_snapshot (line 88) | def replace_matched_snapshot(
class ProcessingResult (line 96) | class ProcessingResult(NamedTuple):
method none (line 100) | def none(cls) -> Self:
method has_bootable_snapshots (line 103) | def has_bootable_snapshots(self) -> bool:
class Model (line 110) | class Model(ConfigurableMixin):
method __init__ (line 112) | def __init__(
method initialize_block_devices (line 137) | def initialize_block_devices(self) -> None:
method initialize_root_subvolume (line 165) | def initialize_root_subvolume(self) -> None:
method initialize_matched_boot_stanzas (line 172) | def initialize_matched_boot_stanzas(self) -> None:
method initialize_prepared_snapshots (line 189) | def initialize_prepared_snapshots(self) -> None:
method combine_boot_stanzas_with_snapshots (line 233) | def combine_boot_stanzas_with_snapshots(self) -> None:
method process_changes (line 273) | def process_changes(self) -> None:
method _process_snapshots (line 283) | def _process_snapshots(self) -> list[Subvolume]:
method _process_boot_stanzas (line 324) | def _process_boot_stanzas(self) -> None:
method _should_include_paths_during_generation (line 347) | def _should_include_paths_during_generation(self) -> bool:
method _should_include_sub_menus_during_generation (line 355) | def _should_include_sub_menus_during_generation(self) -> bool:
method conditions (line 361) | def conditions(self) -> list[Callable[[], bool]]:
method refind_config (line 376) | def refind_config(self) -> RefindConfig:
method esp_device (line 383) | def esp_device(self) -> Optional[BlockDevice]:
method esp (line 387) | def esp(self) -> Partition:
method root_device (line 393) | def root_device(self) -> Optional[BlockDevice]:
method root_partition (line 397) | def root_partition(self) -> Partition:
method root_subvolume (line 403) | def root_subvolume(self) -> Subvolume:
method boot_device (line 410) | def boot_device(self) -> Optional[BlockDevice]:
method matched_boot_stanzas (line 414) | def matched_boot_stanzas(self) -> list[BootStanza]:
method usable_boot_stanzas (line 418) | def usable_boot_stanzas(self) -> list[BootStanza]:
method prepared_snapshots (line 428) | def prepared_snapshots(self) -> PreparedSnapshots:
method destination_snapshots (line 432) | def destination_snapshots(self) -> set[Subvolume]:
method usable_snapshots_for_addition (line 442) | def usable_snapshots_for_addition(self) -> list[Subvolume]:
method actual_bootable_snapshots (line 454) | def actual_bootable_snapshots(self) -> list[Subvolume]:
method boot_stanzas_with_snapshots (line 471) | def boot_stanzas_with_snapshots(self) -> list[BootStanzaWithSnapshots]:
method usable_boot_stanzas_with_snapshots (line 475) | def usable_boot_stanzas_with_snapshots(self) -> dict[BootStanza, list[...
FILE: src/refind_btrfs/state_management/refind_btrfs_machine.py
class RefindBtrfsMachine (line 45) | class RefindBtrfsMachine(Machine):
method __init__ (line 47) | def __init__(
method run (line 94) | def run(self) -> bool:
FILE: src/refind_btrfs/system/btrfsutil_command.py
class BtrfsUtilCommand (line 44) | class BtrfsUtilCommand(SubvolumeCommand, ConfigurableMixin):
method __init__ (line 45) | def __init__(
method get_subvolume_from (line 55) | def get_subvolume_from(self, filesystem_path: Path) -> Optional[Subvol...
method get_all_source_snapshots_for (line 105) | def get_all_source_snapshots_for(self, parent: Subvolume) -> Iterator[...
method get_all_destination_snapshots (line 136) | def get_all_destination_snapshots(self) -> Iterator[Subvolume]:
method get_bootable_snapshot_from (line 143) | def get_bootable_snapshot_from(self, source: Subvolume) -> Subvolume:
method delete_snapshot (line 157) | def delete_snapshot(self, snapshot: Subvolume) -> None:
method _search_for_snapshots_in (line 192) | def _search_for_snapshots_in(
method _modify_read_only_flag_for (line 244) | def _modify_read_only_flag_for(self, source: Subvolume) -> Subvolume:
method _create_writable_snapshot_from (line 264) | def _create_writable_snapshot_from(self, source: Subvolume) -> Subvolume:
FILE: src/refind_btrfs/system/command_factories.py
class SystemDeviceCommandFactory (line 46) | class SystemDeviceCommandFactory(BaseDeviceCommandFactory):
method __init__ (line 48) | def __init__(
method physical_device_command (line 56) | def physical_device_command(self) -> DeviceCommand:
method live_device_command (line 59) | def live_device_command(self) -> DeviceCommand:
method static_device_command (line 62) | def static_device_command(self) -> DeviceCommand:
class BtrfsUtilSubvolumeCommandFactory (line 66) | class BtrfsUtilSubvolumeCommandFactory(BaseSubvolumeCommandFactory):
method __init__ (line 68) | def __init__(
method subvolume_command (line 76) | def subvolume_command(self) -> SubvolumeCommand:
class PillowIconCommandFactory (line 80) | class PillowIconCommandFactory(BaseIconCommandFactory):
method __init__ (line 82) | def __init__(self, logger_factory: BaseLoggerFactory) -> None:
method icon_command (line 85) | def icon_command(self) -> IconCommand:
FILE: src/refind_btrfs/system/findmnt_command.py
class FindmntCommand (line 50) | class FindmntCommand(DeviceCommand):
method __init__ (line 51) | def __init__(self, logger_factory: BaseLoggerFactory) -> None:
method get_block_devices (line 54) | def get_block_devices(self) -> Iterator[BlockDevice]:
method save_partition_table (line 61) | def save_partition_table(self, partition_table: PartitionTable) -> None:
method _block_device_partition_table (line 67) | def _block_device_partition_table(
method _subvolume_partition_table (line 127) | def _subvolume_partition_table(self, subvolume: Subvolume) -> Partitio...
method _map_to_partitions (line 134) | def _map_to_partitions(
FILE: src/refind_btrfs/system/fstab_command.py
class FstabCommand (line 46) | class FstabCommand(DeviceCommand):
method __init__ (line 47) | def __init__(self, logger_factory: BaseLoggerFactory) -> None:
method get_block_devices (line 50) | def get_block_devices(self) -> Iterator[BlockDevice]:
method _block_device_partition_table (line 56) | def _block_device_partition_table(
method save_partition_table (line 64) | def save_partition_table(self, partition_table: PartitionTable) -> None:
method _subvolume_partition_table (line 84) | def _subvolume_partition_table(self, subvolume: Subvolume) -> Partitio...
method _map_to_partitions (line 113) | def _map_to_partitions(
FILE: src/refind_btrfs/system/lsblk_command.py
class LsblkCommand (line 51) | class LsblkCommand(DeviceCommand, ConfigurableMixin):
method __init__ (line 52) | def __init__(
method get_block_devices (line 61) | def get_block_devices(self) -> Iterator[BlockDevice]:
method save_partition_table (line 99) | def save_partition_table(self, partition_table: PartitionTable) -> None:
method _block_device_partition_table (line 105) | def _block_device_partition_table(
method _subvolume_partition_table (line 173) | def _subvolume_partition_table(self, subvolume: Subvolume) -> Partitio...
method _map_to_block_devices (line 180) | def _map_to_block_devices(
method _map_to_partitions (line 205) | def _map_to_partitions(
FILE: src/refind_btrfs/system/pillow_command.py
class PillowCommand (line 37) | class PillowCommand(IconCommand):
method __init__ (line 38) | def __init__(
method validate_custom_icon (line 60) | def validate_custom_icon(
method embed_btrfs_logo_into_source_icon (line 106) | def embed_btrfs_logo_into_source_icon(
method _discern_source_icon_absolute_path (line 232) | def _discern_source_icon_absolute_path(
method _discern_destination_icon_relative_path (line 247) | def _discern_destination_icon_relative_path(
method _discern_absolute_paths_for_btrfs_logo_embedding (line 264) | def _discern_absolute_paths_for_btrfs_logo_embedding(
FILE: src/refind_btrfs/utility/file_package_config_provider.py
class FilePackageConfigProvider (line 83) | class FilePackageConfigProvider(BasePackageConfigProvider):
method __init__ (line 109) | def __init__(
method get_config (line 118) | def get_config(self) -> PackageConfig:
method _read_config_from (line 167) | def _read_config_from(toml_document: TOMLDocument):
method _map_to_snapshot_searches (line 266) | def _map_to_snapshot_searches(
method _map_to_snapshot_manipulation (line 313) | def _map_to_snapshot_manipulation(
method _map_to_boot_stanza_generation (line 414) | def _map_to_boot_stanza_generation(
method _map_to_icon (line 474) | def _map_to_icon(icon_value: Table, default_icon: Icon) -> Icon:
method _map_to_btrfs_logo (line 519) | def _map_to_btrfs_logo(
method _get_config_value (line 571) | def _get_config_value(
FILE: src/refind_btrfs/utility/helpers.py
function check_access_rights (line 43) | def check_access_rights() -> None:
function try_parse_int (line 50) | def try_parse_int(value: str, base: int = 10) -> Optional[int]:
function try_parse_uuid (line 57) | def try_parse_uuid(value: str) -> Optional[UUID]:
function try_convert_str_to_enum (line 64) | def try_convert_str_to_enum(value: str, enum_type: Type[Enum]) -> Option...
function try_convert_bytes_to_uuid (line 74) | def try_convert_bytes_to_uuid(value: bytes) -> Optional[UUID]:
function is_empty (line 81) | def is_empty(value: Optional[str]) -> bool:
function is_none_or_whitespace (line 88) | def is_none_or_whitespace(value: Optional[str]) -> bool:
function strip_quotes (line 95) | def strip_quotes(value: Optional[str]) -> str:
function has_method (line 106) | def has_method(obj: Any, method_name: str) -> bool:
function has_items (line 115) | def has_items(value: Optional[Sized]) -> bool:
function is_singleton (line 119) | def is_singleton(value: Optional[Sized]) -> bool:
function item_count_suffix (line 123) | def item_count_suffix(value: Sized) -> str:
function find_all_matched_files_in (line 131) | def find_all_matched_files_in(root_directory: Path, filename: str) -> It...
function find_all_directories_in (line 143) | def find_all_directories_in(
function discern_path_relation_of (line 160) | def discern_path_relation_of(path_pair: tuple[Path, Path]) -> PathRelation:
function discern_distance_between (line 180) | def discern_distance_between(path_pair: tuple[Path, Path]) -> Optional[i...
function normalize_dir_separators_in (line 211) | def normalize_dir_separators_in(
function replace_root_part_in (line 230) | def replace_root_part_in(
function replace_item_in (line 250) | def replace_item_in(
function none_throws (line 265) | def none_throws(value: Optional[TParam], message: str = "Unexpected 'Non...
function default_if_none (line 272) | def default_if_none(value: Optional[TParam], default: TParam) -> TParam:
function checked_cast (line 279) | def checked_cast(destination_type: Type[TParam], value: Any) -> TParam:
FILE: src/refind_btrfs/utility/injector_modules.py
class CommonModule (line 60) | class CommonModule(Module):
method configure (line 61) | def configure(self, binder: Binder) -> None:
method provide_states (line 80) | def provide_states(self, model: Model) -> States:
method _get_all_states_for (line 83) | def _get_all_states_for(self, model: Model) -> Iterator[State]:
class WatchdogModule (line 94) | class WatchdogModule(CommonModule):
method configure (line 95) | def configure(self, binder: Binder) -> None:
class CLIModule (line 104) | class CLIModule(CommonModule):
method configure (line 105) | def configure(self, binder: Binder) -> None:
FILE: src/refind_btrfs/utility/level_aware_formatter.py
class LevelAwareFormatter (line 30) | class LevelAwareFormatter(Formatter):
method format (line 31) | def format(self, record: LogRecord) -> str:
FILE: src/refind_btrfs/utility/logger_factories.py
class NullLoggerFactory (line 32) | class NullLoggerFactory(BaseLoggerFactory):
method get_handler (line 33) | def get_handler(self) -> Handler:
class StreamLoggerFactory (line 37) | class StreamLoggerFactory(BaseLoggerFactory):
method get_handler (line 38) | def get_handler(self) -> Handler:
class SystemdLoggerFactory (line 42) | class SystemdLoggerFactory(BaseLoggerFactory):
method get_handler (line 43) | def get_handler(self) -> Handler:
FILE: src/refind_btrfs/utility/shelve_persistence_provider.py
class ShelvePersistenceProvider (line 41) | class ShelvePersistenceProvider(BasePersistenceProvider):
method __init__ (line 42) | def __init__(self) -> None:
method get_package_config (line 52) | def get_package_config(self) -> Optional[PackageConfig]:
method save_package_config (line 66) | def save_package_config(self, value: PackageConfig) -> None:
method get_refind_config (line 72) | def get_refind_config(self, file_path: Path) -> Optional[RefindConfig]:
method save_refind_config (line 92) | def save_refind_config(self, value: RefindConfig) -> None:
method get_previous_run_result (line 109) | def get_previous_run_result(self) -> ProcessingResult:
method save_current_run_result (line 120) | def save_current_run_result(self, value: ProcessingResult) -> None:
method _get_item (line 126) | def _get_item(self, value_key: str, local_db: Shelf) -> Optional[Any]:
method _save_item (line 138) | def _save_item(self, item: TItem, value_key: str, local_db: Shelf) -> ...
Condensed preview — 95 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (561K chars).
[
{
"path": ".gitignore",
"chars": 2211,
"preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packagi"
},
{
"path": ".pylintrc",
"chars": 18441,
"preview": "[MASTER]\n\n# A comma-separated list of package or module names from where C extensions may\n# be loaded. Extensions are lo"
},
{
"path": ".vscode/launch.json",
"chars": 509,
"preview": "{\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"name\": \"Python: Module\",\n \"type\": \"d"
},
{
"path": ".vscode/settings.json",
"chars": 2138,
"preview": "{\n \"antlr4.generation\": {\n \"alternativeJar\": \"C:\\\\Users\\\\Luka\\\\Projects\\\\Python\\\\antlr-4.13.1-complete.jar\",\n "
},
{
"path": "LICENSE.txt",
"chars": 35149,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "MANIFEST.in",
"chars": 254,
"preview": "include pyproject.toml\ninclude *.md\ninclude LICENSE.txt\n\n# Include ANTLR generated files\nrecursive-include src/refind_bt"
},
{
"path": "README.md",
"chars": 27562,
"preview": "# refind-btrfs\n\n### Table of Contents\n - [Description](#description)\n - [Prerequisites](#prerequisites)\n - [Installat"
},
{
"path": "pyproject.toml",
"chars": 90,
"preview": "[build-system]\nrequires = [\"setuptools\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n"
},
{
"path": "setup.cfg",
"chars": 1279,
"preview": "[metadata]\nname = refind_btrfs\nversion = 0.6.5\ndescription = Generate rEFInd manual boot stanzas from Btrfs snapshots\nlo"
},
{
"path": "setup.py",
"chars": 2315,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/__init__.py",
"chars": 2917,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/__main__.py",
"chars": 960,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/boot/__init__.py",
"chars": 1024,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/boot/antlr4/RefindConfigLexer.g4",
"chars": 3463,
"preview": "/*\nSPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n\nSPDX-License-Identifier: GPL-3.0-or-later\n\nre"
},
{
"path": "src/refind_btrfs/boot/antlr4/RefindConfigLexer.interp",
"chars": 33493,
"preview": "token literal names:\nnull\nnull\nnull\nnull\nnull\nnull\nnull\n'volume'\n'loader'\n'initrd'\n'icon'\nnull\nnull\n'options'\n'add_optio"
},
{
"path": "src/refind_btrfs/boot/antlr4/RefindConfigLexer.py",
"chars": 29691,
"preview": "# Generated from c:/Users/Luka/Projects/Python/refind-btrfs/src/refind_btrfs/boot/antlr4/RefindConfigLexer.g4 by ANTLR 4"
},
{
"path": "src/refind_btrfs/boot/antlr4/RefindConfigLexer.tokens",
"chars": 441,
"preview": "WHITESPACE=1\nNEWLINE=2\nEMPTY=3\nCOMMENT=4\nIGNORED_OPTION=5\nMENU_ENTRY=6\nVOLUME=7\nLOADER=8\nINITRD=9\nICON=10\nOS_TYPE=11\nGRA"
},
{
"path": "src/refind_btrfs/boot/antlr4/RefindConfigParser.g4",
"chars": 1974,
"preview": "/*\nSPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n\nSPDX-License-Identifier: GPL-3.0-or-later\n\nre"
},
{
"path": "src/refind_btrfs/boot/antlr4/RefindConfigParser.interp",
"chars": 4566,
"preview": "token literal names:\nnull\nnull\nnull\nnull\nnull\nnull\nnull\n'volume'\n'loader'\n'initrd'\n'icon'\nnull\nnull\n'options'\n'add_optio"
},
{
"path": "src/refind_btrfs/boot/antlr4/RefindConfigParser.py",
"chars": 40976,
"preview": "# Generated from c:/Users/Luka/Projects/Python/refind-btrfs/src/refind_btrfs/boot/antlr4/RefindConfigParser.g4 by ANTLR "
},
{
"path": "src/refind_btrfs/boot/antlr4/RefindConfigParser.tokens",
"chars": 441,
"preview": "WHITESPACE=1\nNEWLINE=2\nEMPTY=3\nCOMMENT=4\nIGNORED_OPTION=5\nMENU_ENTRY=6\nVOLUME=7\nLOADER=8\nINITRD=9\nICON=10\nOS_TYPE=11\nGRA"
},
{
"path": "src/refind_btrfs/boot/antlr4/RefindConfigParserVisitor.py",
"chars": 4100,
"preview": "# Generated from c:/Users/Luka/Projects/Python/refind-btrfs/src/refind_btrfs/boot/antlr4/RefindConfigParser.g4 by ANTLR "
},
{
"path": "src/refind_btrfs/boot/antlr4/__init__.py",
"chars": 1045,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/boot/boot_options.py",
"chars": 8618,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/boot/boot_stanza.py",
"chars": 14209,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/boot/file_refind_config_provider.py",
"chars": 13873,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/boot/migrations/__init__.py",
"chars": 913,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/boot/migrations/icon_migration_strategies.py",
"chars": 4203,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/boot/migrations/main_migration_strategies.py",
"chars": 12299,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/boot/migrations/migration.py",
"chars": 6564,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/boot/migrations/state.py",
"chars": 1176,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/boot/refind_config.py",
"chars": 7096,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/boot/refind_listeners.py",
"chars": 1206,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/boot/refind_visitors.py",
"chars": 12093,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/boot/sub_menu.py",
"chars": 6105,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/__init__.py",
"chars": 1186,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/__init__.py",
"chars": 952,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/base_config.py",
"chars": 3367,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/base_runner.py",
"chars": 1000,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/commands/__init__.py",
"chars": 1008,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/commands/device_command.py",
"chars": 2171,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/commands/icon_command.py",
"chars": 1353,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/commands/subvolume_command.py",
"chars": 1590,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/factories/__init__.py",
"chars": 1131,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/factories/base_device_command_factory.py",
"chars": 1347,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/factories/base_icon_command_factory.py",
"chars": 1156,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/factories/base_logger_factory.py",
"chars": 1595,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/factories/base_subvolume_command_factory.py",
"chars": 1176,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/providers/__init__.py",
"chars": 1077,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/providers/base_package_config_provider.py",
"chars": 1170,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/providers/base_persistence_provider.py",
"chars": 1842,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/abc/providers/base_refind_config_provider.py",
"chars": 1420,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/boot_files_check_result.py",
"chars": 1245,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/checkable_observer.py",
"chars": 1350,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/configurable_mixin.py",
"chars": 1445,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/constants.py",
"chars": 3172,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/enums.py",
"chars": 5228,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/exceptions.py",
"chars": 2526,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/common/package_config.py",
"chars": 4913,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/console/__init__.py",
"chars": 914,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/console/cli_runner.py",
"chars": 1931,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/data/refind-btrfs",
"chars": 55,
"preview": "#!/bin/bash\npython -m refind_btrfs --run-mode one-time\n"
},
{
"path": "src/refind_btrfs/data/refind-btrfs.conf-sample",
"chars": 9306,
"preview": "#######################\n## refind-btrfs.conf ##\n#######################\n\n# TOML syntax\n\n# esp_uuid = <string>\n## Explici"
},
{
"path": "src/refind_btrfs/data/refind-btrfs.service",
"chars": 331,
"preview": "[Unit]\nDescription=Generate rEFInd manual boot stanzas from Btrfs snapshots\nAfter=multi-user.target\nBefore=snapper-boot."
},
{
"path": "src/refind_btrfs/device/__init__.py",
"chars": 1132,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/device/block_device.py",
"chars": 4889,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/device/filesystem.py",
"chars": 3599,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/device/mount_options.py",
"chars": 6225,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/device/partition.py",
"chars": 4273,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/device/partition_table.py",
"chars": 6148,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/device/subvolume.py",
"chars": 13250,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/service/__init__.py",
"chars": 1029,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/service/snapshot_event_handler.py",
"chars": 6985,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/service/snapshot_observer.py",
"chars": 1883,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/service/watchdog_runner.py",
"chars": 4954,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/state_management/__init__.py",
"chars": 966,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/state_management/conditions.py",
"chars": 9981,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/state_management/model.py",
"chars": 17903,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/state_management/refind_btrfs_machine.py",
"chars": 3452,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/system/__init__.py",
"chars": 1015,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/system/btrfsutil_command.py",
"chars": 12204,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/system/command_factories.py",
"chars": 2909,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/system/findmnt_command.py",
"chars": 6236,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/system/fstab_command.py",
"chars": 5432,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/system/lsblk_command.py",
"chars": 8898,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/system/pillow_command.py",
"chars": 12128,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/utility/__init__.py",
"chars": 935,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/utility/file_package_config_provider.py",
"chars": 21751,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/utility/helpers.py",
"chars": 7834,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/utility/injector_modules.py",
"chars": 3910,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/utility/level_aware_formatter.py",
"chars": 1466,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/utility/logger_factories.py",
"chars": 1415,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "src/refind_btrfs/utility/shelve_persistence_provider.py",
"chars": 5367,
"preview": "# region Licensing\n# SPDX-FileCopyrightText: 2020-2024 Luka Žaja <luka.zaja@protonmail.com>\n#\n# SPDX-License-Identifier:"
},
{
"path": "tests/.keep",
"chars": 0,
"preview": ""
}
]
// ... and 1 more files (download for full content)
About this extraction
This page contains the full source code of the Venom1991/refind-btrfs GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 95 files (525.9 KB), approximately 156.9k tokens, and a symbol index with 762 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.