-
Notifications
You must be signed in to change notification settings - Fork 25
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
String input with -
doesn't get parsed correctly (even if it is quoted)
#114
Comments
I think this is now fixed after the rewrite, but I need to tag a release first and there shouldn't be break changes the surface syntax should stay the same, but there could be breaking changes in building binaries. |
It seems like spaces still give it trouble, but it doesn't seem to interpret it as a flag anymore which is good, ref ericphanson/SearchablePDFs.jl#5 (comment) |
@ericphanson this is strange... I copy paste the function statement locally and it seems to work, what OS are you using? # main.jl
using Comonicon
@main function searchable(input_pdf::String,
output_path::String=string(splitext(input_pdf)[1], "_OCR",
".pdf"); apply_unpaper::Bool=false,
ntasks::Int=Sys.CPU_THREADS - 1, tesseract_nthreads::Int=1,
keep_intermediates::Bool=false,
tmp::String="get_scratch_dir(input_pdf)", quiet::Bool=false,
logfile::Union{Nothing,String}=nothing, force::Bool=false)
println(input_pdf)
end
|
Ah I know why, it's because bash will still think "P - W93.pdf" is three tokens! |
Huh, I get the same thing with your ❯ julia --project=. src/main.jl "P - W93.pdf"
P - W93.pdf I'm on MacOS (m1 under rosetta). Oh? |
should be fixed with comonicon/ComoniconBuilder.jl@613fdd4 |
I've tagged a new version (run |
thanks! |
Over at https://github.com/ericphanson/SearchablePDFs.jl I've been trying out Comonicon to make a command line tool to generate searchable PDFs from rasterized PDFs. E.g.
However, if the pdf name has
-
's in it, likeAuthor - Year.pdf
(generated by Zotero, in my case), then the CLI interprets it as passing options, even if I quote it, likeIt seems to work OK if the pdf name is like
Author-Year.pdf
, i.e. without spaces.The text was updated successfully, but these errors were encountered: