{"id":19164118,"url":"https://github.com/danny0838/pywebscrapbook","last_synced_at":"2025-05-07T10:36:11.885Z","repository":{"id":34302094,"uuid":"169705968","full_name":"danny0838/PyWebScrapBook","owner":"danny0838","description":"Server backend and CLI toolkit for WebScrapBook browser extension.","archived":false,"fork":false,"pushed_at":"2025-01-18T08:09:32.000Z","size":2211,"stargazers_count":84,"open_issues_count":14,"forks_count":20,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-29T12:54:32.736Z","etag":null,"topics":["python","server","toolkit"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/webscrapbook/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danny0838.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-08T08:40:25.000Z","updated_at":"2025-04-21T04:58:41.000Z","dependencies_parsed_at":"2024-07-06T14:57:16.405Z","dependency_job_id":null,"html_url":"https://github.com/danny0838/PyWebScrapBook","commit_stats":{"total_commits":955,"total_committers":3,"mean_commits":318.3333333333333,"dds":0.009424083769633551,"last_synced_commit":"ec0ad56832780597d4ba50c065d1cc39b76446fa"},"previous_names":[],"tags_count":139,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danny0838%2FPyWebScrapBook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danny0838%2FPyWebScrapBook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danny0838%2FPyWebScrapBook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danny0838%2FPyWebScrapBook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danny0838","download_url":"https://codeload.github.com/danny0838/PyWebScrapBook/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252860563,"owners_count":21815536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","server","toolkit"],"created_at":"2024-11-09T09:18:13.944Z","updated_at":"2025-05-07T10:36:11.863Z","avatar_url":"https://github.com/danny0838.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"PyWebScrapBook is a command line toolkit and backend server for\n[WebScrapBook browser extension](https://github.com/danny0838/webscrapbook).\n\n## Features\n* Host any directory(s) as website(s).\n* Directory listing.\n* HTZ or MAFF archive file viewing.\n* Markdown file rendering.\n* Create, view, edit, and/or delete files via the web interface or API.\n* HTTP(S) authorization and simple ACL.\n* Tools for scrapbooks management, such as cache generating and data checking, exporting, importing, and conversion.\n\n## Usage\n\n### Installation\n\n#### Install from the package manager\n\n1. Install Python \u003e= 3.7 from the [official site](https://www.python.org).\n\n   Add python to `PATH` environment variable so that it can be run from the command line interface (CLI).\n\n2. Install this package\n\n   Run below command from CLI to install (or upgrade to) the latest version:\n\n       python -m pip install -U webscrapbook\n\n   After installation, `wsb` will be available from the CLI.\n\n#### Install from compiled binary\n\n1. Download the binary package compatible with your system from [the latest release](https://github.com/danny0838/PyWebScrapBook/releases/latest), and unzip to anywhere on your device.\n\n2. Optionally add the parent directory of the executable file to `PATH` environment variable so that it can be run from the CLI more easily.\n\n### Usage overview\n\nRun `wsb --help` for help about available commands, which looks like:\n\n    usage: wsb [-h] [--version] [--root ROOT] COMMAND ...\n\n    positional arguments:\n      COMMAND      the sub-command to run. Get usage help with e.g. wsb config -h\n        serve (s)  serve the root directory\n        config (c)\n                   show, generate, or edit the config\n        encrypt (e)\n                   generate an encrypted password\n        cache (a)  update fulltext cache and/or static site pages\n        check (k)  check and fix scrapbook data\n        export (x)\n                   export data items into archive files (*.wsba)\n        import (i)\n                   import data items from archive files (*.wsba)\n        convert (v)\n                   convert scrapbook data between different formats\n        query (q)  perform queries on the scrapbook(s)\n        search (r)\n                   search for data items in the scrapbook(s)\n        help       show detailed information about certain topics\n        view       view archive file in the browser\n\n    options:\n      -h, --help   show this help message and exit\n      --version    show version information and exit\n      --root ROOT  root directory to manipulate (default: current working directory)\n\nRun `wsb \u003ccommand\u003e --help` for help about `\u003ccommand\u003e`. For example, `wsb config --help` for help about `wsb config`.\n\n### Host a scrapbook\n\nSwitch current working directory (CWD) to a directory you'd like to host.\n\n    cd /path/to/scrapbook\n\n\u003e In Windows, an additional command or parameter to change drive may be required. For example, if the directory to host is `E:\\path\\to\\scrapbook` while the current drive is `C`, an additional command `E:` (or parameter `/d`) is required besides `cd E:\\path\\to\\scrapbook`.\n\u003e\n\u003e You can also use the shortcurt: `Shift + Right-click` on the desired folder and select `Open command window here` or `Open PowerShell window here`.\n\nGenerate config files for the directory:\n\n    wsb config -ba\n\n\u003e This step can be skipped if you want PyWebScrapBook default data structure instead. See [doc wiki](https://github.com/danny0838/webscrapbook/wiki/Backend) for more details.\n\nRun the generated `.wsb/serve.py` to start the server, or run below command from CLI:\n\n    wsb serve\n\n\u003e Alternatively, a backend server can be run with a specialized WSGI server, such as mod_wsgi, uWSGI, or Gunicorn, by providing the generated application script `.wsb/app.py` to it.\n\n### Open an archive file directly (optional)\n\nThe `wsb` executable also supports opening an archive page (HTZ or MAFF) to view in the browser.\n\nRun `which wsb` (or `where wsb` in Windows) from CLI to get the path of the executable, and set default application of MAFF/HTZ file to that executable to open them directly in the browser with double-click.\n\n### Configuration\n\nRun `wsb config -be` to edit configs for CWD. For documentation about configs, run `wsb help config`, or [read it online](https://github.com/danny0838/PyWebScrapBook/blob/master/webscrapbook/resources/config.md).\n\n### Further documentation\n\nFor more tips about how to configure PyWebScrapBook alongside WebScrapBook, visit [the documentation wiki for WebScrapBook](https://github.com/danny0838/webscrapbook/wiki/Backend).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanny0838%2Fpywebscrapbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanny0838%2Fpywebscrapbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanny0838%2Fpywebscrapbook/lists"}