Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0dbf2fd

Browse filesBrowse files
committed
0.3
1 parent 14fc7b8 commit 0dbf2fd
Copy full SHA for 0dbf2fd

File tree

Expand file treeCollapse file tree

4 files changed

+46
-2
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+46
-2
lines changed

‎.gitignore

Copy file name to clipboardExpand all lines: .gitignore
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ tmp.gnuplot
22
*.gif
33
*.png
44
*.svg
5+
/web
56
*.zip

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ before_install:
55
# Fails because gnuplot is too old there.
66
#- sudo apt-get update -qq
77
#- sudo apt-get install gnuplot-x11
8+
after_success: |
9+
if [ -n "$GITHUB_API_KEY" ]; then
10+
cd "$TRAVIS_BUILD_DIR"
11+
make web
12+
cd web
13+
git init
14+
git checkout -b gh-pages
15+
git add .
16+
git -c user.name='travis' -c user.email='travis' commit -m init
17+
git push -f https://cirosantilli:$GITHUB_API_KEY@github.com/cirosantilli/gnuplot-examples-gh-pages gh-pages
18+
cd "$TRAVIS_BUILD_DIR"
19+
fi
820
script:
921
- gnuplot --version
1022
- make zip

‎Makefile

Copy file name to clipboardExpand all lines: Makefile
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
IN_EXT ?= .gnuplot
44
GIF_EXT ?= .gif
55
PNG_EXT ?= .png
6+
WEB ?= web
67
ZIP ?= gnuplot-examples.zip
78

89
GIFS := $(patsubst %$(GIF_EXT)$(IN_EXT),%$(GIF_EXT),$(wildcard *$(IN_EXT)))
910
PNGS := $(patsubst %$(IN_EXT),%$(PNG_EXT),$(wildcard *$(IN_EXT)))
1011
# Remove some special files that should not be rendered.
1112
PNGS := $(filter-out main$(PNG_EXT) template$(PNG_EXT),$(PNGS))
1213

13-
.PHONY: clean
14+
.PHONY: clean web zip
1415

1516
all: $(PNGS) $(GIFS)
1617

@@ -21,7 +22,12 @@ all: $(PNGS) $(GIFS)
2122
gnuplot -e 'set terminal gif animate delay 10' -e 'set output "$@"' '$<'
2223

2324
clean:
24-
rm -f *$(GIF_EXT) *$(PNG_EXT) '$(ZIP)'
25+
rm -fr *$(GIF_EXT) *$(PNG_EXT) '$(ZIP)' '$(WEB)'
26+
27+
web: all
28+
mkdir -p '$(WEB)'
29+
cp *$(GIF_EXT) *$(PNG_EXT) '$(WEB)'
30+
./make-web '$(WEB)'
2531

2632
zip: all
2733
rm -f '$(ZIP)'

‎make-web

Copy file name to clipboard
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
dir="$1"
4+
index="index.html"
5+
cd "$1"
6+
imgs=*
7+
8+
printf '<!DOCTYPE html>
9+
<html lang="en">
10+
<head>
11+
<meta charset="utf-8"/>
12+
<title>Gnuplot Examples</title>
13+
</head>
14+
<body>
15+
<h1>Gnuplot Examples</h1>
16+
' > "$index"
17+
18+
for img in $imgs; do
19+
echo "<p>$img</p>" >> "$index"
20+
echo "<img src=\"$img\" />" >> "$index"
21+
done
22+
23+
printf '</body>
24+
</html>
25+
' >> "$index"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.