yetangitu / bs Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Similar Issue to dvankevich - all the options are getting filtered with a / before the option is set.
Line 528:
"$curl" "${curl_options[@]}" --request GET --url "$url/api/$endpoint${id:+/}$id${target:+/}$target"
should be:
"$curl" "${curl_options[@]}" --request GET --url "$url/api/$endpoint${id:+}$id${target:+/}$target"
Once corrected, I'm able to properly set options like count and offset.
Found that the filter isn't working properly as stated in the API documentation. It's currently adding an = after ?Filter which is not the correct filter format.
Line 269:
query="${query:-?}${query:+&}filter=$OPTARG"
Should be:
query="${query:-?}${query:+&}filter$OPTARG"
On a secondary Note - the filter includes brackets in the API which are not allowed in the URL. Would be nice if I could just pass the brackets to BS and let it fix it when generating the URL. For now, I'll write the %5B and %5D into my own code.
My BookStack version v22.11.1
when i run command
./bs_orig search -q time
i got 301 Moved Permanently html response
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://192.168.56.142/api/search?query=time">here</a>.</p>
<hr>
<address>Apache/2.4.52 (Ubuntu) Server at 192.168.56.142 Port 80</address>
</body></html>
the reason is an extra character / in the url
must be http://192.168.56.142/api/search?query=time
and there are http://192.168.56.142/api/search/?query=time
my little fix solves this problem
diff bs_orig bs
527,528c527,534
<
< "$curl" "${curl_options[@]}" --request GET --url "$url/api/$endpoint${id:+/}$id${target:+/}$target"
---
> case $endpoint in
> docs|search|recycle-bin)
> "$curl" "${curl_options[@]}" --request GET --url "$url/api/$endpoint$id${target:+/}$target"
> ;;
> *)
> "$curl" "${curl_options[@]}" --request GET --url "$url/api/$endpoint${id:+/}$id${target:+/}$target"
> ;;
> esac
I'm running bs
and am able to query books, users, etc., but when I attempt to create a user (including using the example command in the readme) I get the following error:
me$ ./bs users create -n "Billy Bob" -e "[email protected]" -L "Klingon" -p "b1llyb0b123"
curl: option --json: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
I'm running Ubuntu 22.04 and BookStack 22.11.1, connecting remotely.
Any pointers would be welcome -- I'll be migrating from another wiki soon and I think the tool will be invaluable!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.