commit a39d976e9c04be952f01d5a533f5babb0520441c Author: Schoenberger, Philipp Date: Tue Jul 2 17:09:01 2019 +0200 inital commit diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..eea67f9 --- /dev/null +++ b/Makefile @@ -0,0 +1,152 @@ +CPUS ?= $(shell cat /proc/cpuinfo | grep processor | wc -l || echo 1) +MAKEFLAGS += --jobs=$(CPUS) + +IS_UBUNTU_1404=$(shell lsb_release -r | grep 14.04 > /dev/null && echo yes || echo no) +ifeq ($IS_UBUNTU_1404,"yes") + PY=python2.7 +else + PY=python3 +endif + +PELICAN=pelican +PELICANOPTS= + +BASEDIR=$(CURDIR) +INPUTDIR=$(BASEDIR)/content +OUTPUTDIR=$(BASEDIR)/output +CONFFILE=$(BASEDIR)/pelicanconf.py +PUBLISHCONF=$(BASEDIR)/publishconf.py + +FTP_HOST=localhost +FTP_USER=anonymous +FTP_TARGET_DIR=/ + +SSH_HOST=phschoen.de +SSH_PORT=14118 +SSH_USER=phschoen +SSH_TARGET_DIR=/var/www + +S3_BUCKET=my_s3_bucket + +DROPBOX_DIR=~/Dropbox/Public/ + +help: + @echo 'Makefile for a pelican Web site ' + @echo ' ' + @echo 'Usage: ' + @echo ' make html (re)generate the web site ' + @echo ' make clean remove the generated files ' + @echo ' make regenerate regenerate files upon modification ' + @echo ' make publish generate using production settings ' + @echo ' make serve serve site at http://localhost:8000' + @echo ' make devserver start/restart develop_server.sh ' + @echo ' make stopserver stop local server ' + @echo ' ssh_upload upload the web site via SSH ' + @echo ' rsync_upload upload the web site via rsync+ssh ' + @echo ' dropbox_upload upload the web site via Dropbox ' + @echo ' ftp_upload upload the web site via FTP ' + @echo ' s3_upload upload the web site via S3 ' + @echo ' github upload the web site via gh-pages ' + @echo ' ' + + +# generate thubnails +thumb-img: + +IMAGE_ORG_DIR=$(INPUTDIR)/images_org +IMAGE_DIR=$(INPUTDIR)/images +IMG_SIZES=200 375 480 800 1600 +IMG_FILES=$(shell find $(IMAGE_ORG_DIR)/ -type f -name '*.jpg') +IMG_FILES+=$(shell find $(IMAGE_ORG_DIR)/ -type f -name '*.png') + +img: $(IMAGE_DIR) + +$(IMAGE_DIR): + mkdir -p $@ + +define img-out-name +$(dir $(patsubst $(IMAGE_ORG_DIR)%,$(IMAGE_DIR)%, $(1)))$(2)/$(notdir $(1)) +endef + +img: copy-others + +copy-others: + cp $(IMAGE_ORG_DIR)/* $(IMAGE_DIR)/ -r + +$(foreach size, $(IMG_SIZES), \ + $(foreach img, $(IMG_FILES), \ + $(eval img:$(call img-out-name, $(img),$(size))) \ +)) + +define convert-rule +$(1):$(2) + mkdir -p $(dir $(1)) + convert $(2) -resize $(3) $(1) + +endef + +$(foreach size, $(IMG_SIZES), \ + $(foreach img, $(IMG_FILES), \ + $(eval $(call convert-rule, $(call img-out-name, $(img),$(size)),$(img),$(size)) ) \ + ) \ +) + +$(IMAGE_DIR)%.png: $(IMAGE_ORG_DIR)%.png + mkdir -p $(dir $@) + cp $< $@ + +$(IMAGE_DIR)%.jpg: $(IMAGE_ORG_DIR)%.jpg + mkdir -p $(dir $@) + cp $< $@ + +#$(call convert-img-rule, $(IMAGE_ORG_DIR)/gallery/IMG_3184.jpg ) + +img-clean: + rm $(IMAGE_DIR) -rf + +html: clean $(OUTPUTDIR)/index.html + +$(OUTPUTDIR)/%.html: + $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) + +clean: img-clean + [ ! -d $(OUTPUTDIR) ] || find $(OUTPUTDIR) -mindepth 1 -delete + +regenerate: clean + $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) + +serve: $(OUTPUTDIR) + cd $(OUTPUTDIR) && $(PY) -m pelican.server + +devserver: + killall $(PY) pelican || true + $(BASEDIR)/develop_server.sh restart + +stopserver: + kill -9 `cat pelican.pid` + kill -9 `cat srv.pid` + @echo 'Stopped Pelican and SimpleHTTPServer processes running in background.' + +publish: + $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS) + +ssh_upload: publish + scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) + +rsync_upload: publish + rsync -e "ssh -p $(SSH_PORT)" -P -rvz --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude + +dropbox_upload: publish + cp -r $(OUTPUTDIR)/* $(DROPBOX_DIR) + +ftp_upload: publish + lftp ftp://$(FTP_USER)@$(FTP_HOST) -e "mirror -R $(OUTPUTDIR) $(FTP_TARGET_DIR) ; quit" + +s3_upload: publish + s3cmd sync $(OUTPUTDIR)/ s3://$(S3_BUCKET) --acl-public --delete-removed + +github: publish + ghp-import $(OUTPUTDIR) + git push origin gh-pages + +.PHONY: html help clean regenerate serve devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload github diff --git a/README.md b/README.md new file mode 100644 index 0000000..3a295f2 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +phschoen.de +########### + +install requirements: + + pip install -r requirements.txt diff --git a/content/blog/01_new_page_de.md b/content/blog/01_new_page_de.md new file mode 100644 index 0000000..24e51f5 --- /dev/null +++ b/content/blog/01_new_page_de.md @@ -0,0 +1,29 @@ +title: New Webpage +date: 2019-05-22 +tags: pelican, html, lightbox +category: web +lang: de +author: Philipp Schönberer +summary: I didched wordpress and moved on. + +Last week I was researching for a better way to generate my webpage. +Before I was using wordpress and dozends of plugins to get a website running like I would like it +Then my server got corrupted and I had to resetup the website. + +This was realy crule and I did not want to deal with the plugin crap again. +Also, wordpress was so called 'klickibunti' and I could not write content from my good old vim. :'( + +This introduces a to high burden to acually write some blog, since it's not that convinient to write +or save a intermediate step and continue again later. +Also, if something is not working you have at least the git history to step back and try again. +Try this with wordpress plugins. + +So overall i have still lot of things to script/implement and add but the main sceleton is now in place. + +The HTML is now generated by [markdown](https://daringfireball.net/projects/markdown/) and translated +with [pelican](https://getpelican.com) into acual html and some minimal javascript. + + +[lightgallery + /images/previous_phschoe_de.png , Vorherige Website mit wordpress; +lightgalleryend] diff --git a/content/blog/01_new_page_en.md b/content/blog/01_new_page_en.md new file mode 100644 index 0000000..6b2017e --- /dev/null +++ b/content/blog/01_new_page_en.md @@ -0,0 +1,30 @@ +title: New Webpage +date: 2019-05-22 +tags: pelican, html, lightbox +category: web +lang: en +slug: web +author: Philipp Schönberer +summary: I didched wordpress and moved on. + +Last week I was researching for a better way to generate my webpage. +Before I was using wordpress and dozends of plugins to get a website running like I would like it +Then my server got corrupted and I had to resetup the website. + +This was realy crule and I did not want to deal with the plugin crap again. +Also, wordpress was so called 'klickibunti' and I could not write content from my good old vim. :'( + +This introduces a to high burden to acually write some blog, since it's not that convinient to write +or save a intermediate step and continue again later. +Also, if something is not working you have at least the git history to step back and try again. +Try this with wordpress plugins. + +So overall i have still lot of things to script/implement and add but the main sceleton is now in place. + +The HTML is now generated by [markdown](https://daringfireball.net/projects/markdown/) and translated +with [pelican](https://getpelican.com) into acual html and some minimal javascript. + + +[lightgallery + /images/previous_phschoe_de.png ,Previous webpage with wordpress; +lightgalleryend] diff --git a/content/images/.gitignore b/content/images/.gitignore new file mode 100644 index 0000000..88cc107 --- /dev/null +++ b/content/images/.gitignore @@ -0,0 +1,2 @@ +*.jpg +*.png diff --git a/content/images/favicon.xcf b/content/images/favicon.xcf new file mode 100644 index 0000000..a68bfba Binary files /dev/null and b/content/images/favicon.xcf differ diff --git a/content/images/gallery/.gitignore b/content/images/gallery/.gitignore new file mode 100644 index 0000000..592f5d0 --- /dev/null +++ b/content/images/gallery/.gitignore @@ -0,0 +1 @@ +*.thumb.* diff --git a/content/images_org/familyguy.png b/content/images_org/familyguy.png new file mode 100644 index 0000000..a72de23 Binary files /dev/null and b/content/images_org/familyguy.png differ diff --git a/content/images_org/favicon.png b/content/images_org/favicon.png new file mode 100644 index 0000000..d9cc7f3 Binary files /dev/null and b/content/images_org/favicon.png differ diff --git a/content/images_org/favicon.xcf b/content/images_org/favicon.xcf new file mode 100644 index 0000000..a68bfba Binary files /dev/null and b/content/images_org/favicon.xcf differ diff --git a/content/images_org/gallery/.gitignore b/content/images_org/gallery/.gitignore new file mode 100644 index 0000000..592f5d0 --- /dev/null +++ b/content/images_org/gallery/.gitignore @@ -0,0 +1 @@ +*.thumb.* diff --git a/content/images_org/gallery/IMG_3184.jpg b/content/images_org/gallery/IMG_3184.jpg new file mode 100644 index 0000000..33ed75e Binary files /dev/null and b/content/images_org/gallery/IMG_3184.jpg differ diff --git a/content/images_org/gallery/IMG_3364.jpg b/content/images_org/gallery/IMG_3364.jpg new file mode 100644 index 0000000..e78f310 Binary files /dev/null and b/content/images_org/gallery/IMG_3364.jpg differ diff --git a/content/images_org/gallery/IMG_3386.jpg b/content/images_org/gallery/IMG_3386.jpg new file mode 100644 index 0000000..233cd52 Binary files /dev/null and b/content/images_org/gallery/IMG_3386.jpg differ diff --git a/content/images_org/gallery/IMG_3414.jpg b/content/images_org/gallery/IMG_3414.jpg new file mode 100644 index 0000000..9318d8e Binary files /dev/null and b/content/images_org/gallery/IMG_3414.jpg differ diff --git a/content/images_org/gallery/IMG_3477.jpg b/content/images_org/gallery/IMG_3477.jpg new file mode 100644 index 0000000..1dd5284 Binary files /dev/null and b/content/images_org/gallery/IMG_3477.jpg differ diff --git a/content/images_org/gallery/IMG_3483.jpg b/content/images_org/gallery/IMG_3483.jpg new file mode 100644 index 0000000..f6f7ec0 Binary files /dev/null and b/content/images_org/gallery/IMG_3483.jpg differ diff --git a/content/images_org/gallery/IMG_3559.jpg b/content/images_org/gallery/IMG_3559.jpg new file mode 100644 index 0000000..6065933 Binary files /dev/null and b/content/images_org/gallery/IMG_3559.jpg differ diff --git a/content/images_org/gallery/IMG_8722.jpg b/content/images_org/gallery/IMG_8722.jpg new file mode 100644 index 0000000..c3e5c1b Binary files /dev/null and b/content/images_org/gallery/IMG_8722.jpg differ diff --git a/content/images_org/gallery/IMG_9037.jpg b/content/images_org/gallery/IMG_9037.jpg new file mode 100644 index 0000000..2a9f4a9 Binary files /dev/null and b/content/images_org/gallery/IMG_9037.jpg differ diff --git a/content/images_org/gallery/IMG_9097.jpg b/content/images_org/gallery/IMG_9097.jpg new file mode 100644 index 0000000..8ef43a1 Binary files /dev/null and b/content/images_org/gallery/IMG_9097.jpg differ diff --git a/content/images_org/gallery/IMG_9136.jpg b/content/images_org/gallery/IMG_9136.jpg new file mode 100644 index 0000000..1748442 Binary files /dev/null and b/content/images_org/gallery/IMG_9136.jpg differ diff --git a/content/images_org/gallery/IMG_9137.jpg b/content/images_org/gallery/IMG_9137.jpg new file mode 100644 index 0000000..1266eff Binary files /dev/null and b/content/images_org/gallery/IMG_9137.jpg differ diff --git a/content/images_org/gallery/IMG_9393.jpg b/content/images_org/gallery/IMG_9393.jpg new file mode 100644 index 0000000..20ecdf2 Binary files /dev/null and b/content/images_org/gallery/IMG_9393.jpg differ diff --git a/content/images_org/previous_phschoe_de.png b/content/images_org/previous_phschoe_de.png new file mode 100644 index 0000000..cc599c1 Binary files /dev/null and b/content/images_org/previous_phschoe_de.png differ diff --git a/content/pages/404.md b/content/pages/404.md new file mode 100644 index 0000000..852c0ca --- /dev/null +++ b/content/pages/404.md @@ -0,0 +1,17 @@ +title: 404 +date: 2019-01-03 10:20 +authors: Philipp Schönberger +url: 404.html +save_as: 404.html + +The page you have requested does not exist. +Just drink some coffee and take a look back in [/blog](/blog) + +daf + +If the problem persists, please do not hessitate to contact me: + +## Contact Details ## + +* Email: mail@phschoen.de +* Address: Check the WHOIS record. diff --git a/publishconf.py b/publishconf.py new file mode 100644 index 0000000..85ff8ef --- /dev/null +++ b/publishconf.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- # +from __future__ import unicode_literals + +# This file is only used if you use `make publish` or +# explicitly specify it as your config file. + +import os +import sys +sys.path.append(os.curdir) +from pelicanconf import * + +SITEURL = '' +RELATIVE_URLS = False + +FEED_ALL_ATOM = 'feeds/all.atom.xml' +CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml' + +DELETE_OUTPUT_DIRECTORY = True + +# Following items are often useful when publishing + +#DISQUS_SITENAME = "" +#GOOGLE_ANALYTICS = "" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..378fb15 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +pelican +Markdown +BeautifulSoup4 +typogrify +pathlib +python-resize-image + +python-gettext