GithubHelp home page GithubHelp logo

coreapostrophe / makinilya Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.77 MB

✒️ A manuscript generator for ascetic writers.

License: MIT License

Rust 99.83% Mathematica 0.17%
cli generator manuscript story writing

makinilya's Introduction

Makinilya

A manuscript generator for ascetic writers.

Installation

  • Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf <https://github.com/coreapostrophe/makinilya/releases/download/v0.1.0-alpha.1/makinilya-installer.sh> | sh
  • Install prebuilt binaries via powershell script
irm https://github.com/coreapostrophe/makinilya/releases/download/v0.1.0-alpha.1/makinilya-installer.ps1 | iex
  • Alternatively you can download binary installers in the releases page.

About

For the longest time, writing fiction has been a challenge of organizing ideas. There are a lot of overlapping details you need to keep track of to maintain continuity, such as names of places and characters, time of events, and et cetera. Traditionally, if we want to change these information in the middle of a composition (perhaps after discovering an apt alternative), we'd have to go through all of the earlier sections and rewrite them. This has been a source of frustration for most writers, I included. Makinilya is my solution to such problem.

Makinilya is a manuscript generator that parses a project tree and allows authors to have a free-flowing writing workflow through powerful layouting features such as string-interpolation.

Brief Example

Project structure

The project is simple. Makinilya parses the contents of the draft directory to a story. The folders are parsed as chapters, and the files with the .mt extension are parsed as scenes.

draft/
├─ Chapter 1/
│  ├─ Scene 1.mt
│  ├─ Scene 2.mt
├─ Chapter 2/
│  ├─ Scene 1.mt
│  ├─ Scene 2.mt
Config.toml
Context.toml

Config.toml

This is the configuration of the manuscript. It will include all of the information that will be rendered in the title page of the document when we run the build command.

[story]
title = "Untitled"
pen_name = "Brutus Ellis"

[author]
name = "Brutus Ellis"
address_1 = "2688 South Avenue"
address_2 = "Barangay Olympia, Makati City"
mobile_number = "+63 895 053 4757"
email_address = "[email protected]"

[agent]
name = "Cymone Sabina"
address_1 = "755 Maria Clara Street"
address_2 = "Mandaluyong City"
mobile_number = "+63 908 524 4125"
email_address = "[email protected]"

Context.toml

Instead of explicitly writing tentative information. We can store information in a tree-structured context which can later be referenced in scenes. This way, when we can change them at any time.

# This is a toml header. They are like a namespace of some sort.
[mc]                        

# This is a toml property. We can reference this property through`mc.age`
age = 21

# We can also nest objects inside properties.
name = { short = "Core" }

The possible values in the context are currently limited to Strings, Booleans, Numbers, and nested Objects. To learn more about toml and how to structure them, refer to the official toml language spec.

draft/"Chapter 1"/"Scene 1".mt

Inside the actual scenes, we can write our actual narrative. Here, we can interpolate the context information by writing their identifiers inside brace enclosures {{ }}.

Hi, my name is {{ mc.name.short }}. I'm {{ mc.age }} years old.

In order to build the manuscript. We have to run the build command at the root of the project tree.

makinilya build

This will generate a manuscript.docx file inside a generated out directory within the project.

makinilya's People

Contributors

coreapostrophe avatar

Watchers

 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.