Improves executable parameter documentation

pull/134/head
Tpt 3 years ago
parent 2be0f1a3ac
commit 605c94e848
  1. 69
      Cargo.lock
  2. 2
      server/Cargo.toml
  3. 10
      server/src/main.rs
  4. 2
      wikibase/Cargo.toml
  5. 13
      wikibase/src/main.rs

69
Cargo.lock generated

@ -355,9 +355,9 @@ dependencies = [
[[package]]
name = "bitflags"
version = "1.2.1"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitvec"
@ -668,9 +668,9 @@ dependencies = [
[[package]]
name = "crossbeam-deque"
version = "0.8.0"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9"
checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-epoch",
@ -1240,9 +1240,9 @@ checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
[[package]]
name = "jobserver"
version = "0.1.22"
version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "972f5ae5d1cb9c6ae417789196c803205313edde988685da5e3aae0827b9e7fd"
checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa"
dependencies = [
"libc",
]
@ -1318,9 +1318,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.98"
version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790"
checksum = "a7f823d141fe0a24df1e23b4af4e3c7ba9e5966ec514ea068c93024aa7deb765"
[[package]]
name = "libloading"
@ -1365,9 +1365,9 @@ dependencies = [
[[package]]
name = "matches"
version = "0.1.8"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
[[package]]
name = "md-5"
@ -1492,9 +1492,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]]
name = "openssl"
version = "0.10.35"
version = "0.10.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "549430950c79ae24e6d02e0b7404534ecf311d94cc9f861e9e4020187d13d885"
checksum = "8d9facdb76fec0b73c406f125d44d86fdad818d66fef0531eec9233ca425ff4a"
dependencies = [
"bitflags",
"cfg-if 1.0.0",
@ -1521,9 +1521,9 @@ dependencies = [
[[package]]
name = "openssl-sys"
version = "0.9.65"
version = "0.9.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a7907e3bfa08bb85105209cdfcb6c63d109f8f6c1ed6ca318fff5c1853fbc1d"
checksum = "1996d2d305e561b70d1ee0c53f1542833f4e1ac6ce9a6708b6ff2738ca67dc82"
dependencies = [
"autocfg",
"cc",
@ -2028,9 +2028,9 @@ dependencies = [
[[package]]
name = "redox_syscall"
version = "0.2.9"
version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee"
checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff"
dependencies = [
"bitflags",
]
@ -2133,7 +2133,7 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
"semver 1.0.3",
"semver 1.0.4",
]
[[package]]
@ -2207,9 +2207,9 @@ dependencies = [
[[package]]
name = "semver"
version = "1.0.3"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f3aac57ee7f3272d8395c6e4f502f434f0e289fcd62876f70daa008c20dcabe"
checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012"
[[package]]
name = "semver-parser"
@ -2219,18 +2219,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
[[package]]
name = "serde"
version = "1.0.126"
version = "1.0.127"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03"
checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_cbor"
version = "0.11.1"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e18acfa2f90e8b735b2836ab8d538de304cbb6729a7360729ea5a895d15a622"
checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
dependencies = [
"half",
"serde",
@ -2238,9 +2238,9 @@ dependencies = [
[[package]]
name = "serde_derive"
version = "1.0.126"
version = "1.0.127"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43"
checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc"
dependencies = [
"proc-macro2",
"quote",
@ -2336,9 +2336,9 @@ checksum = "729a25c17d72b06c68cb47955d44fda88ad2d3e7d77e025663fdd69b93dd71a1"
[[package]]
name = "slab"
version = "0.4.3"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527"
checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590"
[[package]]
name = "sled"
@ -2635,9 +2635,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "tokio"
version = "1.9.0"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b7b349f11a7047e6d1276853e612d152f5e8a352c61917887cc2169e2366b4c"
checksum = "01cf844b23c6131f624accf65ce0e4e9956a8bb329400ea5bcc26ae3a5c20b0b"
dependencies = [
"autocfg",
"pin-project-lite",
@ -2651,12 +2651,9 @@ checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06"
[[package]]
name = "unicode-bidi"
version = "0.3.5"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eeb8be209bb1c96b7c177c7420d26e04eccacb0eeae6b980e35fcb74678107e0"
dependencies = [
"matches",
]
checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085"
[[package]]
name = "unicode-normalization"
@ -2863,9 +2860,9 @@ dependencies = [
[[package]]
name = "web-sys"
version = "0.3.51"
version = "0.3.52"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e828417b379f3df7111d3a2a9e5753706cae29c41f7c4029ee9fd77f3e09e582"
checksum = "01c70a82d842c9979078c772d4a1344685045f1a5628f677c2b2eab4dd7d2696"
dependencies = [
"js-sys",
"wasm-bindgen",

@ -7,7 +7,7 @@ readme = "README.md"
repository = "https://github.com/oxigraph/oxigraph/tree/master/server"
homepage = "https://oxigraph.org/server/"
description = """
SPARQL server based on Oxigraph
Oxigraph SPARQL HTTP server
"""
edition = "2018"

@ -14,7 +14,7 @@ use async_std::io::Read;
use async_std::net::{TcpListener, TcpStream};
use async_std::prelude::*;
use async_std::task::{block_on, spawn};
use clap::{App, Arg};
use clap::{crate_version, App, Arg};
use http_types::content::ContentType;
use http_types::{
bail_status, format_err_status, headers, Error, Method, Mime, Request, Response, Result,
@ -42,11 +42,13 @@ const SERVER: &str = concat!("Oxigraph/", env!("CARGO_PKG_VERSION"));
#[async_std::main]
pub async fn main() -> Result<()> {
let matches = App::new("Oxigraph SPARQL server")
.version(crate_version!())
.arg(
Arg::with_name("bind")
.short("b")
.long("bind")
.help("Sets a custom config file")
.help("Host and port to listen to")
.default_value("localhost:7878")
.takes_value(true),
)
.arg(
@ -58,8 +60,8 @@ pub async fn main() -> Result<()> {
.required(true),
)
.get_matches();
let bind = matches.value_of("bind").unwrap_or("localhost:7878");
let file = matches.value_of("file").unwrap();
let bind = matches.value_of("bind").unwrap();
let file = matches.value_of_os("file").unwrap();
let store = Store::open(file)?;
println!("Listening for requests at http://{}", &bind);

@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/oxigraph/oxigraph/tree/master/wikibase"
description = """
SPARQL server based on Oxigraph for Wikibase instances
Oxigraph SPARQL server for Wikibase
"""
edition = "2018"

@ -14,7 +14,7 @@ use async_std::future::Future;
use async_std::net::{TcpListener, TcpStream};
use async_std::prelude::*;
use async_std::task::spawn;
use clap::{App, Arg};
use clap::{crate_version, App, Arg};
use http_types::content::ContentType;
use http_types::{
bail_status, format_err_status, headers, Error, Method, Mime, Request, Response, Result,
@ -36,11 +36,13 @@ const SERVER: &str = concat!("Oxigraph/", env!("CARGO_PKG_VERSION"));
#[async_std::main]
pub async fn main() -> Result<()> {
let matches = App::new("Oxigraph SPARQL server for Wikibase")
.version(crate_version!())
.arg(
Arg::with_name("bind")
.short("b")
.long("bind")
.help("Sets a custom config file")
.help("Host and port to listen to")
.default_value("localhost:7878")
.takes_value(true),
)
.arg(
@ -75,11 +77,12 @@ pub async fn main() -> Result<()> {
Arg::with_name("slot")
.long("slot")
.help("slot to load like 'mediainfo'. Could not be use with namespaces")
.takes_value(true),
.takes_value(true)
.conflicts_with("namespaces"),
)
.get_matches();
let bind = matches.value_of("bind").unwrap_or("localhost:7878");
let file = matches.value_of("file").unwrap();
let bind = matches.value_of("bind").unwrap();
let file = matches.value_of_os("file").unwrap();
let mediawiki_api = matches.value_of("mediawiki_api").unwrap();
let mediawiki_base_url = matches.value_of("mediawiki_base_url").unwrap();
let namespaces = matches

Loading…
Cancel
Save