Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fc1943s committed Oct 10, 2024
1 parent 1c9c5e6 commit b886616
Show file tree
Hide file tree
Showing 8 changed files with 1,316 additions and 1,397 deletions.
85 changes: 1 addition & 84 deletions apps/documents/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions apps/documents/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ chrono = ">=0.4,<1"
encoding_rs = ">=0.8,<1"
encoding_rs_io = ">=0.1,<1"
futures = ">=0.3,<1"
tokio = { version = "1.39", features = ["rt-multi-thread"] }
tokio-stream = ">=0.1,<1"
async-walkdir = "2.0"
rayon = "1.10"
sha2 = "~0.11.0-pre.4"
Expand Down
13 changes: 6 additions & 7 deletions apps/documents/documents.dib
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ let crowbook hangul { ext dist_dir dist_path output_path } =
$'$"--set"'
+. $'$" tex.paper.size a4paper"'
+. $'$" tex.template.add \\\"\\\\pagenumbering{{gobble}}\\\""'
// +. $'$" tex.template.add \\\"\\\\pagestyle{{empty}}\\\""'
+. (
if hangul |> not
then ""
Expand Down Expand Up @@ -292,7 +291,7 @@ let run { source_dir dist_dir cache_dir hangul_spec }
if (path |> sm'.ends_with ".md" |> not) || (path |> sm'.ends_with ".hangul.md")
then file_system.Ignore
else file_system.Continue
|> async.stream_filter_map fun (entry : _ _ file_system.async_walkdir_error) =>
|> async.stream_filter_map_futures fun (entry : _ _ file_system.async_walkdir_error) =>
match entry |> resultm.map_error' sm'.format' |> resultm.unbox with
| Ok entry =>
entry
Expand All @@ -307,7 +306,7 @@ let run { source_dir dist_dir cache_dir hangul_spec }
fun () => { error }
None
|> optionm'.box
|> async.stream_collect
|> async.stream_collect_futures
|> async.await

trace Debug
Expand Down Expand Up @@ -449,7 +448,7 @@ let run { source_dir dist_dir cache_dir hangul_spec }
#!spiral

//// test
///! rust -d async-walkdir encoding_rs encoding_rs_io futures futures-lite rayon regex sha2 tokio['rt-multi-thread'] tokio-stream
///! rust -d async-walkdir encoding_rs encoding_rs_io futures futures-lite rayon regex sha2

inl workspace_root = file_system.get_workspace_root ()
inl source_dir = workspace_root </> "../vault/target/documents"
Expand Down Expand Up @@ -484,7 +483,7 @@ run {
cache_dir
hangul_spec = "por-br"
}
|> async.block_on
|> async.block_on_futures
|> resultm.unwrap'
|> sm'.format_debug'
|> sm'.from_std_string
Expand Down Expand Up @@ -523,7 +522,7 @@ run {
cache_dir = cache_dir
hangul_spec = "por-br"
}
|> async.block_on
|> async.block_on_futures
|> resultm.unwrap'
|> sm'.format_debug'
|> sm'.from_std_string
Expand Down Expand Up @@ -641,7 +640,7 @@ inl main (args : array_base string) =

inl result =
run { source_dir dist_dir cache_dir hangul_spec }
|> async.block_on
|> async.block_on_futures
|> resultm.unbox

match result with
Expand Down
Loading

0 comments on commit b886616

Please sign in to comment.