From 8ea0fc593718444c4703d353ad7537301aa5c52c Mon Sep 17 00:00:00 2001
From: thevickypedia Download custom-built executables
+
-Additionally, custom GitHub sources can be configured by specifying the environment variables, `GIT_OWNER` and `GIT_REPO`,
-provided that the executables are uploaded to releases as assets, and follows the naming convention below.
+Additionally, custom source _(to download binaries)_ can be configured by specifying the environment variables,
+`GIT_OWNER` and `GIT_REPO`
+For this custom source feature to work, the executable should be uploaded to releases as assets,
+and follow the naming convention below.
> **asset naming convention:** `${operating system}-{architecture}-filebrowser-{extension}`
> **example:** `darwin-amd64-filebrowser.tar.gz`
@@ -63,8 +66,8 @@ User profile's permissions are automatically set based on the `admin` flag.
Refer [samples] directory for sample `.env` files. For nested configuration settings, refer the [runbook]
-> :warning: Any configuration changes made in the UI will be lost, unless backed up manually.
-Changes should always go through the `.env` files.
+> Any configuration changes made in the UI will be lost, unless backed up manually.
+> Changes should always go through the `.env` files.
**[OR]**
@@ -81,7 +84,22 @@ if __name__ == '__main__':
file_browser.start()
```
-> :bulb: Object level instantiation might be complex for configuration settings. So it is better to use `.env` files instead.
+> Object level instantiation might be complex for configuration settings. So it is better to use `.env` files instead.
+
+## Coding Standards
+Docstring format: [`Google`][google-docs]
+Styling conventions: [`PEP 8`][pep8] and [`isort`][isort]
+
+## [Release Notes][release-notes]
+**Requirement**
+```shell
+pip install gitverse
+```
+
+**Usage**
+```shell
+gitverse-release reverse -f release_notes.rst -t 'Release Notes'
+```
## Linting
`pre-commit` will ensure linting, and generate runbook
@@ -130,3 +148,7 @@ Licensed under the [MIT License][license]
[gha_none_shall_pass_badge]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/markdown.yml/badge.svg
[gha_cleanup_workflows]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/cleanup.yml
[gha_cleanup_workflows_badge]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/cleanup.yml/badge.svg
+[release-notes]: https://github.com/thevickypedia/pyfilebrowser/blob/main/release_notes.rst
+[google-docs]: https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings
+[pep8]: https://www.python.org/dev/peps/pep-0008/
+[isort]: https://pycqa.github.io/isort/
diff --git a/docs/README.html b/docs/README.html
index cf3711f..7bd1cc8 100644
--- a/docs/README.html
+++ b/docs/README.html
@@ -60,8 +60,11 @@ PyFileBrowser
pyfilebrowser
automatically downloads the system specific executable during startup.
Additionally, custom GitHub sources can be configured by specifying the environment variables, GIT_OWNER
and GIT_REPO
,
-provided that the executables are uploaded to releases as assets, and follows the naming convention below.
Additionally, custom source (to download binaries) can be configured by specifying the environment variables,
+GIT_OWNER
and GIT_REPO
+For this custom source feature to work, the executable should be uploaded to releases as assets,
+and follow the naming convention below.
asset naming convention:
@@ -95,7 +98,7 @@${operating system}-{architecture}-filebrowser-{extension}
example:darwin-amd64-filebrowser.tar.gz
.envadmin
flag.Refer samples directory for sample
.env
files. For nested configuration settings, refer the runbook-:warning: Any configuration changes made in the UI will be lost, unless backed up manually.
+Any configuration changes made in the UI will be lost, unless backed up manually.
Changes should always go through the.env
files.[OR]
@@ -112,10 +115,26 @@
.env
-:bulb: Object level instantiation might be complex for configuration settings. So it is better to use
+.env
files instead.+Object level instantiation might be complex for configuration settings. So it is better to use
.env
files instead.+ +Coding Standards¶
+Docstring format:
+
+Styling conventions:PEP 8
andisort
+ Release Notes¶
+Requirement
+++pip install gitverse +Usage
+++gitverse-release reverse -f release_notes.rst -t 'Release Notes' +Linting¶
@@ -161,6 +180,8 @@
pre-commit
will ensure linting, and generate runbookTable of Contents
+ .env
filesCoding Standards +Release Notes Linting Pypi Package Runbook diff --git a/docs/README.md b/docs/README.md index e3e7677..a44054e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -25,9 +25,12 @@ way of handling the configuration and initialization.Download custom-built executables
+
-Additionally, custom GitHub sources can be configured by specifying the environment variables, `GIT_OWNER` and `GIT_REPO`, -provided that the executables are uploaded to releases as assets, and follows the naming convention below. +Additionally, custom source _(to download binaries)_ can be configured by specifying the environment variables, +`GIT_OWNER` and `GIT_REPO`
+For this custom source feature to work, the executable should be uploaded to releases as assets, +and follow the naming convention below. > **asset naming convention:** `${operating system}-{architecture}-filebrowser-{extension}`
> **example:** `darwin-amd64-filebrowser.tar.gz` @@ -63,8 +66,8 @@ User profile's permissions are automatically set based on the `admin` flag. Refer [samples] directory for sample `.env` files. For nested configuration settings, refer the [runbook] -> :warning: Any configuration changes made in the UI will be lost, unless backed up manually.
-Changes should always go through the `.env` files. +> Any configuration changes made in the UI will be lost, unless backed up manually.
+> Changes should always go through the `.env` files. **[OR]** @@ -81,7 +84,22 @@ if __name__ == '__main__': file_browser.start() ``` -> :bulb: Object level instantiation might be complex for configuration settings. So it is better to use `.env` files instead. +> Object level instantiation might be complex for configuration settings. So it is better to use `.env` files instead. + +## Coding Standards +Docstring format: [`Google`][google-docs]
+Styling conventions: [`PEP 8`][pep8] and [`isort`][isort] + +## [Release Notes][release-notes] +**Requirement** +```shell +pip install gitverse +``` + +**Usage** +```shell +gitverse-release reverse -f release_notes.rst -t 'Release Notes' +``` ## Linting `pre-commit` will ensure linting, and generate runbook @@ -130,3 +148,7 @@ Licensed under the [MIT License][license] [gha_none_shall_pass_badge]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/markdown.yml/badge.svg [gha_cleanup_workflows]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/cleanup.yml [gha_cleanup_workflows_badge]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/cleanup.yml/badge.svg +[release-notes]: https://github.com/thevickypedia/pyfilebrowser/blob/main/release_notes.rst +[google-docs]: https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings +[pep8]: https://www.python.org/dev/peps/pep-0008/ +[isort]: https://pycqa.github.io/isort/ diff --git a/docs/_sources/README.md.txt b/docs/_sources/README.md.txt index e3e7677..a44054e 100644 --- a/docs/_sources/README.md.txt +++ b/docs/_sources/README.md.txt @@ -25,9 +25,12 @@ way of handling the configuration and initialization.Download custom-built executables
+
-Additionally, custom GitHub sources can be configured by specifying the environment variables, `GIT_OWNER` and `GIT_REPO`, -provided that the executables are uploaded to releases as assets, and follows the naming convention below. +Additionally, custom source _(to download binaries)_ can be configured by specifying the environment variables, +`GIT_OWNER` and `GIT_REPO`
+For this custom source feature to work, the executable should be uploaded to releases as assets, +and follow the naming convention below. > **asset naming convention:** `${operating system}-{architecture}-filebrowser-{extension}`
> **example:** `darwin-amd64-filebrowser.tar.gz` @@ -63,8 +66,8 @@ User profile's permissions are automatically set based on the `admin` flag. Refer [samples] directory for sample `.env` files. For nested configuration settings, refer the [runbook] -> :warning: Any configuration changes made in the UI will be lost, unless backed up manually.
-Changes should always go through the `.env` files. +> Any configuration changes made in the UI will be lost, unless backed up manually.
+> Changes should always go through the `.env` files. **[OR]** @@ -81,7 +84,22 @@ if __name__ == '__main__': file_browser.start() ``` -> :bulb: Object level instantiation might be complex for configuration settings. So it is better to use `.env` files instead. +> Object level instantiation might be complex for configuration settings. So it is better to use `.env` files instead. + +## Coding Standards +Docstring format: [`Google`][google-docs]
+Styling conventions: [`PEP 8`][pep8] and [`isort`][isort] + +## [Release Notes][release-notes] +**Requirement** +```shell +pip install gitverse +``` + +**Usage** +```shell +gitverse-release reverse -f release_notes.rst -t 'Release Notes' +``` ## Linting `pre-commit` will ensure linting, and generate runbook @@ -130,3 +148,7 @@ Licensed under the [MIT License][license] [gha_none_shall_pass_badge]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/markdown.yml/badge.svg [gha_cleanup_workflows]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/cleanup.yml [gha_cleanup_workflows_badge]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/cleanup.yml/badge.svg +[release-notes]: https://github.com/thevickypedia/pyfilebrowser/blob/main/release_notes.rst +[google-docs]: https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings +[pep8]: https://www.python.org/dev/peps/pep-0008/ +[isort]: https://pycqa.github.io/isort/ diff --git a/docs/index.html b/docs/index.html index 0a5e533..7eb70f2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -50,6 +50,8 @@Welcome to PyFileBrowser’s documentation!PyFileBrowser
- Kick Off
- Environment Variables
+- Coding Standards
+- Release Notes
- Linting
- Pypi Package
- Runbook
diff --git a/docs/searchindex.js b/docs/searchindex.js index d1b9109..60edcaf 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["README", "index"], "filenames": ["README.md", "index.rst"], "titles": ["PyFileBrowser", "Welcome to PyFileBrowser\u2019s documentation!"], "terms": {"deploy": 0, "introduc": 0, "python": 0, "librari": 0, "design": 0, "streamlin": 0, "interact": 0, "filebrows": [0, 1], "thi": [0, 1], "wrapper": [0, 1], "simplifi": 0, "integr": 0, "autom": 0, "task": 0, "enabl": [0, 1], "seamless": 0, "your": [0, 1], "local": [0, 1], "system": [0, 1], "via": 0, "": 0, "web": 0, "interfac": 0, "all": [0, 1], "requir": [0, 1], "configur": 0, "set": [0, 1], "user": 0, "profil": [0, 1], "ar": [0, 1], "load": [0, 1], "us": [0, 1], "provid": 0, "more": 0, "central": 0, "wai": 0, "handl": [0, 1], "initi": [0, 1], "automat": 0, "download": 0, "specif": 0, "execut": [0, 1], "dure": 0, "startup": 0, "custom": [0, 1], "built": 0, "addition": 0, "github": [0, 1], "sourc": [0, 1], "can": 0, "specifi": [0, 1], "git_own": 0, "git_repo": 0, "upload": [0, 1], "releas": [0, 1], "asset": [0, 1], "follow": 0, "name": [0, 1], "convent": 0, "below": 0, "oper": 0, "architectur": 0, "extens": [0, 1], "exampl": 0, "darwin": 0, "amd64": 0, "tar": 0, "gz": 0, "instal": 0, "m": 0, "pip": 0, "import": [0, 1], "__name__": 0, "__main__": 0, "browser": 0, "start": [0, 1], "var": [0, 1], "either": 0, "from": [0, 1], "directli": 0, "pass": [0, 1], "object": [0, 1], "init": 0, "config": [0, 1], "server": [0, 1], "default": [0, 1], "refer": [0, 1], "each": [0, 1], "multipl": [0, 1], "user1": 0, "user2": 0, "so": 0, "permiss": [0, 1], "base": [0, 1], "admin": [0, 1], "flag": [0, 1], "sampl": 0, "directori": [0, 1], "For": 0, "nest": [0, 1], "warn": 0, "ani": [0, 1], "chang": 0, "made": 0, "ui": 0, "lost": 0, "unless": 0, "back": 0, "up": 0, "manual": 0, "should": [0, 1], "alwai": 0, "go": 0, "through": [0, 1], "OR": 0, "file_brows": 0, "user_profil": [0, 1], "authent": [0, 1], "usernam": [0, 1], "password": [0, 1], "true": 0, "user123": 0, "pwd456": 0, "fals": [0, 1], "bulb": 0, "level": 0, "instanti": [0, 1], "might": 0, "complex": [0, 1], "i": [0, 1], "better": 0, "instead": 0, "pre": 0, "commit": 0, "ensur": 0, "gener": [0, 1], "sphinx": 0, "5": 0, "1": 0, "recommonmark": 0, "usag": 0, "run": [0, 1], "http": [0, 1], "org": 0, "project": 0, "thevickypedia": 0, "io": 0, "vignesh": 0, "rao": 0, "under": 0, "mit": 0, "kick": 1, "off": 1, "environ": 1, "variabl": 1, "lint": 1, "pypi": 1, "packag": 1, "runbook": 1, "licens": 1, "copyright": 1, "class": 1, "kwarg": 1, "stream": 1, "keyword": 1, "argument": 1, "logger": 1, "bring": 1, "own": 1, "run_subprocess": 1, "list": 1, "str": 1, "none": 1, "failed_msg": 1, "stdout": 1, "bool": 1, "command": 1, "subprocess": 1, "paramet": 1, "binari": 1, "failur": 1, "messag": 1, "case": 1, "bad": 1, "return": 1, "code": 1, "boolean": 1, "show": 1, "hide": 1, "standard": 1, "output": 1, "create_us": 1, "creat": 1, "json": 1, "file": 1, "create_config": 1, "import_config": 1, "import_us": 1, "handler": 1, "function": 1, "abov": 1, "pydantic_set": 1, "baseset": 1, "section": 1, "new": 1, "pars": 1, "valid": 1, "input": 1, "data": 1, "rais": 1, "validationerror": 1, "pydantic_cor": 1, "cannot": 1, "form": 1, "self": 1, "explicitli": 1, "posit": 1, "onli": 1, "allow": 1, "field": 1, "root": 1, "path": 1, "baseurl": 1, "option": 1, "socket": 1, "tlskei": 1, "union": 1, "tlscert": 1, "port": 1, "int": 1, "address": 1, "log": 1, "enablethumbnail": 1, "resizepreview": 1, "enableexec": 1, "typedetectionbyhead": 1, "authhook": 1, "tokenexpirationtim": 1, "env_prefix": 1, "env_fil": 1, "env": 1, "extra": 1, "ignor": 1, "brand": 1, "prefix": 1, "branding_": 1, "present": 1, "disableextern": 1, "disableusedpercentag": 1, "theme": 1, "color": 1, "tu": 1, "tus_": 1, "chunksiz": 1, "retrycount": 1, "defaults_": 1, "scope": 1, "viewmod": 1, "singleclick": 1, "sort": 1, "perm": 1, "hidedotfil": 1, "dateformat": 1, "befor": 1, "after": 1, "certain": 1, "event": 1, "The": 1, "runner": 1, "featur": 1, "you": 1, "shell": 1, "after_copi": 1, "after_delet": 1, "after_renam": 1, "after_sav": 1, "after_upload": 1, "before_copi": 1, "before_delet": 1, "before_renam": 1, "before_sav": 1, "before_upload": 1, "commands_": 1, "signup": 1, "createuserdir": 1, "userhomebasepath": 1, "authmethod": 1, "shell_": 1, "rule": 1, "recaptcha": 1, "pydant": 1, "basemodel": 1, "host": 1, "url": 1, "kei": 1, "secret": 1, "auther": 1, "auth_": 1, "configset": 1, "strenum": 1, "enum": 1, "differ": 1, "light": 1, "dark": 1, "blank": 1, "sortbi": 1, "size": 1, "modifi": 1, "asc": 1, "renam": 1, "delet": 1, "share": 1, "admin_perm": 1, "administr": 1, "type": 1, "default_perm": 1, "non": 1, "userset": 1, "lockpassword": 1, "classmethod": 1, "from_env_fil": 1, "instanc": 1, "machin": 1, "filebrowser_o": 1, "filebrowser_bin": 1, "filebrowser_dl_ext": 1, "filebrowser_arch": 1, "filebrowser_fil": 1, "filebrowser_db": 1, "extendedenvsettingssourc": 1, "envsettingssourc": 1, "environment": 1, "get_field_valu": 1, "fieldinfo": 1, "field_nam": 1, "tupl": 1, "retriev": 1, "valu": 1, "support": 1, "inform": 1, "about": 1, "whether": 1, "extendedsettingsconfigdict": 1, "settingsconfigdict": 1, "dictionari": 1, "addit": 1, "consid": 1, "extendedbaseset": 1, "settings_customise_sourc": 1, "extend": 1, "settings_cl": 1, "init_set": 1, "pydanticbasesettingssourc": 1, "env_set": 1, "dotenv_set": 1, "file_secret_set": 1, "dotenv": 1, "account": 1, "com": 1, "discuss": 1, "4319": 1, "which": 1, "appropri": 1, "control": 1, "dot": 1, "regular": 1, "owner": 1, "repo": 1, "token": 1, "latest": 1, "envconfig": 1, "across": 1, "config_set": 1, "load_user_profil": 1, "current": 1, "fileio": 1, "settings_dir": 1, "default_logg": 1, "log_to_fil": 1, "consol": 1, "hash_password": 1, "salt": 1, "hash": 1, "given": 1, "text": 1, "plain": 1, "decod": 1, "string": 1, "validate_password": 1, "hashed_password": 1, "match": 1, "version": 1, "remove_trailing_underscor": 1, "dict": 1, "iter": 1, "remov": 1, "end": 1, "an": 1, "_": 1, "underscor": 1, "same": 1, "trail": 1, "remove_prefix": 1, "part": 1, "index": 1, "search": 1, "page": 1}, "objects": {"pyfilebrowser": [[1, 0, 0, "-", "main"]], "pyfilebrowser.main": [[1, 1, 1, "", "FileBrowser"]], "pyfilebrowser.main.FileBrowser": [[1, 2, 1, "", "create_config"], [1, 2, 1, "", "create_users"], [1, 2, 1, "", "import_config"], [1, 2, 1, "", "import_users"], [1, 2, 1, "", "run_subprocess"], [1, 2, 1, "", "start"]], "pyfilebrowser.modals.config": [[1, 1, 1, "", "Auther"], [1, 1, 1, "", "Branding"], [1, 1, 1, "", "Commands"], [1, 1, 1, "", "Config"], [1, 1, 1, "", "ConfigSettings"], [1, 1, 1, "", "Defaults"], [1, 1, 1, "", "ReCAPTCHA"], [1, 1, 1, "", "Server"], [1, 1, 1, "", "Tus"]], "pyfilebrowser.modals.config.Auther": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "recaptcha"]], "pyfilebrowser.modals.config.Auther.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.modals.config.Branding": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "color"], [1, 3, 1, "", "disableExternal"], [1, 3, 1, "", "disableUsedPercentage"], [1, 3, 1, "", "files"], [1, 3, 1, "", "name"], [1, 3, 1, "", "theme"]], "pyfilebrowser.modals.config.Branding.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.modals.config.Commands": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "after_copy"], [1, 3, 1, "", "after_delete"], [1, 3, 1, "", "after_rename"], [1, 3, 1, "", "after_save"], [1, 3, 1, "", "after_upload"], [1, 3, 1, "", "before_copy"], [1, 3, 1, "", "before_delete"], [1, 3, 1, "", "before_rename"], [1, 3, 1, "", "before_save"], [1, 3, 1, "", "before_upload"]], "pyfilebrowser.modals.config.Commands.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.modals.config.Config": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "authMethod"], [1, 3, 1, "", "branding"], [1, 3, 1, "", "commands"], [1, 3, 1, "", "createUserDir"], [1, 3, 1, "", "defaults"], [1, 3, 1, "", "rules"], [1, 3, 1, "", "shell_"], [1, 3, 1, "", "signup"], [1, 3, 1, "", "tus"], [1, 3, 1, "", "userHomeBasePath"]], "pyfilebrowser.modals.config.Config.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.modals.config.ConfigSettings": [[1, 3, 1, "", "auther"], [1, 3, 1, "", "server"], [1, 3, 1, "", "settings"]], "pyfilebrowser.modals.config.Defaults": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "commands"], [1, 3, 1, "", "dateFormat"], [1, 3, 1, "", "hideDotfiles"], [1, 3, 1, "", "locale"], [1, 3, 1, "", "perm"], [1, 3, 1, "", "scope"], [1, 3, 1, "", "singleClick"], [1, 3, 1, "", "sorting"], [1, 3, 1, "", "viewMode"]], "pyfilebrowser.modals.config.Defaults.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.modals.config.ReCAPTCHA": [[1, 3, 1, "", "host"], [1, 3, 1, "", "key"], [1, 3, 1, "", "secret"]], "pyfilebrowser.modals.config.Server": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "address"], [1, 3, 1, "", "authHook"], [1, 3, 1, "", "baseURL"], [1, 3, 1, "", "enableExec"], [1, 3, 1, "", "enableThumbnails"], [1, 3, 1, "", "log"], [1, 3, 1, "", "port"], [1, 3, 1, "", "resizePreview"], [1, 3, 1, "", "root"], [1, 3, 1, "", "socket"], [1, 3, 1, "", "tlsCert"], [1, 3, 1, "", "tlsKey"], [1, 3, 1, "", "tokenExpirationTime"], [1, 3, 1, "", "typeDetectionByHeader"]], "pyfilebrowser.modals.config.Server.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.modals.config.Tus": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "chunkSize"], [1, 3, 1, "", "retryCount"]], "pyfilebrowser.modals.config.Tus.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.modals": [[1, 0, 0, "-", "models"]], "pyfilebrowser.modals.models": [[1, 1, 1, "", "Log"], [1, 1, 1, "", "Perm"], [1, 1, 1, "", "SortBy"], [1, 1, 1, "", "Sorting"], [1, 1, 1, "", "Theme"], [1, 4, 1, "", "admin_perm"], [1, 4, 1, "", "default_perm"]], "pyfilebrowser.modals.models.Log": [[1, 3, 1, "", "file"], [1, 3, 1, "", "stdout"]], "pyfilebrowser.modals.models.Perm": [[1, 3, 1, "", "admin"], [1, 3, 1, "", "create"], [1, 3, 1, "", "delete"], [1, 3, 1, "", "download"], [1, 3, 1, "", "execute"], [1, 3, 1, "", "modify"], [1, 3, 1, "", "rename"], [1, 3, 1, "", "share"]], "pyfilebrowser.modals.models.SortBy": [[1, 3, 1, "", "modified"], [1, 3, 1, "", "name"], [1, 3, 1, "", "size"]], "pyfilebrowser.modals.models.Sorting": [[1, 3, 1, "", "asc"], [1, 3, 1, "", "by"]], "pyfilebrowser.modals.models.Theme": [[1, 3, 1, "", "blank"], [1, 3, 1, "", "dark"], [1, 3, 1, "", "light"]], "pyfilebrowser.modals.users": [[1, 1, 1, "", "Authentication"], [1, 1, 1, "", "UserSettings"]], "pyfilebrowser.modals.users.Authentication": [[1, 3, 1, "", "admin"], [1, 3, 1, "", "password"], [1, 3, 1, "", "username"]], "pyfilebrowser.modals.users.UserSettings": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "authentication"], [1, 3, 1, "", "commands"], [1, 3, 1, "", "dateFormat"], [1, 2, 1, "", "from_env_file"], [1, 3, 1, "", "hideDotfiles"], [1, 3, 1, "", "locale"], [1, 3, 1, "", "lockPassword"], [1, 3, 1, "", "perm"], [1, 3, 1, "", "rules"], [1, 3, 1, "", "scope"], [1, 3, 1, "", "singleClick"], [1, 3, 1, "", "sorting"], [1, 3, 1, "", "viewMode"]], "pyfilebrowser.modals.users.UserSettings.Config": [[1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.squire": [[1, 0, 0, "-", "download"], [1, 0, 0, "-", "steward"]], "pyfilebrowser.squire.download": [[1, 1, 1, "", "Executable"], [1, 1, 1, "", "ExtendedEnvSettingsSource"], [1, 1, 1, "", "ExtendedSettingsConfigDict"], [1, 1, 1, "", "GitHub"], [1, 4, 1, "", "asset"]], "pyfilebrowser.squire.download.Executable": [[1, 3, 1, "", "filebrowser_arch"], [1, 3, 1, "", "filebrowser_bin"], [1, 3, 1, "", "filebrowser_db"], [1, 3, 1, "", "filebrowser_dl_ext"], [1, 3, 1, "", "filebrowser_file"], [1, 3, 1, "", "filebrowser_os"], [1, 3, 1, "", "machine"], [1, 3, 1, "", "system"]], "pyfilebrowser.squire.download.ExtendedEnvSettingsSource": [[1, 2, 1, "", "get_field_value"]], "pyfilebrowser.squire.download.ExtendedSettingsConfigDict": [[1, 3, 1, "", "env_prefixes"]], "pyfilebrowser.squire.download.GitHub": [[1, 3, 1, "", "owner"], [1, 3, 1, "", "repo"], [1, 3, 1, "", "token"]], "pyfilebrowser.squire.steward": [[1, 1, 1, "", "EnvConfig"], [1, 1, 1, "", "FileIO"], [1, 4, 1, "", "default_logger"], [1, 4, 1, "", "hash_password"], [1, 4, 1, "", "remove_prefix"], [1, 4, 1, "", "remove_trailing_underscore"], [1, 4, 1, "", "validate_password"]], "pyfilebrowser.squire.steward.EnvConfig": [[1, 3, 1, "", "config_settings"], [1, 2, 1, "", "load_user_profiles"], [1, 3, 1, "", "user_profiles"]], "pyfilebrowser.squire.steward.FileIO": [[1, 3, 1, "", "config"], [1, 3, 1, "", "settings_dir"], [1, 3, 1, "", "users"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:attribute", "4": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "function", "Python function"]}, "titleterms": {"pyfilebrows": [0, 1], "kick": 0, "off": 0, "environ": 0, "variabl": 0, "env": 0, "file": 0, "lint": 0, "pypi": 0, "packag": 0, "runbook": 0, "licens": 0, "copyright": 0, "welcom": 1, "": 1, "document": 1, "read": 1, "me": 1, "main": 1, "modul": 1, "modal": 1, "configur": 1, "model": 1, "user": 1, "squir": 1, "download": 1, "steward": 1, "indic": 1, "tabl": 1}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}}) \ No newline at end of file +Search.setIndex({"docnames": ["README", "index"], "filenames": ["README.md", "index.rst"], "titles": ["PyFileBrowser", "Welcome to PyFileBrowser\u2019s documentation!"], "terms": {"deploy": 0, "introduc": 0, "python": 0, "librari": 0, "design": 0, "streamlin": 0, "interact": 0, "filebrows": [0, 1], "thi": [0, 1], "wrapper": [0, 1], "simplifi": 0, "integr": 0, "autom": 0, "task": 0, "enabl": [0, 1], "seamless": 0, "your": [0, 1], "local": [0, 1], "system": [0, 1], "via": 0, "": 0, "web": 0, "interfac": 0, "all": [0, 1], "requir": [0, 1], "configur": 0, "set": [0, 1], "user": 0, "profil": [0, 1], "ar": [0, 1], "load": [0, 1], "us": [0, 1], "provid": 0, "more": 0, "central": 0, "wai": 0, "handl": [0, 1], "initi": [0, 1], "automat": 0, "download": 0, "specif": 0, "execut": [0, 1], "dure": 0, "startup": 0, "custom": [0, 1], "built": 0, "addition": 0, "sourc": [0, 1], "binari": [0, 1], "can": 0, "specifi": [0, 1], "git_own": 0, "git_repo": 0, "For": 0, "featur": [0, 1], "work": 0, "should": [0, 1], "upload": [0, 1], "asset": [0, 1], "follow": 0, "name": [0, 1], "convent": 0, "below": 0, "oper": 0, "architectur": 0, "extens": [0, 1], "exampl": 0, "darwin": 0, "amd64": 0, "tar": 0, "gz": 0, "instal": 0, "m": 0, "pip": 0, "import": [0, 1], "__name__": 0, "__main__": 0, "browser": 0, "start": [0, 1], "var": [0, 1], "either": 0, "from": [0, 1], "directli": 0, "pass": [0, 1], "object": [0, 1], "init": 0, "config": [0, 1], "server": [0, 1], "default": [0, 1], "refer": [0, 1], "each": [0, 1], "multipl": [0, 1], "user1": 0, "user2": 0, "so": 0, "permiss": [0, 1], "base": [0, 1], "admin": [0, 1], "flag": [0, 1], "sampl": 0, "directori": [0, 1], "nest": [0, 1], "ani": [0, 1], "chang": 0, "made": 0, "ui": 0, "lost": 0, "unless": 0, "back": 0, "up": 0, "manual": 0, "alwai": 0, "go": 0, "through": [0, 1], "OR": 0, "file_brows": 0, "user_profil": [0, 1], "authent": [0, 1], "usernam": [0, 1], "password": [0, 1], "true": 0, "user123": 0, "pwd456": 0, "fals": [0, 1], "level": 0, "instanti": [0, 1], "might": 0, "complex": [0, 1], "i": [0, 1], "better": 0, "instead": 0, "docstr": 0, "format": 0, "googl": 0, "style": 0, "pep": 0, "8": 0, "isort": 0, "gitvers": 0, "usag": 0, "revers": 0, "f": 0, "release_not": 0, "rst": 0, "t": 0, "pre": 0, "commit": 0, "ensur": 0, "gener": [0, 1], "sphinx": 0, "5": 0, "1": 0, "recommonmark": 0, "run": [0, 1], "http": [0, 1], "org": 0, "project": 0, "thevickypedia": 0, "github": [0, 1], "io": 0, "vignesh": 0, "rao": 0, "under": 0, "mit": 0, "kick": 1, "off": 1, "environ": 1, "variabl": 1, "code": 1, "standard": 1, "releas": 1, "note": 1, "lint": 1, "pypi": 1, "packag": 1, "runbook": 1, "licens": 1, "copyright": 1, "class": 1, "kwarg": 1, "stream": 1, "keyword": 1, "argument": 1, "logger": 1, "bring": 1, "own": 1, "run_subprocess": 1, "list": 1, "str": 1, "none": 1, "failed_msg": 1, "stdout": 1, "bool": 1, "command": 1, "subprocess": 1, "paramet": 1, "failur": 1, "messag": 1, "case": 1, "bad": 1, "return": 1, "boolean": 1, "show": 1, "hide": 1, "output": 1, "create_us": 1, "creat": 1, "json": 1, "file": 1, "create_config": 1, "import_config": 1, "import_us": 1, "handler": 1, "function": 1, "abov": 1, "pydantic_set": 1, "baseset": 1, "section": 1, "new": 1, "pars": 1, "valid": 1, "input": 1, "data": 1, "rais": 1, "validationerror": 1, "pydantic_cor": 1, "cannot": 1, "form": 1, "self": 1, "explicitli": 1, "posit": 1, "onli": 1, "allow": 1, "field": 1, "root": 1, "path": 1, "baseurl": 1, "option": 1, "socket": 1, "tlskei": 1, "union": 1, "tlscert": 1, "port": 1, "int": 1, "address": 1, "log": 1, "enablethumbnail": 1, "resizepreview": 1, "enableexec": 1, "typedetectionbyhead": 1, "authhook": 1, "tokenexpirationtim": 1, "env_prefix": 1, "env_fil": 1, "env": 1, "extra": 1, "ignor": 1, "brand": 1, "prefix": 1, "branding_": 1, "present": 1, "disableextern": 1, "disableusedpercentag": 1, "theme": 1, "color": 1, "tu": 1, "tus_": 1, "chunksiz": 1, "retrycount": 1, "defaults_": 1, "scope": 1, "viewmod": 1, "singleclick": 1, "sort": 1, "perm": 1, "hidedotfil": 1, "dateformat": 1, "befor": 1, "after": 1, "certain": 1, "event": 1, "The": 1, "runner": 1, "you": 1, "shell": 1, "after_copi": 1, "after_delet": 1, "after_renam": 1, "after_sav": 1, "after_upload": 1, "before_copi": 1, "before_delet": 1, "before_renam": 1, "before_sav": 1, "before_upload": 1, "commands_": 1, "signup": 1, "createuserdir": 1, "userhomebasepath": 1, "authmethod": 1, "shell_": 1, "rule": 1, "recaptcha": 1, "pydant": 1, "basemodel": 1, "host": 1, "url": 1, "kei": 1, "secret": 1, "auther": 1, "auth_": 1, "configset": 1, "strenum": 1, "enum": 1, "differ": 1, "light": 1, "dark": 1, "blank": 1, "sortbi": 1, "size": 1, "modifi": 1, "asc": 1, "renam": 1, "delet": 1, "share": 1, "admin_perm": 1, "administr": 1, "type": 1, "default_perm": 1, "non": 1, "userset": 1, "lockpassword": 1, "classmethod": 1, "from_env_fil": 1, "instanc": 1, "machin": 1, "filebrowser_o": 1, "filebrowser_bin": 1, "filebrowser_dl_ext": 1, "filebrowser_arch": 1, "filebrowser_fil": 1, "filebrowser_db": 1, "extendedenvsettingssourc": 1, "envsettingssourc": 1, "environment": 1, "get_field_valu": 1, "fieldinfo": 1, "field_nam": 1, "tupl": 1, "retriev": 1, "valu": 1, "support": 1, "inform": 1, "about": 1, "whether": 1, "extendedsettingsconfigdict": 1, "settingsconfigdict": 1, "dictionari": 1, "addit": 1, "consid": 1, "extendedbaseset": 1, "settings_customise_sourc": 1, "extend": 1, "settings_cl": 1, "init_set": 1, "pydanticbasesettingssourc": 1, "env_set": 1, "dotenv_set": 1, "file_secret_set": 1, "dotenv": 1, "account": 1, "com": 1, "discuss": 1, "4319": 1, "which": 1, "appropri": 1, "control": 1, "dot": 1, "regular": 1, "owner": 1, "repo": 1, "token": 1, "latest": 1, "envconfig": 1, "across": 1, "config_set": 1, "load_user_profil": 1, "current": 1, "fileio": 1, "settings_dir": 1, "default_logg": 1, "log_to_fil": 1, "consol": 1, "hash_password": 1, "salt": 1, "hash": 1, "given": 1, "text": 1, "plain": 1, "decod": 1, "string": 1, "validate_password": 1, "hashed_password": 1, "match": 1, "version": 1, "remove_trailing_underscor": 1, "dict": 1, "iter": 1, "remov": 1, "end": 1, "an": 1, "_": 1, "underscor": 1, "same": 1, "trail": 1, "remove_prefix": 1, "part": 1, "index": 1, "search": 1, "page": 1}, "objects": {"pyfilebrowser": [[1, 0, 0, "-", "main"]], "pyfilebrowser.main": [[1, 1, 1, "", "FileBrowser"]], "pyfilebrowser.main.FileBrowser": [[1, 2, 1, "", "create_config"], [1, 2, 1, "", "create_users"], [1, 2, 1, "", "import_config"], [1, 2, 1, "", "import_users"], [1, 2, 1, "", "run_subprocess"], [1, 2, 1, "", "start"]], "pyfilebrowser.modals.config": [[1, 1, 1, "", "Auther"], [1, 1, 1, "", "Branding"], [1, 1, 1, "", "Commands"], [1, 1, 1, "", "Config"], [1, 1, 1, "", "ConfigSettings"], [1, 1, 1, "", "Defaults"], [1, 1, 1, "", "ReCAPTCHA"], [1, 1, 1, "", "Server"], [1, 1, 1, "", "Tus"]], "pyfilebrowser.modals.config.Auther": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "recaptcha"]], "pyfilebrowser.modals.config.Auther.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.modals.config.Branding": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "color"], [1, 3, 1, "", "disableExternal"], [1, 3, 1, "", "disableUsedPercentage"], [1, 3, 1, "", "files"], [1, 3, 1, "", "name"], [1, 3, 1, "", "theme"]], "pyfilebrowser.modals.config.Branding.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.modals.config.Commands": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "after_copy"], [1, 3, 1, "", "after_delete"], [1, 3, 1, "", "after_rename"], [1, 3, 1, "", "after_save"], [1, 3, 1, "", "after_upload"], [1, 3, 1, "", "before_copy"], [1, 3, 1, "", "before_delete"], [1, 3, 1, "", "before_rename"], [1, 3, 1, "", "before_save"], [1, 3, 1, "", "before_upload"]], "pyfilebrowser.modals.config.Commands.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.modals.config.Config": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "authMethod"], [1, 3, 1, "", "branding"], [1, 3, 1, "", "commands"], [1, 3, 1, "", "createUserDir"], [1, 3, 1, "", "defaults"], [1, 3, 1, "", "rules"], [1, 3, 1, "", "shell_"], [1, 3, 1, "", "signup"], [1, 3, 1, "", "tus"], [1, 3, 1, "", "userHomeBasePath"]], "pyfilebrowser.modals.config.Config.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.modals.config.ConfigSettings": [[1, 3, 1, "", "auther"], [1, 3, 1, "", "server"], [1, 3, 1, "", "settings"]], "pyfilebrowser.modals.config.Defaults": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "commands"], [1, 3, 1, "", "dateFormat"], [1, 3, 1, "", "hideDotfiles"], [1, 3, 1, "", "locale"], [1, 3, 1, "", "perm"], [1, 3, 1, "", "scope"], [1, 3, 1, "", "singleClick"], [1, 3, 1, "", "sorting"], [1, 3, 1, "", "viewMode"]], "pyfilebrowser.modals.config.Defaults.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.modals.config.ReCAPTCHA": [[1, 3, 1, "", "host"], [1, 3, 1, "", "key"], [1, 3, 1, "", "secret"]], "pyfilebrowser.modals.config.Server": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "address"], [1, 3, 1, "", "authHook"], [1, 3, 1, "", "baseURL"], [1, 3, 1, "", "enableExec"], [1, 3, 1, "", "enableThumbnails"], [1, 3, 1, "", "log"], [1, 3, 1, "", "port"], [1, 3, 1, "", "resizePreview"], [1, 3, 1, "", "root"], [1, 3, 1, "", "socket"], [1, 3, 1, "", "tlsCert"], [1, 3, 1, "", "tlsKey"], [1, 3, 1, "", "tokenExpirationTime"], [1, 3, 1, "", "typeDetectionByHeader"]], "pyfilebrowser.modals.config.Server.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.modals.config.Tus": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "chunkSize"], [1, 3, 1, "", "retryCount"]], "pyfilebrowser.modals.config.Tus.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.modals": [[1, 0, 0, "-", "models"]], "pyfilebrowser.modals.models": [[1, 1, 1, "", "Log"], [1, 1, 1, "", "Perm"], [1, 1, 1, "", "SortBy"], [1, 1, 1, "", "Sorting"], [1, 1, 1, "", "Theme"], [1, 4, 1, "", "admin_perm"], [1, 4, 1, "", "default_perm"]], "pyfilebrowser.modals.models.Log": [[1, 3, 1, "", "file"], [1, 3, 1, "", "stdout"]], "pyfilebrowser.modals.models.Perm": [[1, 3, 1, "", "admin"], [1, 3, 1, "", "create"], [1, 3, 1, "", "delete"], [1, 3, 1, "", "download"], [1, 3, 1, "", "execute"], [1, 3, 1, "", "modify"], [1, 3, 1, "", "rename"], [1, 3, 1, "", "share"]], "pyfilebrowser.modals.models.SortBy": [[1, 3, 1, "", "modified"], [1, 3, 1, "", "name"], [1, 3, 1, "", "size"]], "pyfilebrowser.modals.models.Sorting": [[1, 3, 1, "", "asc"], [1, 3, 1, "", "by"]], "pyfilebrowser.modals.models.Theme": [[1, 3, 1, "", "blank"], [1, 3, 1, "", "dark"], [1, 3, 1, "", "light"]], "pyfilebrowser.modals.users": [[1, 1, 1, "", "Authentication"], [1, 1, 1, "", "UserSettings"]], "pyfilebrowser.modals.users.Authentication": [[1, 3, 1, "", "admin"], [1, 3, 1, "", "password"], [1, 3, 1, "", "username"]], "pyfilebrowser.modals.users.UserSettings": [[1, 1, 1, "", "Config"], [1, 3, 1, "", "authentication"], [1, 3, 1, "", "commands"], [1, 3, 1, "", "dateFormat"], [1, 2, 1, "", "from_env_file"], [1, 3, 1, "", "hideDotfiles"], [1, 3, 1, "", "locale"], [1, 3, 1, "", "lockPassword"], [1, 3, 1, "", "perm"], [1, 3, 1, "", "rules"], [1, 3, 1, "", "scope"], [1, 3, 1, "", "singleClick"], [1, 3, 1, "", "sorting"], [1, 3, 1, "", "viewMode"]], "pyfilebrowser.modals.users.UserSettings.Config": [[1, 3, 1, "", "env_prefix"], [1, 3, 1, "", "extra"]], "pyfilebrowser.squire": [[1, 0, 0, "-", "download"], [1, 0, 0, "-", "steward"]], "pyfilebrowser.squire.download": [[1, 1, 1, "", "Executable"], [1, 1, 1, "", "ExtendedEnvSettingsSource"], [1, 1, 1, "", "ExtendedSettingsConfigDict"], [1, 1, 1, "", "GitHub"], [1, 4, 1, "", "asset"]], "pyfilebrowser.squire.download.Executable": [[1, 3, 1, "", "filebrowser_arch"], [1, 3, 1, "", "filebrowser_bin"], [1, 3, 1, "", "filebrowser_db"], [1, 3, 1, "", "filebrowser_dl_ext"], [1, 3, 1, "", "filebrowser_file"], [1, 3, 1, "", "filebrowser_os"], [1, 3, 1, "", "machine"], [1, 3, 1, "", "system"]], "pyfilebrowser.squire.download.ExtendedEnvSettingsSource": [[1, 2, 1, "", "get_field_value"]], "pyfilebrowser.squire.download.ExtendedSettingsConfigDict": [[1, 3, 1, "", "env_prefixes"]], "pyfilebrowser.squire.download.GitHub": [[1, 3, 1, "", "owner"], [1, 3, 1, "", "repo"], [1, 3, 1, "", "token"]], "pyfilebrowser.squire.steward": [[1, 1, 1, "", "EnvConfig"], [1, 1, 1, "", "FileIO"], [1, 4, 1, "", "default_logger"], [1, 4, 1, "", "hash_password"], [1, 4, 1, "", "remove_prefix"], [1, 4, 1, "", "remove_trailing_underscore"], [1, 4, 1, "", "validate_password"]], "pyfilebrowser.squire.steward.EnvConfig": [[1, 3, 1, "", "config_settings"], [1, 2, 1, "", "load_user_profiles"], [1, 3, 1, "", "user_profiles"]], "pyfilebrowser.squire.steward.FileIO": [[1, 3, 1, "", "config"], [1, 3, 1, "", "settings_dir"], [1, 3, 1, "", "users"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:attribute", "4": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "function", "Python function"]}, "titleterms": {"pyfilebrows": [0, 1], "kick": 0, "off": 0, "environ": 0, "variabl": 0, "env": 0, "file": 0, "code": 0, "standard": 0, "releas": 0, "note": 0, "lint": 0, "pypi": 0, "packag": 0, "runbook": 0, "licens": 0, "copyright": 0, "welcom": 1, "": 1, "document": 1, "read": 1, "me": 1, "main": 1, "modul": 1, "modal": 1, "configur": 1, "model": 1, "user": 1, "squir": 1, "download": 1, "steward": 1, "indic": 1, "tabl": 1}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}}) \ No newline at end of file diff --git a/pre_commit.sh b/pre_commit.sh index a19b608..6685e2d 100755 --- a/pre_commit.sh +++ b/pre_commit.sh @@ -1,9 +1,45 @@ #!/bin/bash +# 'set -e' stops the execution of a script if a command or pipeline has an error. +# This is the opposite of the default shell behaviour, which is to ignore errors in scripts. +set -e + # shellcheck disable=SC2155 -export root="$(pwd)" # root is mandatory, so set to pwd -rm -rf docs && mkdir docs -mkdir -p doc_gen/_static # Create a _static directory if unavailable -cp README.md doc_gen # Copy readme file to doc_gen -cd doc_gen && make clean html # cd into doc_gen and create the runbook -mv _build/html/* ../docs && mv README.md ../docs # Move the runbook, readme -cp static.css ../docs/_static && touch ../docs/.nojekyll +export ROOT="$(pwd)" # root is mandatory, so set to pwd + +clean_docs() { + # Clean up docs directory keeping the CNAME file if present + directory="docs" + file_to_keep="CNAME" + shopt -s dotglob # enables the dotglob option, which makes the * (wildcard) include dot files (hidden files) + cd "$directory" || return 0 + for file in *; do + if [ "$file" != "$file_to_keep" ]; then + rm -rf "$file" + fi + done + shopt -u dotglob # disables the dotglob option after the loop to revert to the default behavior +} + +update_release_notes() { + # Update release notes + gitverse-release reverse -f release_notes.rst -t 'Release Notes' +} + +gen_docs() { + # Generate sphinx docs + mkdir -p doc_gen/_static # Create a _static directory if unavailable + cp README.md doc_gen # Copy readme file to doc_gen + cd doc_gen && make clean html # cd into doc_gen and create the runbook + mv _build/html/* ../docs && mv README.md ../docs # Move the runbook, readme + cp static.css ../docs/_static +} + +gen_docs & +clean_docs & +update_release_notes & + +wait + +# The existence of this file tells GitHub Pages not to run the published files through Jekyll. +# This is important since Jekyll will discard any files that begin with _ +touch docs/.nojekyll diff --git a/pyproject.toml b/pyproject.toml index 7a07f82..685f793 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,3 +35,4 @@ Homepage = "https://github.com/thevickypedia/pyfilebrowser" Docs = "https://thevickypedia.github.io/pyfilebrowser/" Source = "https://github.com/thevickypedia/pyfilebrowser" "Bug Tracker" = "https://github.com/thevickypedia/pyfilebrowser/issues" +"Release Notes" = "https://github.com/thevickypedia/pyfilebrowser/blob/main/release_notes.rst" diff --git a/release_notes.rst b/release_notes.rst new file mode 100644 index 0000000..5956859 --- /dev/null +++ b/release_notes.rst @@ -0,0 +1,15 @@ +Release Notes +============= + +v0.0.3 (03/19/2024) +------------------- +- Update pypi description + +v0.0.2 (03/19/2024) +------------------- +- Standardize automatic asset download process +- Streamline custom source control option for releases + +v0.0.1 (03/18/2024) +------------------- +- Upload `pyfilebrowser` to pypi, with restriction to GitHub token