@@ -71,9 +71,9 @@ class clr():
MAGENTA = ' \033 [35m '
CYAN = ' \033 [36m '
WHITE = ' \033 [37m '
GREY = ' \033 [90m '
UNDERLINE = ' \033 [4m '
RESET = ' \033 [0m '
GREY = ' \033 [90m '
# #
# Pages
@@ -81,12 +81,14 @@ class clr():
# these must be configured to a valid page path; otherwise the script will error
# #
PAGE_CHANGELOG = " resources /changelog.md"
PAGE_BACKERS = " resources /backers.md"
PAGE_CONVENTIONS = " resources /conventions.md"
PAGE_CHANGELOG = " about /changelog.md"
PAGE_BACKERS = " about /backers.md"
PAGE_CONVENTIONS = " about /conventions.md"
# #
# Hooks > on_page_markdown
#
# do not change this function name
# #
def on_page_markdown ( markdown : str , * , page : Page , config : MkDocsConfig , files : Files ) :
@@ -99,28 +101,28 @@ def on_page_markdown(markdown: str, *, page: Page, config: MkDocsConfig, files:
args = args . strip ( )
if type == " version " :
if args . startswith ( " beta -" ) :
return Version_Beta ( args , page , files )
if args . startswith ( " development -" ) :
return Version_Development ( args , page , files )
elif args . startswith ( " stable- " ) :
return Version_Stable ( args , page , files )
else :
return Version ( args , page , files )
elif type == " backers " : return B adge_Backers ( page , files )
elif type == " control " : return Create_Control ( args , page , files )
elif type == " flag " : return Create_Flag ( args , page , file s)
elif type == " option " : return Create_Option ( args )
elif type == " setting " : return Create_Setting ( arg s)
elif type == " command " : return B adge_ Command( args , page , files )
elif type == " feature " : return B adge_ Feature( args , page , files )
elif type == " plugin " : return B adge_ Plugin( args , page , files )
elif type == " extensio n" : return B adge_Extensio n( args , page , files )
elif type == " 3rdparty " : return B adge_ 3rdp arty( args , page , files )
elif type == " example " : return B adge_ Example( args , page , files )
elif type == " control " : return b adgeControl ( args , page , files )
elif type == " flag " : return badgeFlag ( args , page , files )
elif type == " option " : return badgeOption ( arg s)
elif type == " setting " : return badgeSetting ( args )
elif type == " backers " : return badgeBackers ( page , file s)
elif type == " command " : return b adgeCommand( args , page , files )
elif type == " feature " : return b adgeFeature( args , page , files )
elif type == " plugin " : return b adgePlugin( args , page , files )
elif type == " markdow n" : return b adgeMarkdow n( args , page , files )
elif type == " 3rdparty " : return b adge3rdP arty( args , page , files )
elif type == " example " : return b adgeExample( args , page , files )
elif type == " default " :
if args == " none " : return B adge_ DefaultValue_ None( page , files )
elif args == " computed " : return B adge_ DefaultValue_Computed ( page , files )
else : return B adge_ DefaultValue_ Custom( args , page , files )
if args == " none " : return b adgeDefaultNone( page , files )
elif args == " computed " : return b adgeDefaultVal( page , files )
else : return b adgeDefaultCustom( args , page , files )
# Otherwise, raise an error
raise RuntimeError ( f " Error in shortcodes.yp - Specified an unknown shortcode: { type } " )
@@ -135,31 +137,35 @@ def on_page_markdown(markdown: str, *, page: Page, config: MkDocsConfig, files:
# Create > Flag
# #
def Create_ Flag( args : str , page : Page , files : Files ) :
def badge Flag( args : str , page : Page , files : Files ) :
type , * _ = args . split ( " " , 1 )
if type == " experimental " : return B adge_ Flag_ Experimental( page , files )
elif type == " required " : return B adge_ Flag_ Required( page , files )
elif type == " customization " : return B adge_ Flag_ Customization( page , files )
elif type == " metadata " : return B adge_ Flag_ Metadata( page , files )
elif type == " multiple " : return B adge_ Flag_Multiple_Instance s( page , files )
elif type == " setting " : return B adge_ Flag_Setting ( page , files )
if type == " experimental " : return b adgeFlagExperimental( page , files )
elif type == " required " : return b adgeFlagRequired( page , files )
elif type == " customization " : return b adgeFlagCustomization( page , files )
elif type == " metadata " : return b adgeFlagMetadata( page , files )
elif type == " dangerous " : return b adgeFlagDangerou s( page , files )
elif type == " multiple " : return b adgeFlagMultiInstances ( page , files )
elif type == " setting " : return badgeFlagSetting ( page , files )
else : return badgeFlagDefault ( page , files )
raise RuntimeError ( f " Unknown type: { type } " )
# #
# Create > Controls
# #
def Create_ Control( args : str , page : Page , files : Files ) :
def badge Control( args : str , page : Page , files : Files ) :
type , * _ = args . split ( " " , 2 )
if type == " toggle " : return icon_c ontrol_t oggle( page , files )
elif type == " toggle_on " : return icon_c ontrol_t oggle_o n( page , files )
elif type == " toggle_off " : return icon_c ontrol_t oggle_o ff( page , files )
elif type == " textbox " : return icon_c ontrol_t extbox( page , files )
elif type == " dropdown " : return icon_c ontrol_d ropdown( page , files )
elif type == " button " : return icon_c ontrol_b utton( page , files )
elif type == " slider " : return icon_c ontrol_s lider( page , files )
elif type == " color " : return icon_control_color ( args , page , files )
else : return icon_control_default ( page , files )
if type == " toggle " : return newC ontrolT oggle( page , files )
elif type == " toggle_on " : return newC ontrolT oggleO n( page , files )
elif type == " toggle_off " : return newC ontrolT oggleO ff( page , files )
elif type == " textbox " : return newC ontrolT extbox( page , files )
elif type == " dropdown " : return newC ontrolD ropdown( page , files )
elif type == " button " : return newC ontrolB utton( page , files )
elif type == " slider " : return newC ontrolS lider( page , files )
elif type == " env " : return newControlEnvVar ( page , files )
elif type == " color " : return newControlColor ( args , page , files )
else : return newControlDefault ( page , files )
raise RuntimeError ( f " Unknown type: { type } " )
@@ -167,15 +173,19 @@ def Create_Control( args: str, page: Page, files: Files ):
# Create > Option
# #
def Create_ Option( type : str ) :
def badge Option( type : str ) :
_ , * _ , name = re . split ( r " [.:] " , type )
return f " [` { name } `](#+ { type } ) {{ #+ { type } }} \n \n "
# #
# Create > Setting
#
# #### <!-- md:setting example.setting.enabled -->
# <!-- md:version 1.0.0 -->
# <!-- md:default `true` -->
# #
def Create_ Setting( type : str ) :
def badge Setting( type : str ) :
_ , * _ , name = re . split ( r " [.*] " , type )
return f " ` { name } ` {{ # { type } }} \n \n [ { type } ]: # { type } \n \n "
@@ -202,7 +212,7 @@ def _resolve(file: File, page: Page):
# Create > Badge
# #
def Create_Badg e ( icon : str , text : str = " " , type : str = " " ) :
def badge Create( icon : str , text : str = " " , type : str = " " ) :
classes = f " mdx-badge mdx-badge-- { type } " if type else " mdx-badge "
return " " . join ( [
f " <span class= \" { classes } \" > " ,
@@ -215,7 +225,7 @@ def Create_Badge(icon: str, text: str = "", type: str = ""):
# Badge > Color Palette
# #
def B adge_ ColorPalette( icon : str , text : str = " " , type : str = " " ) :
def b adgeColorPalette( icon : str , text : str = " " , type : str = " " ) :
args = type . split ( " " )
bg1_clr = " #000000 "
@@ -252,10 +262,10 @@ def Badge_ColorPalette(icon: str, text: str = "", type: str = ""):
# <!-- md:sponsors -->
# #
def B adge_ Backers( page : Page , files : Files ) :
def b adgeBackers( page : Page , files : Files ) :
icon = " material-heart "
href = _resolve_path ( PAGE_BACKERS , page , files )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Backers only ' ) " ,
type = " heart "
)
@@ -280,8 +290,8 @@ def Version( text: str, page: Page, files: Files ):
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
icon = f " [: { icon } :]( { href } ' Mkdocs Release' ) " ,
return badge Create(
icon = f " [: { icon } :]( { href } ' TVApp2 Release' ) " ,
text = f " [ { text } ]( { _resolve_path ( path , page , files ) } ) " if spec else " "
)
@@ -294,8 +304,8 @@ def Version_Stable( text: str, page: Page, files: Files ):
path = f " { PAGE_CHANGELOG } # { spec } "
# Return badge
icon = " aetherx-axs-tag "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #version-beta " , page , files )
icon = " aetherx-axs-tag "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #version-stable " , page , files )
output = " "
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
@@ -306,22 +316,22 @@ def Version_Stable( text: str, page: Page, files: Files ):
else :
output = f " Stable Release "
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' { output } ' ) " ,
text = f " [ { spec } ]( { _resolve_path ( path , page , files ) } ) " if spec else " "
)
# #
# Badge > Version > Beta
# Badge > Version > Development
# #
def Version_Beta ( text : str , page : Page , files : Files ) :
spec = text . replace ( " beta -" , " " )
def Version_Development ( text : str , page : Page , files : Files ) :
spec = text . replace ( " development -" , " " )
path = f " { PAGE_CHANGELOG } # { spec } "
# Return badge
icon = " aetherx-axs-b "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #version-beta " , page , files )
icon = " aetherx-axs-code "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #version-development " , page , files )
output = " "
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
@@ -330,9 +340,9 @@ def Version_Beta( text: str, page: Page, files: Files ):
if spec :
output = f " Requires version { spec } "
else :
output = f " Beta Release"
output = f " Development Release"
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' { output } ' ) " ,
text = f " [ { text } ]( { _resolve_path ( path , page , files ) } ) " if spec else " "
)
@@ -344,13 +354,13 @@ def Version_Beta( text: str, page: Page, files: Files ):
# <!-- md:feature -->
# #
def B adge_ Feature( text : str , page : Page , files : Files ) :
def b adgeFeature( text : str , page : Page , files : Files ) :
icon = " material-toggle-switch "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #feature " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Optional feature ' ) " ,
text = text
)
@@ -364,32 +374,32 @@ def Badge_Feature(text: str, page: Page, files: Files):
# <!-- md:plugin [typeset] – built-in -->
# #
def B adge_ Plugin( text : str , page : Page , files : Files ) :
def b adgePlugin( text : str , page : Page , files : Files ) :
icon = " material-floppy "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #plugin " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Plugin ' ) " ,
text = text
)
# #
# Create badge for extensio n
# Create badge for Markdow n
#
# use the following tag in your md file:
# <!-- md:extensio n [admonition][Admonition] -->
# <!-- md:markdow n [admonition][Admonition] -->
# #
def B adge_Extensio n( text : str , page : Page , files : Files ) :
def b adgeMarkdow n( text : str , page : Page , files : Files ) :
icon = " material-language-markdown "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #extensio n " , page , files )
href = _resolve_path ( f " { PAGE_CONVENTIONS } #markdow n " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
icon = f " [: { icon } :]( { href } ' Markdown extension ' ) " ,
return badge Create(
icon = f " [: { icon } :]( { href } ' Markdown functionality ' ) " ,
text = text
)
@@ -403,13 +413,13 @@ def Badge_Extension(text: str, page: Page, files: Files):
# <!-- md:3rdparty [mike] -->
# #
def B adge_ 3rdp arty( text : str , page : Page , files : Files ) :
def b adge3rdP arty( text : str , page : Page , files : Files ) :
icon = " material-package-variant "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #3rdparty " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Third-party utility ' ) " ,
text = text
)
@@ -433,30 +443,30 @@ def Badge_3rdparty(text: str, page: Page, files: Files):
# <!-- md:example my-example-file -->
# #
def B adge_ Example( text : str , page : Page , files : Files ) :
def b adgeExample( text : str , page : Page , files : Files ) :
return " \n " . join ( [
B adge_ Example_ Download_ Zip( text , page , files ) ,
B adge_ Example_ View( text , page , files )
b adgeExampleDownloadZip( text , page , files ) ,
b adgeExampleView( text , page , files )
] )
def B adge_ Example_ View( text : str , page : Page , files : Files ) :
def b adgeExampleView( text : str , page : Page , files : Files ) :
icon = " material-folder-eye "
href = f " https://github.com/TheBinaryNinja/tvapp2/ { text } / "
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' View example ' ) " ,
type = " right "
)
def B adge_ Example_ Download_ Zip( text : str , page : Page , files : Files ) :
def b adgeExampleDownloadZip( text : str , page : Page , files : Files ) :
icon = " material-folder-download "
href = f " https://github.com/TheBinaryNinja/tvapp2/ { text } .zip "
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Download example ' ) " ,
text = f " [`.zip`]( { href } ) " ,
type = " right "
@@ -471,15 +481,16 @@ def Badge_Example_Download_Zip(text: str, page: Page, files: Files):
# <!-- md:command `-s, --start` -->
# #
def B adge_ Command( text : str , page : Page , files : Files ) :
def b adgeCommand( text : str , page : Page , files : Files ) :
icon = " material-console-line "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #command " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Terminal / Console Command ' ) " ,
text = text
text = text ,
type = " command "
)
# #
@@ -494,13 +505,13 @@ def Badge_Command(text: str, page: Page, files: Files):
# <!-- md:default none -->
# #
def B adge_ DefaultValue_ Custom( text : str , page : Page , files : Files ) :
def b adgeDefaultCustom( text : str , page : Page , files : Files ) :
icon = " material-water "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #default " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Default value ' ) " ,
text = text
)
@@ -517,13 +528,13 @@ def Badge_DefaultValue_Custom(text: str, page: Page, files: Files):
# <!-- md:default none -->
# #
def B adge_ DefaultValue_ None( page : Page , files : Files ) :
def b adgeDefaultNone( page : Page , files : Files ) :
icon = " material-water-outline "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #default " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Default value is empty ' ) "
)
@@ -539,53 +550,127 @@ def Badge_DefaultValue_None(page: Page, files: Files):
# <!-- md:default none -->
# #
def B adge_ DefaultValue_Computed ( page : Page , files : Files ) :
def b adgeDefaultVal( page : Page , files : Files ) :
icon = " material-water-check "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #default " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Default value is computed ' ) "
)
# #
# Badge > Flag > Default
#
# This symbol denotes that the specified item is a customizable setting
#
# MUST add an entry in conventions.md
#
# use the following tag in your md file:
# : <!-- md:flag --> Default
# : <!-- md:flag experimental --> Experimental
# : <!-- md:flag required --> Required
# : <!-- md:flag customization --> Customization
# : <!-- md:flag metadata --> Metadata
# : <!-- md:flag dangerous --> Dangerous
# : <!-- md:flag multiple --> Multiple
# : <!-- md:flag setting --> Setting
# #
def badgeFlagDefault ( page : Page , files : Files ) :
icon = " material-flag "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #setting " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return badgeCreate (
icon = f " [: { icon } :]( { href } ' Configurable Setting ' ) "
)
# #
# Badge > Flag > Metadata Property
#
# This symbol denotes that the item described is a metadata property, which can
# be used in Markdown documents as part of the front matter definition.
#
# MUST add an entry in conventions.md
#
# use the following tag in your md file:
# <!-- md:flag metadata -->
# : <!-- md:flag --> Default
# : <!-- md:flag experimental --> Experimental
# : <!-- md:flag required --> Required
# : <!-- md:flag customization --> Customization
# : <!-- md:flag metadata --> Metadata
# : <!-- md:flag dangerous --> Dangerous
# : <!-- md:flag multiple --> Multiple
# : <!-- md:flag setting --> Setting
# #
def B adge_ Flag_ Metadata( page : Page , files : Files ) :
def b adgeFlagMetadata( page : Page , files : Files ) :
icon = " material-list-box-outline "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #metadata " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Metadata property ' ) "
)
# #
# Badge > Flag > Dangerous
#
# This symbol denotes that the item or setting specified may be dangerous to change.
#
# MUST add an entry in conventions.md
#
# use the following tag in your md file:
# : <!-- md:flag --> Default
# : <!-- md:flag experimental --> Experimental
# : <!-- md:flag required --> Required
# : <!-- md:flag customization --> Customization
# : <!-- md:flag metadata --> Metadata
# : <!-- md:flag dangerous --> Dangerous
# : <!-- md:flag multiple --> Multiple
# : <!-- md:flag setting --> Setting
# #
def badgeFlagDangerous ( page : Page , files : Files ) :
icon = " aetherx-axd-skull-crossbones "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #dangerous " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return badgeCreate (
icon = f " [: { icon } :]( { href } ' This setting is dangerous to change ' ) " ,
type = " dangerous "
)
# #
# Badge > Flag > Required
#
# Specifies that a value is required.
#
# MUST add an entry in conventions.md
#
# use the following tag in your md file:
# <!-- md:flag required -->
# <!-- md:flag required --> This option enables the content tabs
# : <!-- md:flag --> Default
# : <!-- md:flag experimental --> Experimental
# : <!-- md:flag required --> Required
# : <!-- md:flag customization --> Customization
# : <!-- md:flag metadata --> Metadata
# : <!-- md:flag dangerous --> Dangerous
# : <!-- md:flag multiple --> Multiple
# : <!-- md:flag setting --> Setting
# #
def B adge_ Flag_ Required( page : Page , files : Files ) :
def b adgeFlagRequired( page : Page , files : Files ) :
icon = " material-alert "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #required " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Required value ' ) "
)
@@ -594,17 +679,26 @@ def Badge_Flag_Required(page: Page, files: Files):
#
# This symbol denotes that the item described is a customization which affects the overall look of the app.
#
# MUST add an entry in conventions.md
#
# use the following tag in your md file:
# <!-- md:flag customization -->
# : <!-- md:flag --> Default
# : <!-- md:flag experimental --> Experimental
# : <!-- md:flag required --> Required
# : <!-- md:flag customization --> Customization
# : <!-- md:flag metadata --> Metadata
# : <!-- md:flag dangerous --> Dangerous
# : <!-- md:flag multiple --> Multiple
# : <!-- md:flag setting --> Setting
# #
def B adge_ Flag_ Customization( page : Page , files : Files ) :
def b adgeFlagCustomization( page : Page , files : Files ) :
icon = " material-brush-variant "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #customization " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Customization ' ) "
)
@@ -616,16 +710,23 @@ def Badge_Flag_Customization(page: Page, files: Files):
# MUST add an entry in conventions.md
#
# use the following tag in your md file:
# <!-- md:flag experimental -->
# : <!-- md:flag --> Default
# : <!-- md:flag experimental --> Experimental
# : <!-- md:flag required --> Required
# : <!-- md:flag customization --> Customization
# : <!-- md:flag metadata --> Metadata
# : <!-- md:flag dangerous --> Dangerous
# : <!-- md:flag multiple --> Multiple
# : <!-- md:flag setting --> Setting
# #
def B adge_ Flag_ Experimental( page : Page , files : Files ) :
def b adgeFlagExperimental( page : Page , files : Files ) :
icon = " material-flask-outline "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #experimental " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Experimental ' ) "
)
@@ -638,16 +739,23 @@ def Badge_Flag_Experimental(page: Page, files: Files):
# MUST add an entry in conventions.md
#
# use the following tag in your md file:
# <!-- md:flag multiple -->
# : <!-- md:flag --> Default
# : <!-- md:flag experimental --> Experimental
# : <!-- md:flag required --> Required
# : <!-- md:flag customization --> Customization
# : <!-- md:flag metadata --> Metadata
# : <!-- md:flag dangerous --> Dangerous
# : <!-- md:flag multiple --> Multiple
# : <!-- md:flag setting --> Setting
# #
def B adge_ Flag_ Multiple_ Instances( page : Page , files : Files ) :
def b adgeFlagMultiInstances( page : Page , files : Files ) :
icon = " material-inbox-multiple "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #multiple-instances " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Multiple instances ' ) "
)
@@ -659,16 +767,23 @@ def Badge_Flag_Multiple_Instances(page: Page, files: Files):
# MUST add an entry in conventions.md
#
# use the following tag in your md file:
# <!-- md:flag setting -->
# : <!-- md:flag --> Default
# : <!-- md:flag experimental --> Experimental
# : <!-- md:flag required --> Required
# : <!-- md:flag customization --> Customization
# : <!-- md:flag metadata --> Metadata
# : <!-- md:flag dangerous --> Dangerous
# : <!-- md:flag multiple --> Multiple
# : <!-- md:flag setting --> Setting
# #
def B adge_ Flag_ Setting( page : Page , files : Files ) :
def b adgeFlagSetting( page : Page , files : Files ) :
icon = " material-cog "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #setting " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Configurable Setting ' ) "
)
@@ -681,13 +796,13 @@ def Badge_Flag_Setting(page: Page, files: Files):
# <!-- md:control -->
# #
def icon_c ontrol_d efault( page : Page , files : Files ) :
def newC ontrolD efault( page : Page , files : Files ) :
icon = " aetherx-axs-hand-pointer "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #control " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Type: Textbox ' ) "
)
@@ -698,13 +813,13 @@ def icon_control_default( page: Page, files: Files ):
# <!-- md:control textbox -->
# #
def icon_c ontrol_t extbox( page : Page , files : Files ) :
def newC ontrolT extbox( page : Page , files : Files ) :
icon = " aetherx-axs-input-text "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #control " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Type: Textbox ' ) "
)
@@ -717,33 +832,33 @@ def icon_control_textbox( page: Page, files: Files ):
# <!-- md:control toggle_off --> `Disabled`
# #
def icon_c ontrol_t oggle( page : Page , files : Files ) :
def newC ontrolT oggle( page : Page , files : Files ) :
icon = " aetherx-axs-toggle-large-on "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #control " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Type: Toggle Switch ' ) "
)
def icon_c ontrol_t oggle_o n( page : Page , files : Files ) :
def newC ontrolT oggleO n( page : Page , files : Files ) :
icon = " aetherx-axd-toggle-on "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #control " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Toggle: Enabled ' ) "
)
def icon_c ontrol_t oggle_o ff( page : Page , files : Files ) :
def newC ontrolT oggleO ff( page : Page , files : Files ) :
icon = " aetherx-axd-toggle-off "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #control " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Toggle: Disabled ' ) "
)
@@ -754,13 +869,13 @@ def icon_control_toggle_off( page: Page, files: Files ):
# <!-- md:control dropdown -->
# #
def icon_c ontrol_d ropdown( page : Page , files : Files ) :
def newC ontrolD ropdown( page : Page , files : Files ) :
icon = " aetherx-axs-square-caret-down "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #control " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Type: Dropdown ' ) "
)
@@ -771,13 +886,13 @@ def icon_control_dropdown( page: Page, files: Files ):
# <!-- md:control button -->
# #
def icon_c ontrol_b utton( page : Page , files : Files ) :
def newC ontrolB utton( page : Page , files : Files ) :
icon = " material-button-pointer "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #control " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Type: Button ' ) "
)
@@ -788,13 +903,13 @@ def icon_control_button( page: Page, files: Files ):
# <!-- md:control slider -->
# #
def icon_c ontrol_s lider( page : Page , files : Files ) :
def newC ontrolS lider( page : Page , files : Files ) :
icon = " aetherx-axd-sliders-simple "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #control " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return Create_Badg e (
return badge Create(
icon = f " [: { icon } :]( { href } ' Type: Slider ' ) "
)
@@ -805,13 +920,31 @@ def icon_control_slider( page: Page, files: Files ):
# <!-- md:control color #E5E5E5 #121315 -->
# #
def icon_c ontrol_c olor( text : str , page : Page , files : Files ) :
def newC ontrolC olor( text : str , page : Page , files : Files ) :
icon = " aetherx-axs-palette "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #control " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return B adge_ ColorPalette(
return b adgeColorPalette(
icon = f " [: { icon } :]( { href } ' Type: Color Wheel ' ) " ,
type = text
)
# #
# Icon : Control : Env Variable
#
# use the following tag in your md file:
# <!-- md:control slider -->
# #
def newControlEnvVar ( page : Page , files : Files ) :
icon = " aetherx-axd-puzzle-piece "
href = _resolve_path ( f " { PAGE_CONVENTIONS } #control " , page , files )
print ( clr . MAGENTA + ' VERBOSE - ' + clr . WHITE + ' Running ' + clr . YELLOW + inspect . stack ( ) [ 0 ] [ 3 ] + clr . WHITE + ' for page ' + clr . GREY + str ( href ) + clr . WHITE )
return badgeCreate (
icon = f " [: { icon } :]( { href } ' Type: Environment Variable ' ) " ,
type = " env "
)