Take screenshots of websites and create PDF from HTML pages using chromium and docker

gochro

Build Status

gochro is a small docker image with chromium installed and a golang based webserver to interact wit it. It can be used to take screenshots of websites using chromium-headless and convert HTML pages to PDF.

If errors occur the error will be logged to stdout and a non information leaking error message is presented to the user.

This project is currently used on https://wpscan.io for taking website screenshots and to generate PDF reports.

Screenshot

This URL takes a Screenshot of https://firefart.at with a resolution of 1024x768 and returns an image.

http://localhost:8080/screenshot?url=https://firefart.at&w=1024&h=768

PDF

Send a POST request with the HTML you want to convert in the Post body to the following url.

http://localhost:8080/html2pdf?w=1024&h=768

This will return a PDF of the HTML input.

Example:

POST /html2pdf?w=1024&h=768 HTTP/1.1
Host: localhost:8000
Content-Type: application/x-www-form-urlencoded
Content-Length: 119


Test Page

This is a test

This is a test

Run server

To run this image you should use the seccomp profile provided by Jess Frazelle. The privileges on the host are needed for chromiums internal security sandbox. You can also deactivate the sandbox on chromium (would require changes in main.go) but that's a bad idea and puts your server at risk, so please use the seccomp profile instead.

I included all the necessary steps in the included Makefile to build and run everything. Be sure to use the --init switch to get rid of zombie processes of chromium.

Command Line Options

-host                  The host and port to listen of (refers to inside the container). Defaults to 0.0.0.0:8000
-debug                 Enables debug output. Default: false
-ignore-cert-errors    Also fetch ressources from origins with untrusted certificates or cert errors.
-proxy                 Use a proxy server to connect to the internet. Please use format IP:PORT without a protocol. Example: 1.2.3.4:3128

Only build the webserver for non docker use

The following command builds the webserver for non docker use inside the build directory

make all

Only build docker image

To only build the docker image run

make docker-update

This will download the seccomp profile, all needed base images and builds the gochro:dev tagged image.

Run the image

To run the image in interactive mode (docker output will be connected to current terminal) run

make docker-run

This will also build the image before running it. This maps the internal port 8000 to your machine.

Run the image in deamon mode

To run it in deamon mode use the following command. This will launch everything in the background. Be aware that the webserver is rerun on startup of the machine if you don't shut down the container manually.

make docker-run-daemon

Use the docker hub image

You can also use the prebuit image from dockerhub.

To pull the image run

docker pull firefart/gochro

Include in docker-compose

If you want to include this image in a docker-compose file you can use the following example. Just connect the gochronet to the other service so the containers can communicate with each other.

Please note that the 0.0.0.0 in the command only applies to the network inside the docker container itself. If you want to access it from your local machine you need to add a port mapping.

version: '3.7'

services:
  gochro:
    image: firefart/gochro
    init: true
    container_name: gochro
    security_opt:
      - seccomp="chrome.json"
    command: -host 0.0.0.0:8000
    networks:
      - gochronet

networks:
  gochronet:
    driver: bridge
Owner
Comments
  • Args by url parameters.

    Args by url parameters.

    I have an issue where i need to pass --print-to-pdf-no-header to Chromium, It would be great if it was possible to pass values to args via the request URL. Something like: /html2pdf?w=1024&h=768&print-to-pdf-no-header=true

    https://github.com/firefart/gochro/blob/b5c07923e300f79a3660d538d57c433b13665869/main.go#L142

  • Features suggestion

    Features suggestion

    Hi,

    It's a great job you've done. Some feature suggestions that might be great to implement in the future:

    1. Argument to ignore cookies: to avoid GDPR popups
    2. Argument to specify the browser language (Accept-Language) in the request
    3. Export as a PNG
    4. Argument to set the user agent

    Cheers,

  • [Request] Full document's height capture

    [Request] Full document's height capture

    Hi,

    I was wondering if there is a way to get a capture of the whole URL, not just cropped to provided height, or if it's going to be implemented.

    Otherwise, thanks, it works perfectly !

  • Bump docker/login-action from 1.13.0 to 1.14.0

    Bump docker/login-action from 1.13.0 to 1.14.0

    Bumps docker/login-action from 1.13.0 to 1.14.0.

    Release notes

    Sourced from docker/login-action's releases.

    v1.14.0

    • Update to node 16 (#158)
    • Bump @​aws-sdk/client-ecr from 3.45.0 to 3.53.0 (#157)
    • Bump @​aws-sdk/client-ecr-public from 3.45.0 to 3.53.0 (#156)
    Commits
    • bb984ef Merge pull request #156 from docker/dependabot/npm_and_yarn/aws-sdk/client-ec...
    • 7228881 Update generated content
    • 17780b5 Bump @​aws-sdk/client-ecr-public from 3.45.0 to 3.53.0
    • 39857b3 Merge pull request #157 from docker/dependabot/npm_and_yarn/aws-sdk/client-ec...
    • 5fcc728 Update generated content
    • 9fb8721 Bump @​aws-sdk/client-ecr from 3.45.0 to 3.53.0
    • 4e3c937 Merge pull request #158 from crazy-max/node-16
    • 4b59a42 update to node 16
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump goreleaser/goreleaser-action from 3 to 4

    Bump goreleaser/goreleaser-action from 3 to 4

    Bumps goreleaser/goreleaser-action from 3 to 4.

    Release notes

    Sourced from goreleaser/goreleaser-action's releases.

    v4.0.0

    What's Changed

    Full Changelog: https://github.com/goreleaser/goreleaser-action/compare/v3...v4.0.0

    v3.2.0

    What's Changed

    • chore: remove workaround for setOutput by @​crazy-max (#374)
    • chore(deps): bump @​actions/core from 1.9.1 to 1.10.0 (#372)
    • chore(deps): bump yargs from 17.5.1 to 17.6.0 (#373)

    Full Changelog: https://github.com/goreleaser/goreleaser-action/compare/v3.1.0...v3.2.0

    v3.1.0

    What's Changed

    • fix: dist resolution from config file by @​crazy-max (#369)
    • ci: fix workflow by @​crazy-max (#357)
    • docs: bump actions to latest major by @​crazy-max (#356)
    • chore(deps): bump crazy-max/ghaction-import-gpg from 4 to 5 (#360)
    • chore(deps): bump ghaction-import-gpg to v5 (#359)
    • chore(deps): bump @​actions/core from 1.6.0 to 1.8.2 (#358)
    • chore(deps): bump @​actions/core from 1.8.2 to 1.9.1 (#367)

    Full Changelog: https://github.com/goreleaser/goreleaser-action/compare/v3.0.0...v3.1.0

    Commits
    • 8f67e59 chore: regenerate
    • 78df308 chore(deps): bump minimatch from 3.0.4 to 3.1.2 (#383)
    • 66134d9 Merge remote-tracking branch 'origin/master' into flarco/master
    • 3c08cfd chore(deps): bump yargs from 17.6.0 to 17.6.2
    • 5dc579b docs: add example when using workdir along with upload-artifact (#366)
    • 3b7d1ba feat!: remove auto-snapshot on dirty tag (#382)
    • 23e0ed5 fix: do not override GORELEASER_CURRENT_TAG (#370)
    • 1315dab update build
    • b60ea88 improve install
    • 4d25ab4 Update goreleaser.ts
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump docker/login-action from 2.0.0 to 2.1.0

    Bump docker/login-action from 2.0.0 to 2.1.0

    Bumps docker/login-action from 2.0.0 to 2.1.0.

    Release notes

    Sourced from docker/login-action's releases.

    v2.1.0

    What's Changed

    • Ensure AWS temp credentials are redacted in workflow logs by @​crazy-max (#275)
    • Bump @​actions/core from 1.6.0 to 1.10.0 (#252 #292)
    • Bump @​aws-sdk/client-ecr from 3.53.0 to 3.186.0 (#298)
    • Bump @​aws-sdk/client-ecr-public from 3.53.0 to 3.186.0 (#299)

    Full Changelog: https://github.com/docker/login-action/compare/v2.0.0...v2.1.0

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump actions/checkout from 2 to 3

    Bump actions/checkout from 2 to 3

    Bumps actions/checkout from 2 to 3.

    Release notes

    Sourced from actions/checkout's releases.

    v3.0.0

    • Updated to the node16 runtime by default
      • This requires a minimum Actions Runner version of v2.285.0 to run, which is by default available in GHES 3.4 or later.

    v2.4.2

    What's Changed

    Full Changelog: https://github.com/actions/checkout/compare/v2...v2.4.2

    v2.4.1

    • Fixed an issue where checkout failed to run in container jobs due to the new git setting safe.directory

    v2.4.0

    • Convert SSH URLs like org-<ORG_ID>@github.com: to https://github.com/ - pr

    v2.3.5

    Update dependencies

    v2.3.4

    v2.3.3

    v2.3.2

    Add Third Party License Information to Dist Files

    v2.3.1

    Fix default branch resolution for .wiki and when using SSH

    v2.3.0

    Fallback to the default branch

    v2.2.0

    Fetch all history for all tags and branches when fetch-depth=0

    v2.1.1

    Changes to support GHES (here and here)

    v2.1.0

    ... (truncated)

    Changelog

    Sourced from actions/checkout's changelog.

    Changelog

    v3.0.2

    v3.0.1

    v3.0.0

    v2.3.1

    v2.3.0

    v2.2.0

    v2.1.1

    • Changes to support GHES (here and here)

    v2.1.0

    v2.0.0

    v2 (beta)

    • Improved fetch performance

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump docker/setup-buildx-action from 1 to 2

    Bump docker/setup-buildx-action from 1 to 2

    Bumps docker/setup-buildx-action from 1 to 2.

    Release notes

    Sourced from docker/setup-buildx-action's releases.

    v2.0.0

    • Node 16 as default runtime by @​crazy-max (#131)
      • This requires a minimum Actions Runner version of v2.285.0, which is by default available in GHES 3.4 or later.

    Full Changelog: https://github.com/docker/setup-buildx-action/compare/v1.7.0...v2.0.0

    v1.7.0

    • Standalone mode by @​crazy-max in (#119)
    • Update dev dependencies and workflow by @​crazy-max (#114 #130)
    • Bump tmpl from 1.0.4 to 1.0.5 (#108)
    • Bump ansi-regex from 5.0.0 to 5.0.1 (#109)
    • Bump @​actions/core from 1.5.0 to 1.6.0 (#110)
    • Bump actions/checkout from 2 to 3 (#126)
    • Bump @​actions/tool-cache from 1.7.1 to 1.7.2 (#128)
    • Bump @​actions/exec from 1.1.0 to 1.1.1 (#129)
    • Bump minimist from 1.2.5 to 1.2.6 (#132)
    • Bump codecov/codecov-action from 2 to 3 (#133)
    • Bump semver from 7.3.5 to 7.3.7 (#136)

    v1.6.0

    • Add config-inline input (#106)
    • Bump @​actions/core from 1.4.0 to 1.5.0 (#104)
    • Bump codecov/codecov-action from 1 to 2 (#101)

    v1.5.1

    • Explicit version spec for caching (#100)

    v1.5.0

    • Allow building buildx from source (#99)

    v1.4.1

    • Fix docker: invalid reference format (#97)

    v1.4.0

    • Update dev deps (#95)
    • Use built-in getExecOutput (#94)
    • Use core.getBooleanInput (#93)
    • Bump @​actions/exec from 1.0.4 to 1.1.0 (#85)
    • Bump y18n from 4.0.0 to 4.0.3 (#91)
    • Bump hosted-git-info from 2.8.8 to 2.8.9 (#89)
    • Bump ws from 7.3.1 to 7.5.0 (#90)
    • Bump @​actions/tool-cache from 1.6.1 to 1.7.1 (#82 #86)
    • Bump @​actions/core from 1.2.7 to 1.4.0 (#80 #87)

    v1.3.0

    • Display BuildKit version (#72)

    v1.2.0

    • Remove os limitation (#71)
    • Add test job for config input (#68)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump docker/build-push-action from 2 to 3

    Bump docker/build-push-action from 2 to 3

    Bumps docker/build-push-action from 2 to 3.

    Release notes

    Sourced from docker/build-push-action's releases.

    v3.0.0

    • Node 16 as default runtime by @​crazy-max (#564)
      • This requires a minimum Actions Runner version of v2.285.0, which is by default available in GHES 3.4 or later.
    • Standalone mode support by @​crazy-max (#601 #609)
    • chore: update dev dependencies and workflow by @​crazy-max (#571)
    • Bump @​actions/exec from 1.1.0 to 1.1.1 (#573)
    • Bump @​actions/github from 5.0.0 to 5.0.1 (#582)
    • Bump minimist from 1.2.5 to 1.2.6 (#584)
    • Bump semver from 7.3.5 to 7.3.7 (#595)
    • Bump csv-parse from 4.16.3 to 5.0.4 (#533)

    Full Changelog: https://github.com/docker/build-push-action/compare/v2.10.0...v3.0.0

    v2.10.0

    • Add imageid output and use metadata to set digest output (#569)
    • Add build-contexts input (#563)
    • Enhance outputs display (#559)

    v2.9.0

    • add-hosts input (#553 #555)
    • Fix git context subdir example and improve README (#552)
    • Add e2e tests for ACR (#548)
    • Add description on github-token option to README (#544)
    • Bump node-fetch from 2.6.1 to 2.6.7 (#549)

    v2.8.0

    • Allow specifying subdirectory with default git context (#531)
    • Add cgroup-parent, shm-size, ulimit inputs (#501)
    • Don't set outputs if empty or nil (#470)
    • docs: example to sanitize tags with metadata-action (#476)
    • docs: wrong syntax to sanitize repo slug (#475)
    • docs: test before pushing your image (#455)
    • readme: remove v1 section (#500)
    • ci: virtual env file system info (#510)
    • dev: update workflow (#499)
    • Bump @​actions/core from 1.5.0 to 1.6.0 (#160)
    • Bump ansi-regex from 5.0.0 to 5.0.1 (#469)
    • Bump tmpl from 1.0.4 to 1.0.5 (#465)
    • Bump csv-parse from 4.16.0 to 4.16.3 (#451 #459)

    v2.7.0

    • Add metadata output (#412)
    • Bump @​actions/core from 1.4.0 to 1.5.0 (#439)
    • Add note to sanitize tags (#426)
    • Cache backend API docs (#406)
    • Git context now supports subdir (#407)
    • Bump codecov/codecov-action from 1 to 2 (#415)

    v2.6.1

    • Small typo and ensure trimmed output (#400)

    ... (truncated)

    Commits
    • e551b19 Merge pull request #564 from crazy-max/node-16
    • 3554377 Merge pull request #609 from crazy-max/ci-fix-test
    • a62bc1b ci: fix standalone test
    • c208583 Merge pull request #601 from crazy-max/standalone-mode
    • fcd9124 Merge pull request #607 from docker/dependabot/github_actions/docker/metadata...
    • 0ebe720 Bump docker/metadata-action from 3 to 4
    • 38b4580 Standalone mode support
    • ba31738 Merge pull request #533 from docker/dependabot/npm_and_yarn/csv-parse-5.0.4
    • 43721d2 Update generated content
    • 5ea21bf Fix csv-parse implementation since major update
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump docker/login-action from 1.14.1 to 2.0.0

    Bump docker/login-action from 1.14.1 to 2.0.0

    Bumps docker/login-action from 1.14.1 to 2.0.0.

    Release notes

    Sourced from docker/login-action's releases.

    v2.0.0

    • Node 16 as default runtime by @​crazy-max (#161)
      • This requires a minimum Actions Runner version of v2.285.0, which is by default available in GHES 3.4 or later.
    • chore: update dev dependencies and workflow by @​crazy-max (#170)
    • Bump @​actions/exec from 1.1.0 to 1.1.1 (#167)
    • Bump @​actions/io from 1.1.1 to 1.1.2 (#168)
    • Bump minimist from 1.2.5 to 1.2.6 (#176)
    • Bump https-proxy-agent from 5.0.0 to 5.0.1 (#182)

    Full Changelog: https://github.com/docker/login-action/compare/v1.14.1...v2.0.0

    Commits
    • 49ed152 Merge pull request #161 from crazy-max/node16-runtime
    • b61a9ce Node 16 as default runtime
    • 3a136a8 Merge pull request #182 from docker/dependabot/npm_and_yarn/https-proxy-agent...
    • b312880 Update generated content
    • 795794e Bump https-proxy-agent from 5.0.0 to 5.0.1
    • 1edf618 Merge pull request #179 from docker/dependabot/github_actions/codecov/codecov...
    • 8e66ad4 Bump codecov/codecov-action from 2 to 3
    • 7c79b59 Merge pull request #176 from docker/dependabot/npm_and_yarn/minimist-1.2.6
    • 24a38e0 Bump minimist from 1.2.5 to 1.2.6
    • 70e1ff8 Merge pull request #170 from crazy-max/eslint
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump actions/setup-go from 2 to 3

    Bump actions/setup-go from 2 to 3

    Bumps actions/setup-go from 2 to 3.

    Release notes

    Sourced from actions/setup-go's releases.

    v3.0.0

    What's Changed

    Breaking Changes

    With the update to Node 16, all scripts will now be run with Node 16 rather than Node 12.

    This new major release removes the stable input, so there is no need to specify additional input to use pre-release versions. This release also corrects the pre-release versions syntax to satisfy the SemVer notation (1.18.0-beta1 -> 1.18.0-beta.1, 1.18.0-rc1 -> 1.18.0-rc.1).

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-go@v3
        with:
          go-version: '1.18.0-rc.1' 
      - run: go version
    

    Add check-latest input

    In scope of this release we add the check-latest input. If check-latest is set to true, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, a Go version will then be downloaded from go-versions repository. By default check-latest is set to false. Example of usage:

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-go@v2
        with:
          go-version: '1.16'
          check-latest: true
      - run: go version
    

    Moreover, we updated @actions/core from 1.2.6 to 1.6.0

    v2.1.5

    In scope of this release we updated matchers.json to improve the problem matcher pattern. For more information please refer to this pull request

    v2.1.4

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/setup-go/compare/v2.1.3...v2.1.4

    v2.1.3

    • Updated communication with runner to use environment files rather then workflow commands

    v2.1.2

    This release includes vendored licenses for this action's npm dependencies.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
golang 在线预览word,excel,pdf,MarkDown(Online Preview Word,Excel,PPT,PDF,Image by Golang)
golang 在线预览word,excel,pdf,MarkDown(Online Preview Word,Excel,PPT,PDF,Image by Golang)

Go View File 在线体验地址 http://39.97.98.75:8082/view/upload (不会经常更新,保留最基本的预览功能。服务器配置较低,如果出现链接超时请等待几秒刷新重试,或者换Chrome) 目前已经完成 docker部署 (不用为运行环境烦恼) Wor

Dec 26, 2022
⚙️ Convert HTML to Markdown. Even works with entire websites and can be extended through rules.
⚙️ Convert HTML to Markdown. Even works with entire websites and can be extended through rules.

html-to-markdown Convert HTML into Markdown with Go. It is using an HTML Parser to avoid the use of regexp as much as possible. That should prevent so

Jan 6, 2023
Frongo is a Golang package to create HTML/CSS components using only the Go language.

Frongo Frongo is a Go tool to make HTML/CSS document out of Golang code. It was designed with readability and usability in mind, so HTML objects are c

Jul 29, 2021
bluemonday: a fast golang HTML sanitizer (inspired by the OWASP Java HTML Sanitizer) to scrub user generated content of XSS

bluemonday bluemonday is a HTML sanitizer implemented in Go. It is fast and highly configurable. bluemonday takes untrusted user generated content as

Jan 4, 2023
pdfcpu is a PDF processor written in Go.
pdfcpu is a PDF processor written in Go.

pdfcpu is a PDF processing library written in Go supporting encryption. It provides both an API and a CLI. Supported are all versions up to PDF 1.7 (ISO-32000).

Jan 4, 2023
A PDF renderer for the goldmark markdown parser.
A PDF renderer for the goldmark markdown parser.

goldmark-pdf goldmark-pdf is a renderer for goldmark that allows rendering to PDF. Reference See https://pkg.go.dev/github.com/stephenafamo/goldmark-p

Jan 7, 2023
pdf document generation library
pdf document generation library

gopdf 项目介绍 gopdf 是一个生成 PDF 文档的 Golang 库. 主要有以下的特点: 支持 Unicode 字符 (包括中文, 日语, 朝鲜语, 等等.) 文档内容的自动定位与分页, 减少用户的工作量. 支持图片插入, 支持多种图片格式, PNG, BMP, JPEG, WEBP,

Dec 8, 2022
Convert your markdown files to PDF instantly
Convert your markdown files to PDF instantly

Will take a markdown file as input and then create a PDF file with the markdown formatting.

Nov 7, 2022
Pagser is a simple, extensible, configurable parse and deserialize html page to struct based on goquery and struct tags for golang crawler
Pagser is a simple, extensible, configurable parse and deserialize html page to struct based on goquery and struct tags for golang crawler

Pagser Pagser inspired by page parser。 Pagser is a simple, extensible, configurable parse and deserialize html page to struct based on goquery and str

Dec 13, 2022
Produces a set of tags from given source. Source can be either an HTML page, Markdown document or a plain text. Supports English, Russian, Chinese, Hindi, Spanish, Arabic, Japanese, German, Hebrew, French and Korean languages.
Produces a set of tags from given source. Source can be either an HTML page, Markdown document or a plain text. Supports English, Russian, Chinese, Hindi, Spanish, Arabic, Japanese, German, Hebrew, French and Korean languages.

Tagify Gets STDIN, file or HTTP address as an input and returns a list of most popular words ordered by popularity as an output. More info about what

Dec 19, 2022
Templating system for HTML and other text documents - go implementation

FAQ What is Kasia.go? Kasia.go is a Go implementation of the Kasia templating system. Kasia is primarily designed for HTML, but you can use it for any

Mar 15, 2022
yview is a lightweight, minimalist and idiomatic template library based on golang html/template for building Go web application.

wview wview is a lightweight, minimalist and idiomatic template library based on golang html/template for building Go web application. Contents Instal

Dec 5, 2021
HTML, CSS and SVG static renderer in pure Go

Web render This module implements a static renderer for the HTML, CSS and SVG formats. It consists for the main part of a Golang port of the awesome W

Apr 19, 2022
A declarative struct-tag-based HTML unmarshaling or scraping package for Go built on top of the goquery library

goq Example import ( "log" "net/http" "astuart.co/goq" ) // Structured representation for github file name table type example struct { Title str

Dec 12, 2022
htmlquery is golang XPath package for HTML query.

htmlquery Overview htmlquery is an XPath query package for HTML, lets you extract data or evaluate from HTML documents by an XPath expression. htmlque

Jan 4, 2023
Golang HTML to plaintext conversion library

html2text Converts HTML into text of the markdown-flavored variety Introduction Ensure your emails are readable by all! Turns HTML into raw text, usef

Dec 28, 2022
export stripTags from html/template as strip.StripTags

HTML StripTags for Go This is a Go package containing an extracted version of the unexported stripTags function in html/template/html.go. ⚠️ This pack

Dec 4, 2022
network .md into .html with plaintext files
network .md into .html with plaintext files

plain network markdown files into html with plaintext files plain is a static-site generator operating on plaintext files containing a small set of co

Dec 10, 2022
golang program that simpily converts html into markdown

Simpily converts html to markdown Just a simple project I wrote in golang to convert html to markdown, surprisingly works decent for a lot of websites

Oct 23, 2021