{"id":42212885,"url":"https://github.com/foliant-docs/foliantcontrib.gupload","last_synced_at":"2026-01-27T01:06:52.293Z","repository":{"id":57431761,"uuid":"149108986","full_name":"foliant-docs/foliantcontrib.gupload","owner":"foliant-docs","description":"CLI extension to upload created documents to Google Drive.","archived":false,"fork":false,"pushed_at":"2018-11-16T06:28:11.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-10-27T09:36:27.891Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/foliant-docs.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-17T10:31:43.000Z","updated_at":"2018-11-16T06:24:39.000Z","dependencies_parsed_at":"2022-09-02T11:51:48.296Z","dependency_job_id":null,"html_url":"https://github.com/foliant-docs/foliantcontrib.gupload","commit_stats":null,"previous_names":["foliant-docs/foliantcontrib.gdoc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/foliant-docs/foliantcontrib.gupload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.gupload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.gupload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.gupload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.gupload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foliant-docs","download_url":"https://codeload.github.com/foliant-docs/foliantcontrib.gupload/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.gupload/sbom","scorecard":{"id":406076,"data":{"date":"2025-08-11","repo":{"name":"github.com/foliant-docs/foliantcontrib.gupload","commit":"a3356f15b01d48df51d3c17bf6a3d65823a39307"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":1,"reason":"Found 1/10 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'develop'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T21:17:40.697Z","repository_id":57431761,"created_at":"2025-08-18T21:17:40.698Z","updated_at":"2025-08-18T21:17:40.698Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28794640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-27T01:06:51.631Z","updated_at":"2026-01-27T01:06:52.269Z","avatar_url":"https://github.com/foliant-docs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Documents to Google Drive uploader for Foliant\n\nGupload is the Foliant CLI extension, it's used to upload created documents to Google Drive.\n\nGupload adds `gupload` command to Foliant.\n\n\n## Installation\n\n```shell\n$ pip install foliantcontrib.gupload\n```\n\n\n## Config\n\nTo config the CLI extension, add `gupload` section in the project config. As `gupload` needs document to upload, appropriate backend settings also have to be here.\n\nCLI extension has a number of options (all fields are required but can have no values):\n\n```yaml\ngupload:\n    gdrive_folder_name: Foliant upload\n    gdrive_folder_id:\n    gdoc_title:\n    gdoc_id:\n    convert_file:\n    com_line_auth: false\n```\n\n`gdrive_folder_name`\n:   Folder with this name will be created on Google Drive to upload file.\n\n`gdrive_folder_id`\n:   This field is necessary to upload files to previously created folder.\n\n`gdoc_title`\n:   Uploaded file will have this title. If empty, real filename will be used.\n\n`gdoc_id`\n:   This field is necessary to rewrite previously uploaded file and keep the link to it.\n\n`convert_file`\n:   Convert uploaded files to google docs format or not.\n\n`com_line_auth`\n:   In some cases it's impossible to authenticate automatically (for example, with Docker), so you can set *True* and use command line authentication procedure.\n\n\n## Usage\n\nAt first you have to get Google Drive authentication file.\n\n1. Go to [APIs Console](https://console.developers.google.com/cloud-resource-manager) and make your own project.\n2. Go to [library](https://console.developers.google.com/apis/library), search for ‘Google Drive API’, select the entry, and click ‘Enable’.\n3. Select ‘Credentials’ from the left menu, click ‘Create Credentials’, select ‘OAuth client ID’.\n4. Now, the product name and consent screen need to be set -\u003e click ‘Configure consent screen’ and follow the instructions. Once finished:\n    - Select ‘Application type’ to be *Other types*.\n    - Enter an appropriate name.\n    - Input http://localhost:8080 for ‘Authorized JavaScript origins’.\n    - Input http://localhost:8080/ for ‘Authorized redirect URIs’.\n    - Click ‘Save’.\n5. Click ‘Download JSON’ on the right side of Client ID to download client_secret_\u003creally long ID\u003e.json. The downloaded file has all authentication information of your application.\n6. Rename the file to “client_secrets.json” and place it in your working directory near foliant.yml.\n\nNow add the CLI extension to the project config with all settings strings. At this moment you have no data to set *Google Drive folder ID* and *google doc ID* so keep it empty.\n\nRun Foliant with `gupload` command:\n\n```shell\n$ foliant gupload docx\n✔ Parsing config\n✔ Applying preprocessor flatten\n✔ Making docx with Pandoc\n─────────────────────\nResult: filename.docx\n─────────────────────\n✔ Parsing config\nYour browser has been opened to visit:\n\n    https://accounts.google.com/o/oauth2/auth?...\n\nAuthentication successful.\n✔ Uploading 'filename.docx' to Google Drive\n─────────────────────\nResult:\nDoc link: https://docs.google.com/document/d/1GPvNSMJ4ZutZJwhUYM1xxCKWMU5Sg/edit?usp=drivesdk\nGoogle drive folder ID: 1AaiWMNIYlq9639P30R3T9\nGoogle document ID: 1GPvNSMJ4Z19YM1xCKWMU5Sg\n```\n\nAuthentication form will be opened. Choose account to log in.\n\nWith command line authentication procedure differs little bit:\n\n```\n$ docker-compose run --rm foliant gupload docx\n✔ Parsing config\n✔ Applying preprocessor flatten\n✔ Making docx with Pandoc\n─────────────────────\nResult: filename.docx\n─────────────────────\n✔ Parsing config\nGo to the following link in your browser:\n\n    https://accounts.google.com/o/oauth2/auth?...\n\nEnter verification code: 4/XgBllTXpxv8kKjsiTxLc\nAuthentication successful.\n✔ Uploading 'filename.docx' to Google Drive\n─────────────────────\nResult:\nDoc link: https://docs.google.com/document/d/1GPvNSMJ4ZutZJwhUYM1xxCKWMU5Sg/edit?usp=drivesdk\nGoogle drive folder ID: 1AaiWMNIYlq9639P30R3T9\nGoogle document ID: 1GPvNSMJ4Z19YM1xCKWMU5Sg\n```\n\nCopy link from terminal to your browser, choose account to log in and copy generated code back to the terminal.\n\nAfter that the document will be uploaded to Google Drive and opened in new browser tab.\n\nNow you can use *Google Drive folder ID* to upload files to the same folder and *google doc ID* to rewrite document (also you can IDs in folder and file links).\n\n### Notes\n\nIf you set up *google doc ID* without *Google Drive folder ID* file will be moved to the new folder with the same link.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoliant-docs%2Ffoliantcontrib.gupload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoliant-docs%2Ffoliantcontrib.gupload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoliant-docs%2Ffoliantcontrib.gupload/lists"}