mirror of
https://github.com/derfenix/webarchive.git
synced 2026-03-11 22:40:58 +03:00
Update README.md
This commit is contained in:
4
.idea/jsonSchemas.xml
generated
4
.idea/jsonSchemas.xml
generated
@@ -3,10 +3,10 @@
|
|||||||
<component name="JsonSchemaMappingsProjectConfiguration">
|
<component name="JsonSchemaMappingsProjectConfiguration">
|
||||||
<state>
|
<state>
|
||||||
<map>
|
<map>
|
||||||
<entry key="openapi.json">
|
<entry key="openapi">
|
||||||
<value>
|
<value>
|
||||||
<SchemaInfo>
|
<SchemaInfo>
|
||||||
<option name="name" value="openapi.json" />
|
<option name="name" value="openapi" />
|
||||||
<option name="relativePathToSchema" value="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json" />
|
<option name="relativePathToSchema" value="https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json" />
|
||||||
<option name="applicationDefined" value="true" />
|
<option name="applicationDefined" value="true" />
|
||||||
<option name="patterns">
|
<option name="patterns">
|
||||||
|
|||||||
52
README.md
52
README.md
@@ -2,12 +2,62 @@
|
|||||||
|
|
||||||
Aimed to be a simple, fast and easy-to-use webarchive for personal or home-net usage.
|
Aimed to be a simple, fast and easy-to-use webarchive for personal or home-net usage.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
* Golang 1.19 or higher
|
||||||
|
* wkhtmltopdf binary in $PATH (to save pages in pdf)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
#### 1. Start the server
|
||||||
|
|
||||||
|
```shell
|
||||||
|
go run ./cmd/server/main.go
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2. Add a page
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl -X POST --location "http://localhost:5001/pages" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{
|
||||||
|
\"url\": \"https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1937\",
|
||||||
|
\"formats\": [
|
||||||
|
\"all\"
|
||||||
|
]
|
||||||
|
}" | jq .
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 3. Get the page's info
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl -X GET --location "http://localhost:5001/pages/$page_id" | jq .
|
||||||
|
```
|
||||||
|
where `$page_id` — value of the `id` field from previous command response.
|
||||||
|
If `status` field in response is `success` (or `with_errors`) - the `results` field
|
||||||
|
will contain all processed formats with ids of the stored files.
|
||||||
|
|
||||||
|
#### 4. Open file in browser
|
||||||
|
|
||||||
|
```shell
|
||||||
|
xdg-open http://localhost:5001/pages/$page_id/file/$file_id
|
||||||
|
```
|
||||||
|
Where `$page_id` — value of the `id` field from previous command response, and
|
||||||
|
`$file_id` — the id of interesting file.
|
||||||
|
|
||||||
|
#### 5. List all stored pages
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl -X GET --location "http://localhost:5001/pages" | jq .
|
||||||
|
```
|
||||||
|
|
||||||
### Roadmap
|
### Roadmap
|
||||||
|
|
||||||
- [x] Save page to pdf
|
- [x] Save page to pdf
|
||||||
- [x] Save URL headers
|
- [x] Save URL headers
|
||||||
- [ ] Save page to the single-page html
|
- [ ] Save page to the single-page html
|
||||||
- [ ] Save page to html with separate resource files
|
- [ ] Save page to html with separate resource files (?)
|
||||||
- [ ] Optional authentication
|
- [ ] Optional authentication
|
||||||
- [ ] Multi-user access
|
- [ ] Multi-user access
|
||||||
- [ ] Support PostgreSQL
|
- [ ] Support PostgreSQL
|
||||||
|
- [ ] Extend configuration
|
||||||
|
|||||||
Reference in New Issue
Block a user