-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: "logseq" crate for reusable functions
- Loading branch information
1 parent
793cb8c
commit f5c9ffe
Showing
8 changed files
with
68 additions
and
50 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,3 @@ | ||
[dependencies] | ||
pyo3 = {version = "0.20.2"} | ||
regex = "1.10.3" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
[lib] | ||
crate-type = ["cdylib"] | ||
name = "logseq_doctor" | ||
|
||
[lints.clippy] | ||
all = "deny" | ||
|
||
[lints.rust] | ||
missing_docs = "deny" | ||
|
||
# https://doc.rust-lang.org/cargo/reference/manifest.html#the-package-section | ||
[package] | ||
authors = ["W Augusto Andreoli <andreoli@sent.com>"] | ||
categories = ["command-line-utilities", "filesystem", "text-editors", "text-processing", "value-formatting"] | ||
description = "Logseq Doctor: heal your Markdown files" | ||
edition = "2021" | ||
name = "logseq-doctor" | ||
version = "0.1.1" | ||
[workspace] | ||
members = ["rust/logseq", "rust/logseq-doctor"] | ||
resolver = "2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[dependencies] | ||
logseq = {path = "../logseq"} | ||
pyo3 = {version = "0.20.2"} | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
[lib] | ||
crate-type = ["cdylib"] | ||
name = "logseq_doctor" | ||
|
||
[lints.clippy] | ||
all = "deny" | ||
|
||
[lints.rust] | ||
missing_docs = "deny" | ||
|
||
# https://doc.rust-lang.org/cargo/reference/manifest.html#the-package-section | ||
[package] | ||
authors = ["W Augusto Andreoli <andreoli@sent.com>"] | ||
categories = ["command-line-utilities", "filesystem", "text-editors", "text-processing", "value-formatting"] | ||
description = "Logseq Doctor: heal your Markdown files" | ||
edition = "2021" | ||
name = "logseq-doctor" | ||
version = "0.1.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//! Logseq Doctor: heal your Markdown files | ||
//! | ||
//! Python extension written in Rust, until the whole project is ported to Rust. | ||
use pyo3::prelude::*; | ||
|
||
#[pymodule] | ||
fn _logseq_doctor(_python: Python, module: &PyModule) -> PyResult<()> { | ||
module.add_function(wrap_pyfunction!(rust_remove_consecutive_spaces, module)?)?; | ||
Ok(()) | ||
} | ||
|
||
#[pyfunction] | ||
fn rust_remove_consecutive_spaces(file_contents: String) -> PyResult<String> { | ||
Ok(logseq::remove_consecutive_spaces(file_contents).unwrap()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
regex = "1.10.3" | ||
|
||
[package] | ||
edition = "2021" | ||
name = "logseq" | ||
version = "0.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters