Giter Site home page Giter Site logo

gribble's Introduction

Gribble

Gribble is a text preprocessor written in Gerbil Scheme.

It consists of a library, which can be used be other Gerbil programs, as well as an executable program which can be used to process text files.

It is currently pre-alpha software. Nothing works here yet.

Syntax

The syntax is inspired by Scribble, the document processing software included as part of Racket. It uses a tilde ("~"), rather than an arobase ("@") so as to interfere less frequently with typical writing.

Generally, the markup is processed as scheme and, if the return is not void, then the original input text is replaced with the output. For example, all the following would output "Hello WORLD!":

;; Everything in brackets is run as Scheme
Hello ~(upcase "world")! 

;; A function that takes one or more strings can be called with
curly brackets
Hello ~upcase{world}!

;; A function can be given arguments other than strings using
square brackets
Hello ~upcase["world"]!

;; You can combine square and curly braces for functions taking
multiple arguments
Hello ~upcase["wor"]{ld}!

In the above example, upcase is a function which takes one or more strings, converts them to upper case and then appends them together.

Roadmap

  • Produce a function "preprocess" that takes a string and outputs a string, implementing each of the syntax types above

  • Write preprocess-file which takes a path, rather than a string

  • Give preprocess an optional keyword argument which changes the special character "~" to something else.

  • Produce a helper functions, "include" which includes and preprocesses another file by either a relative or absolute path

  • Produce a command line program "gribble" which runs the preprocess function from the command-line, using standard input and output

  • Update the command line program to take an optional argument changing the special character

Future Development Ideas

  • Add metadata to documents

  • Add functions for creating documentation, to be output to HTML

  • Allow conversion of documents to PDF, through LaTeX

gribble's People

Contributors

rlp10 avatar

Stargazers

 avatar

Watchers

 avatar  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.