{"id":19174589,"url":"https://github.com/equalitie/ouinet-upload","last_synced_at":"2026-06-23T14:31:13.138Z","repository":{"id":85416633,"uuid":"146473160","full_name":"equalitie/ouinet-upload","owner":"equalitie","description":"Prepare a content directory and publish it using Ouinet","archived":false,"fork":false,"pushed_at":"2019-03-25T20:58:42.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-02-23T00:44:00.847Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/equalitie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-08-28T16:05:46.000Z","updated_at":"2019-03-25T20:58:44.000Z","dependencies_parsed_at":"2023-03-13T05:10:49.699Z","dependency_job_id":null,"html_url":"https://github.com/equalitie/ouinet-upload","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/equalitie/ouinet-upload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalitie%2Fouinet-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalitie%2Fouinet-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalitie%2Fouinet-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalitie%2Fouinet-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/equalitie","download_url":"https://codeload.github.com/equalitie/ouinet-upload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalitie%2Fouinet-upload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34694778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-09T10:18:26.558Z","updated_at":"2026-06-23T14:31:13.122Z","avatar_url":"https://github.com/equalitie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ouinet uploader\n\nThis is a simple script to help content providers prepare a content directory\nand publish it using [Ouinet](https://github.com/equalitie/ouinet), circulate\nthe content offline, and enable users to reinsert (parts of) that content when\ninjectors are not reachable.\n\nThe basic syntax is:\n\n    python3 -m ouinet.upload [OPTION...] CONTENT_DIR ACTION...\n\nWhere ``CONTENT_DIR`` is the path to the directory holding content.\n``ACTION`` is one or more of the following ones:\n\n  - ``index`` recursively scans the content directory and creates in each\n    directory a simple index file (``index.html`` by default).\n\n    The generated index file for each directory under the content directory\n    (including itself) contains the name of the directory, a link to its\n    parent, and links to files and index files in directories under it.\n\n    This action is intended as a helper tool for content publishers to make\n    the whole content directory amenable for navigation using a web browser.\n    This may not be needed if the content directory already includes such\n    index files.\n\n  - ``inject`` requests all files and directories in the content directory via\n    the local Ouinet client (assumed by default to be listening on\n    ``localhost:8080``) so that it requests their injection.\n\n    The URI descriptors resulting from injection are stored beside content (in\n    separate ``.ouinet`` data directories).  Circulating these additional\n    files (e.g. by seeding them, see below) may help other Ouinet users look\n    up content URIs on the distributed cache.\n\n    This action is intended for content publishers to make the content\n    available via Ouinet.  Please note that the content must also be made\n    available to the relevant injectors (e.g. via HTTP) to allow this action.\n\n  - ``seed`` uploads all files in the content directory to the local Ouinet\n    client (assumed by default to be listening on ``localhost:8080``) so that\n    it seeds their data to the distributed cache.  Files in `.ouinet` data\n    directories are handled specially.\n\n    This action is intended for users who want their Ouinet client to\n    cooperate in seeding the content data to the distributed cache when\n    injectors are not reachable.\n\n## Usage examples\n\nThese examples assume a Ouinet client listening at ``localhost:8087``:\n\n    $ alias upload=\"python3 -m ouinet.upload --client-proxy localhost:8087\"\n\n### Content provider\n\nFirst, make sure that your client only requests content using the Injector\nmechanism.  You may either disable the Origin, Proxy and Cache request\nmechanisms at the client's front end page, or you may add the options\n``--disable-origin-access`` and ``--disable-proxy-access`` to the client's\ncommand line.\n\nEnter the directory holding the content directory, and create index files if\nthey are missing:\n\n    $ cd /path/to/content\n    $ ls\n    root/\n    $ upload root index\n\nAt this point you may want to tell a Web server to publish the contents of the\n``root`` directory or a replica of it.  You can find a sample configuration\nfile for the NginX web server [here](./docs/nginx-vhost.conf).  Let us assume\nthat the content is published at ``https://example.com/``:\n\n    $ upload --uri-prefix https://example.com root inject\n\nAfter that, clients should be able to both look up content URIs and retrieve\ncontent data from the distributed cache to browse it, even if the web server\nis no longer reachable.\n\n### Users\n\nTo have your client itself seed the content, descriptors and URL-to-descriptor\nmappings, you can upload the files to your Ouinet client:\n\n    $ upload root seed\n\nPlease note that the Cache request mechanism should be enabled at the client.\n\n--------\n\nTODO Make this doc more useful.`:)`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequalitie%2Fouinet-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fequalitie%2Fouinet-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequalitie%2Fouinet-upload/lists"}