Skip to content

Update help's default value based on config.h #150

@fangfufu

Description

@fangfufu

The description here:

httpdirfs/src/main.c

Lines 346 to 399 in 9e383ad

static void print_long_help()
{
/* FUSE prints its help to stderr */
fprintf(stderr, "\n\
general options:\n\
--config Specify a configuration file \n\
-o opt,[opt...] Mount options\n\
-h --help Print help\n\
-V --version Print version\n\
\n\
HTTPDirFS options:\n\
-u --username HTTP authentication username\n\
-p --password HTTP authentication password\n\
-P --proxy Proxy for libcurl, for more details refer to\n\
https://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html\n\
--proxy-username Username for the proxy\n\
--proxy-password Password for the proxy\n\
--proxy-cacert Certificate authority for the proxy\n\
--cache Enable cache (default: off)\n\
--cache-location Set a custom cache location\n\
(default: \"${XDG_CACHE_HOME}/httpdirfs\")\n\
--cacert Certificate authority for the server\n\
--dl-seg-size Set cache download segment size, in MB (default: 8)\n\
Note: this setting is ignored if previously\n\
cached data is found for the requested file.\n\
--max-seg-count Set maximum number of download segments a file\n\
can have. (default: 128*1024)\n\
With the default setting, the maximum memory usage\n\
per file is 128KB. This allows caching files up\n\
to 1TB in size using the default segment size.\n\
--max-conns Set maximum number of network connections that\n\
libcurl is allowed to make. (default: 10)\n\
--refresh-timeout X Refresh directories after X seconds\n\
--retry-wait Set delay in seconds before retrying an HTTP request\n\
after encountering an error. (default: 5)\n\
--user-agent Set user agent string (default: \"HTTPDirFS\")\n\
--no-range-check Disable the built-in check for the server's support\n\
for HTTP range requests\n\
--insecure-tls Disable licurl TLS certificate verification by\n\
setting CURLOPT_SSL_VERIFYHOST to 0\n\
--single-file-mode Single file mode - rather than mounting a whole\n\
directory, present a single file inside a virtual\n\
directory.\n\
\n\
For mounting a Airsonic / Subsonic server:\n\
--sonic-username The username for your Airsonic / Subsonic server\n\
--sonic-password The password for your Airsonic / Subsonic server\n\
--sonic-id3 Enable ID3 mode - this present the server content in\n\
Artist/Album/Song layout \n\
--sonic-insecure Authenticate against your Airsonic / Subsonic server\n\
using the insecure username / hex encoded password\n\
scheme\n\
\n");
}

should be dynamically updated based on https://github.com/fangfufu/httpdirfs/blob/master/src/config.h

This reduces maintenance load.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions