From 72575ccadb235c6636ef0e10519caee5dc2a4ffd Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 24 Mar 2019 13:39:47 +0200 Subject: Use scdoc to generate manpages --- doc/man/smolbote.1.scd | 88 ++++++++++++++++++++++++++++++++++++++ doc/man/smolbote.5.scd | 106 ++++++++++++++++++++++++++++++++++++++++++++++ doc/meson.build | 56 ++++++++++--------------- doc/smolbote.5.asciidoc | 109 ------------------------------------------------ doc/smolbote.7.asciidoc | 39 ----------------- 5 files changed, 216 insertions(+), 182 deletions(-) create mode 100644 doc/man/smolbote.1.scd create mode 100644 doc/man/smolbote.5.scd delete mode 100644 doc/smolbote.5.asciidoc delete mode 100644 doc/smolbote.7.asciidoc (limited to 'doc') diff --git a/doc/man/smolbote.1.scd b/doc/man/smolbote.1.scd new file mode 100644 index 0000000..4ca55b7 --- /dev/null +++ b/doc/man/smolbote.1.scd @@ -0,0 +1,88 @@ +smolbote(1) + +# NAME + +smolbote - yet another no-frills web browser + +# SYNOPSIS + +*poi* [options] [command/URL(s)] + +# DESCRIPTION + +smolbote is a cross-platform keep-it-simple free software web browser that +uses Qt and QtWebEngine. + +# USAGE + +## Command-line options +- `-h`, `--help`: Display command-line options list. +- `-v`, `--version`: Display version information. +- `--build`: Display build commit. +- `-c`, `--config`: Set configuration file. +- `--no-remote`: Don't check for other instances when starting. +- `-s, --session`: Open the selected session. +- `--pick-session`: Open all available sessions and select which one to open. + +## Profiles +A Profile is a collection of settings, policies, scripts, cookies, cache and +history. Profiles can be used to isolate pages from each other. + +Off-the-record profiles only use in-memory cache and save no files to disk. + +Profiles can be either temporary or permanent. Temporary profiles expire when +the application is closed, whereas permanent profiles are kept between runs. + +Each window has a default profile it uses when opening new tabs. This can be +changed from the window's menu. Additionally, tabs can have their profiles +individually changed from their context menu. + +Because profiles store all their data separately, you can log in into the same +site with a different account from each profile. However, links opened into new +tabs will still use the subwindow's default profile. For example, you can set a +profile to hold login information for a site, but all new tabs opened from that +site would still be using the default off-the-record profile. + +## Plugins +Plugins a way of extending smolbote's functionality using the Qt plugin system. +They are not to be confused with NPAPI/PPAPI or WebExtension plugins. + +To enable a plugin either copy it or symlink it in the plugins.path location, +or set its absolute path as the plugins.path. + +## Filters +smolbote has a singular URL request filter that is installed onto all profiles. +Any setting applied to it will be applied to all profiles. + +filter.header: A list of header-value pairs, separated by a colon (':'). + +You can specify multiple headers by using --filter.header multiple times: +``` +poi --filter.header "Dnt:1" --filter.header "Accept:text/html" +``` + +# SEE ALSO + +*smolbote*(5) - configuration file and options + +# AUTHORS + +Maintained by . + +Up-to-date sources can be found at https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote + +Bug reports and patches can be submitted by email to . + +# COPYRIGHT + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License version 3 as +published by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . diff --git a/doc/man/smolbote.5.scd b/doc/man/smolbote.5.scd new file mode 100644 index 0000000..063a050 --- /dev/null +++ b/doc/man/smolbote.5.scd @@ -0,0 +1,106 @@ +smolbote(5) "smolbote configuration" + +# NAME + +smolbote - configuration file and options description + +# DESCRIPTION + +The smolbote configuration is loaded at startup, and is not reloaded when +changed. By default (without any plugins), the browser does not change its +configuration or overwrite this file. Thus, it can be made read-only. + +The settings in this file change your preferences and keybindings. + +Lines starting with *#* are considered comments and ignored. + +Options taking multiple values (list options) can have multiple values set by +using the same option name multiple times. + +# SECTIONS + +## Browser Options + +*browser.stylesheet* (arg):: TODO + +*browser.iconTheme* (arg):: +Set arg as icon theme. + +*browser.locale* (arg):: +Set Qt localization. This will translate Qt strings, such as the dialog buttons. +For possible values see `/usr/share/qt/translations`. + +*browser.translation* (arg):: +Set browser localization. This will translate the rest of the browser. For +possible values, see `install-root/share/smolbote/lang`. + +*browser.session.path* (arg=~/.config/smolbote/session.d):: +Location where browser sessions should be saved and loaded from by default. + +*plugins.path* (arg=~/.config/smolbote/plugins.d):: +Location where plugins should be loaded from. + +*bookmarks.path* (arg=~/.config/smolbote/bookmarks.xbel):: +Default bookmarks location. +*bookmarks.shortcut* (arg=Ctrl+B):: +Show/Hide bookmakrs widget shortcut. + +*downloads.path* (arg=~/Downloads):: +Default downloads location. +*downloads.shortcut* (arg=Ctrl+D):: +Show/Hide downloads widget shortcut. + +## UI Options + +*mainwindow.height* (arg=720) +*mainwindow.width* (arg=1280) +*mainwindow.maximized* (arg=1):: Default window size and maximize toggle. + +*mainwindow.title* (arg=smolbote):: Default window title. + +*mainwindow.shortcuts.saveSession* (arg=Ctrl+S,S):: Save Session shortcut +*mainwindow.shortcuts.openSession* (arg=Ctrl+S,O):: Open Session shortcut +*mainwindow.shortcuts.newGroup* (arg=Ctrl+G):: New Group shortcut (subwindow) +*mainwindow.shortcuts.newWindow* (arg=Ctrl+N):: New Window shortcut +*mainwindow.shortcuts.about* (arg=F1):: About dialog shortcut +*mainwindow.shortcuts.quit* (arg=Ctrl+Q):: Quit shortcut +*mainwindow.shortcuts.search* (arg=F3):: Search in page shortcut +*mainwindow.shortcuts.tileWindows* (arg=F9):: Tile subwindows shortcut +*mainwindow.shortcuts.cascadeWindows* (arg=F10):: Cascade subwindows shortcut + +*navigation.movable* (arg=0):: Make navigation bar movable +*navigation.shortcuts.back* (arg=Ctrl+Left):: Back shortcut +*navigation.shortcuts.backMenu* (arg=Ctrl+Down):: Back menu shortcut +*navigation.shortcuts.forward* (arg=Ctrl+Right):: Forward shortcut +*navigation.shortcuts.forwardMenu* (arg=Ctrl+Up):: Forward menu shortcut +*navigation.shortcuts.refresh* (arg=F5):: Refresh shortcut +*navigation.shortcuts.reload* (arg=Ctrl+F5):: Reload shortcut +*navigation.shortcuts.home* (arg=Ctrl+Home):: Home shortcut + +*addressbar.shortcuts.focus* (arg=F4):: Focus on the address +*addressbar.shortcuts.menu* (arg=F2):: Show addressbar menu + +*subwindow.shortcuts.menu* (arg=Ctrl+M):: Show subwindow menu +*subwindow.shortcuts.new* (arg=Ctrl+T):: Create new tab shortcut +*subwindow.shortcuts.close* (arg=Ctrl+X):: Close tab shortcut +*subwindow.shortcuts.restoreTab* (arg=Ctrl+Shift+T):: Restore last closed tab +*subwindow.shortcuts.left* (arg=Ctrl+O):: Move to tab on the left +*subwindow.shortcuts.moveLeft* (arg=Ctrl+Shift+O):: Move tab to the left +*subwindow.shortcuts.right* (arg=Ctrl+P):: Move to tab on the right +*subwindow.shortcuts.moveRight* (arg=Ctrl+Shift+P):: Move tab to the right +*subwindow.shortcuts.fullscreen* (arg=F11):: Show page fullscreen + +## Security Options + +*filter.hosts* (arg=~/.config/smolbote/hosts.d):: Hostlist +*filter.adblock* arg:: TODO +*filter.header* (list):: +A list of HTTP headers to set. Each header should be given as a colon-separated +name:value pair. + +*profile.default* (arg):: Default browser profile +*profile.path* (arg=~/.config/smolbote/profiles.d):: Profile location +*profile.search* (arg=`https://duckduckgo.com/?q=%1&ia=web`):: +Default search engine. %1 is replaced by the search term. +*profile.homepage* (arg=`about:blank`):: Default homepage +*profile.newtab* (arg=`about:blank`):: Default new tab page diff --git a/doc/meson.build b/doc/meson.build index 26175ce..95ca486 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -1,42 +1,30 @@ -asciidoctor = find_program('asciidoctor', required: get_option('manpage'), disabler: true) +scdoc = find_program('scdoc', required: get_option('manpage'), disabler: true) +sh = find_program('sh', required: get_option('manpage'), native: true, disabler: true) -custom_target('manpage.7', - # list depend_files so the output can be updated if any of them are changed - depend_files: ['smolbote.7.asciidoc', 'Usage/CommandLine.asciidoc', 'Usage/Configuration.asciidoc', 'Usage/Profile.asciidoc', 'Usage/Plugins.asciidoc', 'Usage/Filter.asciidoc'], - - input: 'smolbote.7.asciidoc', - output: 'smolbote.7', +man_files = ['man/smolbote.1.scd', 'man/smolbote.5.scd'] - command: [asciidoctor, '--backend=manpage', '--out-file=@OUTPUT@', '@INPUT@'], +foreach input : man_files + topic = input.split('/')[-1].split('.')[-3] + section = input.split('.')[-2] + output = '@0@.@1@'.format(topic, section) - build_by_default: get_option('manpage').enabled(), - install: get_option('manpage').enabled(), - install_dir: join_paths(get_option('mandir'), 'man7') -) + message('creating manpage target ' + output) + custom_target(output, + build_by_default: true, -custom_target('manpage.5', - # list of files this target depends on - depend_files: ['smolbote.5.asciidoc'], + input: input, + output: output, - input: 'smolbote.5.asciidoc', - output: 'smolbote.5', + # scdoc takes input from stdin, and prints its output to stdout + # meson uses 'capture' to store stdout to output, but there is no stdin toggle + #command: [scdoc], + #capture: true, - command: [asciidoctor, '--backend=manpage', '--out-file=@OUTPUT@', '@INPUT@'], + # workaround using sh + command: [sh, '-c', '@0@ < @INPUT0@ > @OUTPUT0@'.format(scdoc.path())], - build_by_default: get_option('manpage').enabled(), - install: get_option('manpage').enabled(), - install_dir: get_option('mandir') / 'man5' -) - -custom_target('manual', - depend_files: ['smolbote.asciidoc'], - - input: 'smolbote.asciidoc', - output: 'manual.html', - - command: [asciidoctor, '-a', 'imagesdir=images', '--out-file=@OUTPUT@', '@INPUT@'], - - build_by_default: false, - install: false -) + install: true, + install_dir: '@0@/man@1@'.format(get_option('mandir'), section) + ) +endforeach diff --git a/doc/smolbote.5.asciidoc b/doc/smolbote.5.asciidoc deleted file mode 100644 index 5b17a36..0000000 --- a/doc/smolbote.5.asciidoc +++ /dev/null @@ -1,109 +0,0 @@ -= smolbote(5) -:doctype: manpage -:man source: smolbote configuration -:man manual: smolbote configuration manpage -:toc: -:homepage: https://neueland.iserlohn-fortress.net/smolbote/ - -== Name -smolbote - configuration file and options description - -== Description -The smolbote configuration is loaded at startup, and is not reloaded when -changed. By default (without any plugins), the browser does not change its -configuration or overwrite this file. Thus, it can be made read-only. - -The settings in this file change your preferences and keybindings. - -Lines starting with *#* are considered comments and ignored. - -Options taking multiple values (list options) can have multiple values set by -using the same option name multiple times. - -== Sections - -=== Browser Options - -*browser.stylesheet* (arg):: TODO - -*browser.iconTheme* (arg):: -Set arg as icon theme. - -*browser.locale* (arg):: -Set Qt localization. This will translate Qt strings, such as the dialog buttons. -For possible values see `/usr/share/qt/translations`. - -*browser.translation* (arg):: -Set browser localization. This will translate the rest of the browser. For -possible values, see `install-root/share/smolbote/lang`. - -*browser.session.path* (arg=~/.config/smolbote/session.d):: -Location where browser sessions should be saved and loaded from by default. - -*plugins.path* (arg=~/.config/smolbote/plugins.d):: -Location where plugins should be loaded from. - -*bookmarks.path* (arg=~/.config/smolbote/bookmarks.xbel):: -Default bookmarks location. -*bookmarks.shortcut* (arg=Ctrl+B):: -Show/Hide bookmakrs widget shortcut. - -*downloads.path* (arg=~/Downloads):: -Default downloads location. -*downloads.shortcut* (arg=Ctrl+D):: -Show/Hide downloads widget shortcut. - -=== UI Options - -*mainwindow.height* (arg=720) -*mainwindow.width* (arg=1280) -*mainwindow.maximized* (arg=1):: Default window size and maximize toggle. - -*mainwindow.title* (arg=smolbote):: Default window title. - -*mainwindow.shortcuts.saveSession* (arg=Ctrl+S,S):: Save Session shortcut -*mainwindow.shortcuts.openSession* (arg=Ctrl+S,O):: Open Session shortcut -*mainwindow.shortcuts.newGroup* (arg=Ctrl+G):: New Group shortcut (subwindow) -*mainwindow.shortcuts.newWindow* (arg=Ctrl+N):: New Window shortcut -*mainwindow.shortcuts.about* (arg=F1):: About dialog shortcut -*mainwindow.shortcuts.quit* (arg=Ctrl+Q):: Quit shortcut -*mainwindow.shortcuts.search* (arg=F3):: Search in page shortcut -*mainwindow.shortcuts.tileWindows* (arg=F9):: Tile subwindows shortcut -*mainwindow.shortcuts.cascadeWindows* (arg=F10):: Cascade subwindows shortcut - -*navigation.movable* (arg=0):: Make navigation bar movable -*navigation.shortcuts.back* (arg=Ctrl+Left):: Back shortcut -*navigation.shortcuts.backMenu* (arg=Ctrl+Down):: Back menu shortcut -*navigation.shortcuts.forward* (arg=Ctrl+Right):: Forward shortcut -*navigation.shortcuts.forwardMenu* (arg=Ctrl+Up):: Forward menu shortcut -*navigation.shortcuts.refresh* (arg=F5):: Refresh shortcut -*navigation.shortcuts.reload* (arg=Ctrl+F5):: Reload shortcut -*navigation.shortcuts.home* (arg=Ctrl+Home):: Home shortcut - -*addressbar.shortcuts.focus* (arg=F4):: Focus on the address -*addressbar.shortcuts.menu* (arg=F2):: Show addressbar menu - -*subwindow.shortcuts.menu* (arg=Ctrl+M):: Show subwindow menu -*subwindow.shortcuts.new* (arg=Ctrl+T):: Create new tab shortcut -*subwindow.shortcuts.close* (arg=Ctrl+X):: Close tab shortcut -*subwindow.shortcuts.restoreTab* (arg=Ctrl+Shift+T):: Restore last closed tab -*subwindow.shortcuts.left* (arg=Ctrl+O):: Move to tab on the left -*subwindow.shortcuts.moveLeft* (arg=Ctrl+Shift+O):: Move tab to the left -*subwindow.shortcuts.right* (arg=Ctrl+P):: Move to tab on the right -*subwindow.shortcuts.moveRight* (arg=Ctrl+Shift+P):: Move tab to the right -*subwindow.shortcuts.fullscreen* (arg=F11):: Show page fullscreen - -=== Security Options - -*filter.hosts* (arg=~/.config/smolbote/hosts.d):: Hostlist -*filter.adblock* arg:: TODO -*filter.header* (list):: -A list of HTTP headers to set. Each header should be given as a colon-separated -name:value pair. - -*profile.default* (arg):: Default browser profile -*profile.path* (arg=~/.config/smolbote/profiles.d):: Profile location -*profile.search* (arg=`https://duckduckgo.com/?q=%1&ia=web`):: -Default search engine. %1 is replaced by the search term. -*profile.homepage* (arg=`about:blank`):: Default homepage -*profile.newtab* (arg=`about:blank`):: Default new tab page diff --git a/doc/smolbote.7.asciidoc b/doc/smolbote.7.asciidoc deleted file mode 100644 index a950816..0000000 --- a/doc/smolbote.7.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -= smolbote(7) -:doctype: manpage -:man source: smolbote -:man manual: smolbote manpage -:toc: -:homepage: https://neueland.iserlohn-fortress.net/smolbote/ - -== Name -smolbote - yet another no-frills web browser - -== Synopsis -*poi* ['-OPTION' ['...']] ['COMMAND'] ['URL' ['...']] - -== Description -smolbote is a cross-platform keep-it-simple free software web browser based on -Qt and QtWebEngine. - -include::Usage/CommandLine.asciidoc[] - -include::Usage/Configuration.asciidoc[] - -include::Usage/Profile.asciidoc[] - -include::Usage/Plugins.asciidoc[] - -include::Usage/Filter.asciidoc[] - -== Copyright -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License version 3 as -published by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -- cgit v1.2.1