hscc

The personnal website source code of Hugo Soucy. Creates from an homebrewed static website generator.
Log | Files | Refs

commit 97751b7393def7fe2a480dfa07172e70edbfa943
parent 5fb4c9f8482ccf614599bae3737dd2eab4b218ab
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Sat, 21 Nov 2020 10:19:16 -0500

Edit bin files

Diffstat:
Mbin/css | 5++---
Abin/http | 9+++++++++
Abin/image | 15+++++++++++++++
Mbin/reply | 22+++++++++++-----------
4 files changed, 37 insertions(+), 14 deletions(-)

diff --git a/bin/css b/bin/css @@ -1,4 +1,3 @@ #!/usr/bin/env sh -sassc src/scss/ux.scss public_html/css/ux.min.css --style compressed && - sassc src/scss/ui.scss public_html/css/ui.min.css --style compressed && - echo "CSS Modified" +sassc src/scss/index.scss public_html/css/index.min.css --style compressed && + echo "SCSS Modified => CSS builded" diff --git a/bin/http b/bin/http @@ -0,0 +1,9 @@ +#!/usr/bin/env lua +do + -- + package.path = package.path .. ';'.. arg[0]:match("(.*/)") ..'/?.lua' + -- + + + +end diff --git a/bin/image b/bin/image @@ -0,0 +1,15 @@ +#!/usr/bin/env sh +# <https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/> + +#mogrify -path . -filter Triangle -define filter:support=2 -thumbnail 300 -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB "$1" + +# mogrify -path /home/hs0ucy/Downloads -thumbnail "768>" -dither None -monochrome -posterize 136 -quality 82 -interlace none st-tmux-capture.png +# mogrify -path /home/hs0ucy/Downloads -dither -posterize 136 -quality 82 -interlace none -resize "768>" hs0ucy-2018.png +# mogrify -path /home/hs0ucy/Downloads -filter Triangle -define filter:support=2 -thumbnail "768>" -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB hs0ucy-2018.png + + + +# while read line +# do +# mogrify -path . -filter Triangle -define filter:support=2 -thumbnail 300 -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB "$line" +# done < "${1:-/dev/stdin}" diff --git a/bin/reply b/bin/reply @@ -4,7 +4,7 @@ do package.path = package.path .. ';'.. arg[0]:match("(.*/)") ..'/?.lua' -- local inspect = require 'inspect' - local gumbo = require 'gumbo' + --local gumbo = require 'gumbo' local lustache = require 'lustache' local file = require 'utils.file' local slugify = require 'utils.slugify' @@ -36,17 +36,17 @@ do tostring(reply_url) until string.len(reply_url) > 0 - local function get_e_content() - local _file = assert(io.popen('curl ' .. reply_url)) - local data = assert(_file:read("*a")) - local document = assert(gumbo.parse(data)) - local econtent = document:getElementsByClassName('detailed-status')[1] - :getElementsByClassName('e-content')[1].innerHTML + -- local function get_e_content() + -- local _file = assert(io.popen('curl ' .. reply_url)) + -- local data = assert(_file:read("*a")) + -- local document = assert(gumbo.parse(data)) + -- local econtent = document:getElementsByClassName('detailed-status')[1] + -- :getElementsByClassName('e-content')[1].innerHTML - _file:close() + -- _file:close() - return econtent - end + -- return econtent + -- end -- Set the structure of the data file local reply_model = { @@ -55,7 +55,7 @@ do date = os.date('%Y-%m-%d'), datetime = os.date('%H:%M:%S'), posttype = "reply", - inreplyto = get_e_content() or nil + --inreplyto = get_e_content() or nil } -- Render the markdown file