https://github.com/pawanpaudel93/web3-capture-action
Capture single page html and screenshot of websites and save to web3.storage and Moralis.
https://github.com/pawanpaudel93/web3-capture-action
Last synced: 2 months ago
JSON representation
Capture single page html and screenshot of websites and save to web3.storage and Moralis.
- Host: GitHub
- URL: https://github.com/pawanpaudel93/web3-capture-action
- Owner: pawanpaudel93
- License: mit
- Created: 2022-09-16T09:50:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-07T16:08:04.000Z (about 2 years ago)
- Last Synced: 2025-03-19T02:47:58.628Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 3.13 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
web3-capture-action
Capture single page html and screenshot of websites and save to web3.storagem or moralis.
## Example usage
```yaml
name: web3-capture-action
on: [push]
jobs:
capture:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: |
sudo apt-get update
sudo apt-get install -y libgconf-2-4 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libgbm-dev libnss3-dev libxss-dev libasound2
- name: Install Google Chrome
uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable
- run: npm install https://github.com/pawanpaudel93/single-file-cli
- name: Capture webpage and screenshot
uses: pawanpaudel93/[email protected]
with:
web3_token: ${{ secrets.WEB3_TOKEN }}
url_file_path: 'urls.txt'
service: "moralis"
```## Inputs
## Inputs
### `web3_token`
**Required** API token for web3.storage or moralis
### `url_file_path`
**Required** File containing urls lines to capture.
### `service`
**Required** Service type either `web3.storage` or `moralis` to upload the captured webpage, screenshot and metadata.
Show advanced options:
outout_file_path
,web3_api
### `output_file_path`
_Default_ `saved.json`
JSON file path to save the captured webpage information.
### `web3_api`
_Default_ `https://api.web3.storage`
Useful for testing against staging deployments by setting to the api origin of your choice.
## Outputs
### `out`
JSON string of the captured webpage information.
e.g.
```json
[
{
"title": "Web3 Storage - Simple file storage with IPFS & Filecoin",
"url": "https://web3.storage",
"cid": "bafybeiahtmydckvwwdjndstih5mmxdx2qixdcboki5i3fqzw7a2nwwmkx4",
"w3link": "https://w3s.link/ipfs/bafybeiahtmydckvwwdjndstih5mmxdx2qixdcboki5i3fqzw7a2nwwmkx4",
"timestamp": "Wed Sep 21 2022 20:36:13 GMT+0000 (Coordinated Universal Time)"
}
]
```## Author
👤 **Pawan Paudel**
- Github: [@pawanpaudel93](https://github.com/pawanpaudel93)
## 🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/pawanpaudel93/web3-capture-action/issues).## Show your support
Give a ⭐️ if this project helped you!
Copyright © 2022 [Pawan Paudel](https://github.com/pawanpaudel93).