Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76919dc1f4 | ||
|
|
0f1ea00800 | ||
|
|
5ab8fe2ccd | ||
|
|
68b4780181 | ||
|
|
7170a9853a | ||
|
|
5a21dd3a16 | ||
|
|
82d56f6036 | ||
|
|
14d0fd8ef1 | ||
|
|
931ae688b6 | ||
|
|
f86ca5c2f5 |
@@ -7,3 +7,4 @@ Cargo.lock
|
||||
|
||||
# These are backup files generated by rustfmt
|
||||
**/*.rs.bk
|
||||
markdown-rs
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
[package]
|
||||
name = "md_to_html"
|
||||
version = "0.0.1"
|
||||
name = "md-to-html"
|
||||
version = "0.0.3"
|
||||
edition = "2021"
|
||||
repository = "https://git.stancik.work/lusk/md-to-html"
|
||||
repository = "https://git.stancik.cz/lusk/md-to-html"
|
||||
description = "Markdown to HTML converter"
|
||||
authors = ["Sokhibjon Orzikulov <orzklv.uz>", "Lukas Stancik <lukas.stancik.work>"]
|
||||
authors = ["Sokhibjon Orzikulov <orzklv.uz>", "Lukas Stancik <lukas.stancik.cz>"]
|
||||
readme = "README.md"
|
||||
license = "GPL-3.0"
|
||||
|
||||
|
||||
@@ -1,24 +1,39 @@
|
||||
release/build:
|
||||
DOT_ENV_FILE=../.env
|
||||
|
||||
-include ${DOT_ENV_FILE}
|
||||
|
||||
clean:
|
||||
rm -rf markdown-rs
|
||||
rm -rf target
|
||||
rm -f Cargo.lock
|
||||
|
||||
init:
|
||||
-git clone https://git.stancik.cz/lusk/markdown-rs.git
|
||||
|
||||
release/build: init
|
||||
docker run --rm -it \
|
||||
-v "${PWD}":/home/rust/src \
|
||||
-v "${PWD}/../markdown-rs":/home/rust/markdown-rs \
|
||||
messense/rust-musl-cross:x86_64-musl /bin/sh -c "cargo build --release && chown -R 1000:1001 target"
|
||||
-v "${PWD}/markdown-rs":/home/rust/markdown-rs \
|
||||
messense/rust-musl-cross:x86_64-musl /bin/sh -c "cargo build --release && chown -R ${SELF_UID}:${SELF_GID} target"
|
||||
|
||||
release/install: release/build
|
||||
@cp target/x86_64-unknown-linux-musl/release/md_to_html ~/.local/bin/md_to_html
|
||||
@cp target/x86_64-unknown-linux-musl/release/md_to_html ../wiki/docker/rootfs/bin/md_to_html
|
||||
release/arm64: init
|
||||
docker run --rm -it \
|
||||
-v "${PWD}":/home/rust/src \
|
||||
-v "${PWD}/markdown-rs":/home/rust/markdown-rs \
|
||||
messense/rust-musl-cross:aarch64-musl /bin/sh -c "cargo build --release && chown -R ${SELF_UID}:${SELF_GID} target"
|
||||
|
||||
debug/build:
|
||||
debug/build: init
|
||||
@docker run --rm -it \
|
||||
-v "${PWD}":/home/rust/src \
|
||||
-v "${PWD}/../markdown-rs":/home/rust/markdown-rs \
|
||||
messense/rust-musl-cross:x86_64-musl /bin/sh -c "cargo build && chown -R 1000:1001 target"
|
||||
-v "${PWD}/markdown-rs":/home/rust/markdown-rs \
|
||||
messense/rust-musl-cross:x86_64-musl /bin/sh -c "cargo build && chown -R ${SELF_UID}:${SELF_GID} target"
|
||||
|
||||
release/install: release/build
|
||||
@cp target/x86_64-unknown-linux-musl/release/md-to-html ~/.local/bin/md-to-html
|
||||
|
||||
debug/install: debug/build
|
||||
@cp target/x86_64-unknown-linux-musl/debug/md_to_html ~/.local/bin/md_to_html
|
||||
@cp target/x86_64-unknown-linux-musl/debug/md_to_html ../wiki/docker/rootfs/bin/md_to_html
|
||||
@cp target/x86_64-unknown-linux-musl/debug/md-to-html ~/.local/bin/md-to-html
|
||||
|
||||
test: release/install
|
||||
@#RUST_LOG=debug cargo run md_to_html
|
||||
@RUST_LOG=debug md_to_html convert --file ../wiki/container-data/pages/home.md --to /tmp/output.html
|
||||
@cat /tmp/output.html
|
||||
run:
|
||||
@RUST_LOG=debug md-to-html convert --file test/page.md --to /tmp/test-output.html
|
||||
@bat /tmp/test-output.html
|
||||
|
||||
@@ -5,10 +5,7 @@ Modified version of [Makudaun](https://github.com/orzklv/makudaun). This version
|
||||
## Build and Installation
|
||||
|
||||
```shell
|
||||
$ rust-musl-builder
|
||||
root@f8512336e6ce:/home/rust/src# cargo build --release
|
||||
exit
|
||||
$ cp target/x86_64-unknown-linux-musl/release/md_to_html ~/.local/bin/md_to_html
|
||||
$ make release/install
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../markdown-rs/
|
||||
@@ -0,0 +1,7 @@
|
||||
# Hi!
|
||||
|
||||
Nice, it works...
|
||||
|
||||
Let's try adding a #tag
|
||||
|
||||
And perhaps a ::task:
|
||||
Reference in New Issue
Block a user