Skip to content

Commit a5c085b

Browse files
committed
Split nmd-core and nmd-cli
1 parent e6e0ea8 commit a5c085b

File tree

140 files changed

+9
-16051
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+9
-16051
lines changed

.idea/.gitignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/modules.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/nmd-compiler.iml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.idea/vcs.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

Cargo.toml

Lines changed: 0 additions & 46 deletions
This file was deleted.

README.md

Lines changed: 9 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,13 @@
11
![Logo](logo/logo.png)
22

3-
# New MarkDown [BETA]
3+
# New MarkDown
44

55
**New way to write in markdown**
66

7-
[![License](https://img.shields.io/badge/license-GPL3-green.svg)](LICENSE)
8-
[![Version](https://img.shields.io/badge/version-v0.36.1-blue.svg)](CHANGELOG.md)
9-
107
NMD stands for **New MarkDown**, or for friends, *Nicola MarkDown* (if Stephen Bourne can name a shell, why can't I name mine NMD?)
118

12-
- [New MarkDown \[BETA\]](#new-markdown-beta)
13-
- [Overview](#overview)
14-
- [Why NMD?](#why-nmd)
15-
- [Performance](#performance)
16-
- [Extended Syntax](#extended-syntax)
17-
- [Order with Integrated Dossiers](#order-with-integrated-dossiers)
18-
- [Predefined Styles and Customization](#predefined-styles-and-customization)
19-
- [Cool Factor](#cool-factor)
20-
- [NMD x VS Code](#nmd-x-vs-code)
21-
- [Getting Started](#getting-started)
22-
- [TL;DR](#tldr)
23-
- [Installation](#installation)
24-
- [NMD CLI](#nmd-cli)
25-
- [Generate a new dossier](#generate-a-new-dossier)
26-
- [Markdown to New Markdown](#markdown-to-new-markdown)
27-
- [Add a new document](#add-a-new-document)
28-
- [Reset dossier configuration](#reset-dossier-configuration)
29-
- [Compile](#compile)
30-
- [Develop](#develop)
31-
- [NMD Syntax](#nmd-syntax)
32-
- [Author](#author)
33-
- [Contributing](#contributing)
34-
- [License](#license)
35-
9+
> [!IMPORTANT]
10+
> **TL;DR**: download [last NMD CLI tool](#nmd-command-line-interface).
3611
3712
## Overview
3813

@@ -78,128 +53,21 @@ Keep your documents organized with integrated "dossiers" for more intuitive and
7853
Why stick to Markdown when you can be cool using **NMD**?
7954

8055

81-
## NMD x VS Code
82-
83-
You can use the official [NMD x VS Code](https://github.com/nricciardi/nmd-vscode) extension!
56+
## Syntax
8457

58+
You can find the current NMD's syntax to build nmd documents go to this [link](https://github.com/nricciardi/nmd-core/blob/main/NMD.md).
8559

86-
## Getting Started
60+
## NMD command line interface
8761

88-
Do you want **migrate from Markdown to New Markdown** easily and quickly? Read [how to do that](#markdown-to-new-markdown) using CLI!
89-
90-
### TL;DR
62+
You can download last release of **NMD command line interface** [here](https://github.com/nricciardi/nmd-cli/releases) or download it through [Cargo](https://github.com/rust-lang/cargo):
9163

9264
```shell
9365
cargo install nmd
94-
95-
nmd generate dossier -p dossier/input/path -f -w
96-
97-
nmd dossier -p dossier/input/path add -d new-document.nmd
98-
99-
nmd compile dossier -i dossier/input/path
100-
```
101-
102-
### Installation
103-
104-
You can install NMD using Cargo or downloading last release from Github.
105-
106-
```shell
107-
cargo install nmd
108-
```
109-
110-
### NMD CLI
111-
112-
#### Generate a new dossier
113-
114-
To **generate a new dossier** you can use the following command:
115-
116-
```shell
117-
nmd generate dossier -p dossier/input/path
118-
```
119-
120-
There are many *flags* that you can use in combination with `generate dossier`. For example, if you want *force* the generation you can use `-f`, or if you want a *welcome page* you can use `-w`.
121-
122-
```shell
123-
nmd generate dossier -p dossier/input/path -f -w
124-
```
125-
126-
The Git support is planned, but not implemented yet. You can only add `.gitkeep` files in assets directories using `-k`.
127-
128-
`-n` permits to specify dossier name.
129-
130-
##### Markdown to New Markdown
131-
132-
You can easily convert a standard Markdown file in a New Markdown dossier using `--from-md <md-file-path>` option.
133-
134-
##### Add a new document
135-
136-
To **add a new document** you can use the following command:
137-
138-
```shell
139-
nmd dossier -p dossier/input/path add -d new-document.nmd
14066
```
14167

142-
If the document name doesn't have `nmd` extension, it will be added automatically.
143-
144-
You can add more than one document at the same time:
145-
146-
```shell
147-
nmd dossier -p dossier/input/path add -d new-document-1.nmd -d new-document-2.nmd -d new-document-3.nmd
148-
```
149-
150-
##### Reset dossier configuration
151-
152-
```shell
153-
nmd dossier -p dossier/input/path reset [ -p ]
154-
```
155-
156-
`-p` reset flag to preserve documents list.
157-
158-
#### Compile
159-
160-
You can compile a dossier or a single file through `compile` command.
161-
162-
The only mandatory option is the input path. It can be a path to a directory (dossier) or a file.
163-
164-
```shell
165-
nmd compile -i input/path
166-
```
167-
168-
`compile` command has a lot of options. You could specify the output format using `-f <format>` (e.g. `html`, which is the default), the output path with `-o <output-path>` or the theme using `-t <theme>`. The available themes are:
169-
170-
- `light`
171-
- `dark`
172-
- `vintage`
173-
- `scientific`
174-
- `none`
175-
176-
177-
```shell
178-
nmd compile -f html dossier -i dossier/input/path -o artifact/output/path
179-
```
180-
181-
Moreover, if you watch dossier files and compile them if something changes, you should use watcher mode (`-w` option). Watcher mode compile dossier if any change is captured. Changes are captured only if a minimum time is elapsed. To set minimum time use `--watcher-time` option.
182-
183-
`--fast-draft` to create a fast draft of dossier, generally compiler takes less time to generate it.
184-
185-
`--parallelization` to parallelize work (default is single thread).
186-
187-
`-s <document1> -s <documentN>` to compile only a subset of documents in dossier configuration list.
188-
189-
In the end, if you are writing in NMD and you want a preview, you could compile with `-p` option. `-p` renders a preview in a web server on `127.0.0.1:1234` (`--preview-scraping-interval <interval>` to set client scraping interval in *milliseconds*).
190-
191-
`--embed-local-image`, `--embed-remote-image`, `--strict-image-src-check` and `--embed-local-image` to manage images parsing.
192-
193-
## Develop
194-
195-
Develop [check list](DEVELOP.md)
196-
197-
## NMD Syntax
198-
199-
[NMD Syntax](NMD.md)
68+
## NMD x VS Code
20069

201-
> [!WARNING]
202-
> NMD syntax is working in progress yet, you can contribute following [contribution guidelines](CONTRIBUTING.md)!
70+
You can use the official [NMD x VS Code](https://github.com/nricciardi/nmd-vscode) extension!
20371

20472

20573
## Author

build.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

package-lock.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)