Giter Club home page Giter Club logo

lynxchan-page-processor's Introduction

Lynxchan Page Processor

An addon that allows you to easily make scripts to manipulate your template pages on runtime. For example, replace certain text with with html or making all the text uppercase, if youre into that.

LynxImport

There is a default script installed, which allows you to do php-esque includes into templates and static text files, using local text/html files. Static files will be processed upon their (first) request and templates will be processed on (re)build. The usage is as followed:

<lynximport path="\static\somehtmlfile.html"></lynximport>

On rebuild, any lynximport tag in the templates will get replaced with the content of the file it references or left in place when errors are encountered. Static files will undergo the same upon being requested. Lynximport works recursively, so you can import files which themselves have imports. As of now, only local files can be referenced and these tags can only be used in template pages.

Addon Hook Usage:

Write a javascript file and place it in the "ProcessingScripts" folder. Then add the name of your file (without .js) to the array of the PreproccesorHook file. Scripts are excecuted per file in order of their position in the array. Your file should at least contain the following:

exports.Process = function(value){
//do stuff
return somestring;
}

With "value" and "somestring" being a string.

lynxchan-page-processor's People

Contributors

comraderat avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.