Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to Comonicon 0.11 #5

Merged
merged 3 commits into from
May 26, 2021
Merged

Conversation

Roger-luo
Copy link
Contributor

@Roger-luo Roger-luo commented May 26, 2021

Not sure if you want to use a system image or even just build an app for this, I find this package itself is quite slow to start (costs over 1s on my machine), after you enable system image build it only costs 200ms. I enabled it in this PR.

There will be some instability for version 0.11 since it's a brand new rewrite, 0.11 is also a little bit slower since we support parsing more syntax in the terminal.

@ericphanson ericphanson enabled auto-merge (squash) May 26, 2021 21:46
@ericphanson
Copy link
Owner

Cool! Thank you 😃

@Roger-luo
Copy link
Contributor Author

oh 0.11 only support 1.6+ btw

auto-merge was automatically disabled May 26, 2021 21:52

Head branch was pushed to by a user without write access

@ericphanson
Copy link
Owner

Ok, no problem. Can you bump the Julia compat in the Project.toml too?

@Roger-luo
Copy link
Contributor Author

OK I update the version accordingly

@ericphanson ericphanson enabled auto-merge (squash) May 26, 2021 21:54
@ericphanson
Copy link
Owner

Just tried it out locally:

❯ searchable P\ -\ W\ 93.pdf 
ERROR: LoadError: BoundsError: attempt to access 1-codeunit String at index [2:2]
Stacktrace:
 [1] command_main(ARGS::Vector{String})
   @ SearchablePDFs ~/SearchablePDFs.jl/deps/lib/libsearchable.dylib:-1
 [2] command_main()
   @ SearchablePDFs ~/.julia/packages/ComoniconTargetExpr/mjfvh/src/emit.jl:53
 [3] top-level scope
   @ ~/.julia/bin/searchable.jl:1
 [4] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
   @ Base ~/SearchablePDFs.jl/deps/lib/libsearchable.dylib:-1
 [5] _include(mapexpr::Function, mod::Module, _path::String)
   @ Base ~/SearchablePDFs.jl/deps/lib/libsearchable.dylib:-1
 [6] include(mod::Module, _path::String)
   @ Base ~/SearchablePDFs.jl/deps/lib/libsearchable.dylib:-1
 [7] exec_options(opts::Base.JLOptions)
   @ Base ~/SearchablePDFs.jl/deps/lib/libsearchable.dylib:-1
 [8] _start()
   @ Base ~/SearchablePDFs.jl/deps/lib/libsearchable.dylib:-1
in expression starting at /Users/eph/.julia/bin/searchable.jl:1

❯ searchable "P - W93.pdf" 
ERROR: LoadError: BoundsError: attempt to access 1-codeunit String at index [2:2]
Stacktrace:
 [1] command_main(ARGS::Vector{String})
   @ SearchablePDFs ~/SearchablePDFs.jl/deps/lib/libsearchable.dylib:-1
 [2] command_main()
   @ SearchablePDFs ~/.julia/packages/ComoniconTargetExpr/mjfvh/src/emit.jl:53
 [3] top-level scope
   @ ~/.julia/bin/searchable.jl:1
 [4] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
   @ Base ~/SearchablePDFs.jl/deps/lib/libsearchable.dylib:-1
 [5] _include(mapexpr::Function, mod::Module, _path::String)
   @ Base ~/SearchablePDFs.jl/deps/lib/libsearchable.dylib:-1
 [6] include(mod::Module, _path::String)
   @ Base ~/SearchablePDFs.jl/deps/lib/libsearchable.dylib:-1
 [7] exec_options(opts::Base.JLOptions)
   @ Base ~/SearchablePDFs.jl/deps/lib/libsearchable.dylib:-1
 [8] _start()
   @ Base ~/SearchablePDFs.jl/deps/lib/libsearchable.dylib:-1
in expression starting at /Users/eph/.julia/bin/searchable.jl:1

❯ mv "P - W 93.pdf" "P-W93.pdf"

❯ searchable P-W93.pdf 
Starting to ocr `P-W93.pdf`; result will be located at `P-W93_OCR.pdf`.
(1/3) Extracting images:   7%|████▍                                                              |  ETA: 0:00:41(1/3) Extracting images:  10%|██████▋                                                            |  ETA: 0:00:26(1/3) Extracting images:  13%|████████▉                                                          |  ETA: 0:00:19(1/3) Extracting images:  17%|███████████                                                        |  ETA: 0:00:15(1/3) Extracting images:  20%|█████████████▎                                                     |  ETA: 0:00:12(1/3) Extracting images:  23%|███████████████(1/3) Extracting images: 100%|███████████████████████████████████████████████████████████████████| Time: 0:00:07
(2/3) OCRing:  26%|████████████████████▋                                                         |  ETA: 0:02:42

seems like spaces aren't handled right, but -'s now are, so that's a good improvement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants