Add site metadata
This commit is contained in:
parent
0968af8d65
commit
9f4eec10ee
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
build
|
50
Makefile
Normal file
50
Makefile
Normal file
@ -0,0 +1,50 @@
|
||||
appname := scrawl
|
||||
sources := $(wildcard *.go)
|
||||
|
||||
build = GOOS=$(1) GOARCH=$(2) go build -o build/$(appname)$(3)
|
||||
tar = cd build && tar -cvzf $(appname)_$(1)_$(2).tar.gz $(appname)$(3) && rm $(appname)$(3)
|
||||
zip = cd build && zip $(appname)_$(1)_$(2).zip $(appname)$(3) && rm $(appname)$(3)
|
||||
|
||||
.PHONY: all windows darwin linux clean
|
||||
|
||||
all: windows darwin linux
|
||||
|
||||
clean:
|
||||
rm -rf build/
|
||||
|
||||
# linux builds
|
||||
linux: build/$(appname)_linux_arm.tar.gz build/$(appname)_linux_arm64.tar.gz build/$(appname)_linux_386.tar.gz build/$(appname)_linux_amd64.tar.gz
|
||||
|
||||
build/$(appname)_linux_386.tar.gz: $(sources)
|
||||
$(call build,linux,386,)
|
||||
$(call tar,linux,386)
|
||||
|
||||
build/$(appname)_linux_amd64.tar.gz: $(sources)
|
||||
$(call build,linux,amd64,)
|
||||
$(call tar,linux,amd64)
|
||||
|
||||
build/$(appname)_linux_arm.tar.gz: $(sources)
|
||||
$(call build,linux,arm,)
|
||||
$(call tar,linux,arm)
|
||||
|
||||
build/$(appname)_linux_arm64.tar.gz: $(sources)
|
||||
$(call build,linux,arm64,)
|
||||
$(call tar,linux,arm64)
|
||||
|
||||
# darwin builds
|
||||
darwin: build/$(appname)_darwin_amd64.tar.gz
|
||||
|
||||
build/$(appname)_darwin_amd64.tar.gz: $(sources)
|
||||
$(call build,darwin,amd64,)
|
||||
$(call tar,darwin,amd64)
|
||||
|
||||
# windows builds
|
||||
windows: build/$(appname)_windows_386.zip build/$(appname)_windows_amd64.zip
|
||||
|
||||
build/$(appname)_windows_386.zip: $(sources)
|
||||
$(call build,windows,386,.exe)
|
||||
$(call zip,windows,386,.exe)
|
||||
|
||||
build/$(appname)_windows_amd64.zip: $(sources)
|
||||
$(call build,windows,amd64,.exe)
|
||||
$(call zip,windows,amd64,.exe)
|
23
README.md
23
README.md
@ -1,3 +1,12 @@
|
||||
<!-- +++
|
||||
Area = "projects"
|
||||
GitHub = "scrawl"
|
||||
Layout = "page"
|
||||
Tags = ["css", "downloader", "golang", "mit license", "scrawl", "web"]
|
||||
Description = "Command line CSS selector-based web scraper and downloader."
|
||||
Collection = "ProjectsComplete"
|
||||
+++ -->
|
||||
|
||||
# Scrawl
|
||||
|
||||
Scrawl is a simple command line tool for downloading files referenced on websites using [CSS
|
||||
@ -14,15 +23,7 @@ If you already have the Go environment and toolchain set up, you can get the lat
|
||||
$ go get github.com/FooSoft/scrawl
|
||||
```
|
||||
|
||||
Otherwise, you can use the pre-built binaries for the platforms below:
|
||||
|
||||
* [scrawl\_darwin\_386.tar.gz](https://foosoft.net/projects/scrawl/dl/scrawl_darwin_386.tar.gz)
|
||||
* [scrawl\_darwin\_amd64.tar.gz](https://foosoft.net/projects/scrawl/dl/scrawl_darwin_amd64.tar.gz)
|
||||
* [scrawl\_linux\_386.tar.gz](https://foosoft.net/projects/scrawl/dl/scrawl_linux_386.tar.gz)
|
||||
* [scrawl\_linux\_amd64.tar.gz](https://foosoft.net/projects/scrawl/dl/scrawl_linux_amd64.tar.gz)
|
||||
* [scrawl\_linux\_arm.tar.gz](https://foosoft.net/projects/scrawl/dl/scrawl_linux_arm.tar.gz)
|
||||
* [scrawl\_windows\_386.tar.gz](https://foosoft.net/projects/scrawl/dl/scrawl_windows_386.tar.gz)
|
||||
* [scrawl\_windows\_amd64.tar.gz](https://foosoft.net/projects/scrawl/dl/scrawl_windows_amd64.tar.gz)
|
||||
Otherwise, you can use the [pre-built binaries](https://github.com/FooSoft/scrawl/releases) from the project page.
|
||||
|
||||
## Usage
|
||||
|
||||
@ -39,7 +40,7 @@ Let's say we want to create a script to download the latest Debian package of [A
|
||||
|
||||
1. We load up the homepage and are presented with a big download button as shown in the screenshot below:
|
||||
|
||||
[![Anki Homepage](https://foosoft.net/projects/scrawl/img/anki-thumb.png)](https://foosoft.net/projects/scrawl/img/anki.png)
|
||||
[![Anki Homepage](img/anki-thumb.png)](img/anki.png)
|
||||
|
||||
2. Let's copy that link so we can download the latest version with wGet or curl from our script at any time!
|
||||
|
||||
@ -49,7 +50,7 @@ Let's say we want to create a script to download the latest Debian package of [A
|
||||
|
||||
3. Let's inspect the download link in your favorite browser to see what additional information we can get:
|
||||
|
||||
[![Inspector](https://foosoft.net/projects/scrawl/img/inspect-thumb.png)](https://foosoft.net/projects/scrawl/img/inspect.png)
|
||||
[![Inspector](img/inspect-thumb.png)](img/inspect.png)
|
||||
|
||||
4. It appears that we can easily create a selector for this element: `#linux > a:nth-child(2)`.
|
||||
|
||||
|
BIN
img/anki.png
Normal file
BIN
img/anki.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
BIN
img/inspect.png
Normal file
BIN
img/inspect.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
Loading…
Reference in New Issue
Block a user