2017 © Pedro Peláez
 

library markdown-article-library

Markdown file organizer for PHP7

image

new-humans/markdown-article-library

Markdown file organizer for PHP7

  • Saturday, December 23, 2017
  • by junipermcintyre
  • Repository
  • 0 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

new-humans/markdown-article-library

new-humans/markdown-article-library is a PHP-based file system wrapper for league/commonmark's Markdown parser. File system navigation emotionally inspired by new-humans/ubfs., (*1)

Goals

  • Let a writer interact with a relatively organize-able file system of Markdown files, in PHP.
  • Let the writer offer these files as an HTML render for web browsers.
  • Let the writer offer these files as downloads.

Installation

This project can be installed via Composer: ``` bash $ composer require new-humans/markdown-article-library, (*2)


## Basic Usage The `ArticleLibrary` class provides a simple wrapper for loading a 1-level deep Markdown file system. A library directory is expected to exist in your project in the following format: ``` bash /library - /notes - on-the-nature-of-the-universe.md - the-purpose-of-the-state.md - /ideas - persona-purpose-and-human-purpose.md - why-we-do-the-things-we-do.md - /lists - four-steps-for-preventing-career-bureacurism

Each subdirectory of /library represents a writing subject. Each file in the subdirectory represents a piece of writing within that subject, formatted in Markdown., (*3)

Note: Any of these names can be replaced - they're all supplied to the object by the developer, based on the actual files in the solution. The example in this repository includes subjects /notes and /whimsy. ``` php use NewHumans\MarkdownArticleLibrary\ArticleLibrary;, (*4)

// Instantiate the ArticleLibrary $articleLibrary = new ArticleLibrary(DIR.'/articles');, (*5)

// Instatiate the subject 'notes' $articleLibrary->newSubject("notes");, (*6)

// Instantiate the article 'grocery.md' to key 'grocery' within subject 'notes' $articleLibrary->newArticle("notes", "grocery.md", "grocery");, (*7)

// Output the article contents to client (HMTL or download) echo $articleLibrary->readArticle("notes", "grocery"); // or $articleLibrary->downloadArticle("notes", "grocery"); ```, (*8)

Documentation

Best place to look is inside! Just two classes in /src., (*9)

The Versions

23/12 2017

1.0.0.x-dev

1.0.0.9999999-dev https://github.com/New-Humans/MarkdownArticleLibrary

Markdown file organizer for PHP7

  Sources   Download

COMMY

The Requires

 

markdown articles

23/12 2017

v1.0.1

1.0.1.0 https://github.com/New-Humans/MarkdownArticleLibrary

Markdown file organizer for PHP7

  Sources   Download

COMMY

The Requires

 

markdown articles

19/12 2017

v1.0.0

1.0.0.0 https://github.com/New-Humans/MarkdownArticleLibrary

Markdown file organizer for PHP7

  Sources   Download

COMMY

The Requires

 

markdown articles

19/12 2017

dev-master

9999999-dev https://github.com/New-Humans/MarkdownArticleLibrary

Markdown file organizer for PHP7

  Sources   Download

The Requires

 

markdown articles