(!prestyle)( ) (?link)(https://res.cloudinary.com/diisqlaft/image/upload/GlassScript_Logo_vwjoqq.png) (?alt)(GlassScript Logo) (?width)(80) (!image)( ) (!clear)( ) (!html)(<h1 align="center">GlassScript</h1>) (!line)( ) (!h3)(Introduction) (!h5)(GlassScript is a markup language designed for simplicity, ease of use, and customizabillity.) (!p)(It is good for many things, including:) (!p)(• Developers looking to focus more on the backend and logic, not the styling.) (!p)(• Website designers looking to create websites without any complicated code, and still be able to deeply customize it.) (!p)(• Anyone who wants to express their creativity!) (!p)(This page was written in GlassScript! You can find all the code at my repository: https://codeberg.org/splot-dev/glass-script) (!line)( ) (!h3)(Syntax) (!p)(The syntax of the language is how you write it - and is the core feature of a language. GlassScript's syntax is very easy. It is provided here.) (!p)(This command is the main command that is used more often - it is for rendering things, like paragraphs:) (!code)(^(!command^)^(main_value^)) (!p)(An example would be:) (!code)(^(!p^)^(Hello world!^)) (!p)(This will print "Hello world" in a paragraph format. The "main_value" is the primary value for the command, and varies.) (!break)( ) (!p)(This command is for setting "variables", essentially formats so your browser can understand how you want your text:) (!code)(^(?variable^)^(value^)) (!p)(An example would be:) (!code)(^(?link^)^(https://example.com^)) (!p)(This will set the "link" variable to "https://example.com".) (!p)(To clear your variables, have this command: ) (!code)(^(!clear^)^( ^)) (!p)(Notice the space in the second bracket - it must be there, or the command may cause unexpected behaviour, or be ignored. Other commands also have this, like "line".) (!break)( ) (!p)(This command is for setting "preloads", essentially creating the commands. These will already be, in fact, preloaded, so you will not have to worry about these, unless you are creating your own commands:) (!code)(^(.command^)^(html^)) (!p)(An example would be:) (!code)(^(.html^)^({}^)) (!p)(This will require the main attribute of the "html" command to be everything, essentially running HTML.) (!break)( ) (!p)(One more thing - when you use brackets within your text, you need to escape them with a carat.) (!p)(An example would be:) (!code)(^(.p^)^(^^(Birds are beautiful!^^)^)) (!p)(This will print "^(Birds are beautiful!^)".) (!line)( ) (!h3)(Preloads / Commands) (!p)(The command preloads are provided here. Most are self explanatory.) (!p)(Main tags:) (!break)( ) (!code)(^(!p^)^(Paragraph tag!^)) (!break)( ) (!code)(^(!i^)^(Italics tag!^)) (!break)( ) (!code)(^(!s^)^(Strikethrough tag!^)) (!break)( ) (!code)(^(!b^)^(Bold tag!^)) (!p)(Headers:) (!break)( ) (!code)(^(!h1^)^(Header 1 tag!^)) (!break)( ) (!code)(^(!h2^)^(Header 2 tag!^)) (!break)( ) (!code)(^(!h3^)^(Header 3 tag!^)) (!break)( ) (!code)(^(!h4^)^(Header 4 tag!^)) (!break)( ) (!code)(^(!h5^)^(Header 5 tag!^)) (!break)( ) (!code)(^(!h6^)^(Header 6 tag!^)) (!break)( ) (!code)(^(!h7^)^(Header 7 tag!^)) (!p)(Other Commands:) (!p)(There are some that require inputs. The required inputs will be listed. Your job is the set the variables in your code. For example, "^(?link^)^(https://example.com^)".) (!break)( ) (!code)(^(!html^)^(html here...^)) (!break)( ) (!code)(^(!css^)^(css here...^)) (!break)( ) (!code)(^(!js^)^(javascript here...^)) (!break)( ) (!code)(^(!prestyle^)^( ^) This will automatically style your text; it will ideally make it look better.) (!break)( ) (!code)(^(!abbr^)^(abbr here...^) Abbreviation: Requires "title" variable and main variable.) (!break)( ) (!code)(^(!address^)^(address here...^)) (!break)( ) (!code)(^(!audio^)^( ^) Requires "link" and "type" variable.) (!break)( ) (!code)(^(!base^)^( ^) Requires "link" variable.) (!break)( ) (!code)(^(!blockquote^)^(blockquote here...^) Requires "link" and main variable.) (!break)( ) (!code)(^(!break^)^( ^)) (!break)( ) (!code)(^(!button^)^(button here...^)) (!break)( ) (!code)(^(!cite^)^(cite here...^)) (!break)( ) (!code)(^(!code^)^(code here...^)) (!break)( ) (!code)(^(!image^)^( ^) Requires "link", "alt" and "width" variable.) (!break)( ) (!code)(^(!line^)^( ^)) (!break)( ) (!code)(^(!link^)^(link here...^) Requires "link" and main variable.) (!break)( ) (!code)(^(!meter^)^( ^) Requires "id", "text", "value", "min", "max" and "fallback" variable.) (!break)( ) (!code)(^(!noscript^)^(noscript here...^) This shows when the user has disabled Javascript. Although this has not been tested, it is likely GlassScript will not run without JavaScript enabled.) (!break)( ) (!code)(^(!pre^)^(preformatted text here...^)) (!break)( ) (!code)(^(!video^)^( ^) Requires "width", "link" and "type" variable.) (!break)( ) (!code)(^(!footer^)^(footer here...^)) (!break)( ) (!code)(Note: the list elements may be a little wonky; if you want to save time, use the the ASCII bullet point / numberings.) (!break)( ) (!code)(^(!sol^)^( ^) Starts ordered list.) (!break)( ) (!code)(^(!eol^)^( ^) Ends ordered list.) (!break)( ) (!code)(^(!sul^)^( ^) Starts unordered list.) (!break)( ) (!code)(^(!eul^)^( ^) End unordered list.) (!break)( ) (!code)(^(!le^)^(- be happy^) List element.) (!line)( ) (!h3)(Installation and Startup) (!p)(You can run GlassScript in two different ways. One way is via HTML, using WebAssembly Pyodide, and one way is via Python.) (!p)(HTML Method ^(Put and run this code into an HTML document, and remember to give it Internet access, and not use "file:///".^):) (!p)(This method will have a loading effect - but is perfect if you don't know Python or want a plug and play environment.) (!p)(Code is provided at this link: https://codeberg.org/splot-dev/glass-script/raw/branch/main/pyodide-wrapper/template.html) (!p)(Python Method) (!p)(This is for users who want to parse GlassScript in the backend through Python. The loading effect will not be present here, but this setup may be more difficult.) (!p)(Install package via "pip3 install glass-script" in terminal ^(To update, use "pip3 install --upgrade"^).) (!code)(Use this code:) (!break)( ) (!code)(from glass_script import GlassScript) (!break)( ) (!code)(gs = GlassScript^(^)) (!break)( ) (!code)(html = gs.glass2html^("""enter your GlassScript code here"""^)) (!line)( ) (!h3)(Additional Notes) (!p)(• When running code, remember to do it via a proper HTML editor that does not restrict Internet access, like the W3Schools one ^(I am not sponsered, nor affiliated with W3Schools.^). Also don't use it locally via "file:///". You can tell if its not working if it displays the clump of your code in raw text, or just does not load.) (!p)(• If you are looking to display code with GlassScript, like Python or HTML, it is doeable, but can be a pain.) (!p)(• Sometimes, some elements cannot fit one the same line with others. Other wonky things can happen. These can be fixed with a little HTML.) (!h3)(Summary) (!p)(Thanks for checking GlassScript out, and maybe try it!)