Makes icon project script accept source in stdin
This commit is contained in:
parent
436b8c58c6
commit
bef27c286b
1 changed files with 4 additions and 1 deletions
|
@ -1,7 +1,10 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
|
||||||
node /home/jonathan/GitRepos/chrome-curl/index.js "$1" |\
|
pagesource="$(cat -)"
|
||||||
|
[ -z "$pagesource" ] && pagesource="$(node /home/jonathan/GitRepos/chrome-curl/index.js "$1")"
|
||||||
|
|
||||||
|
echo "$pagesource" |\
|
||||||
#hq '.iconPreview' data
|
#hq '.iconPreview' data
|
||||||
hq '.iconPreview' attr style | # This gets the style attribute from the preview element
|
hq '.iconPreview' attr style | # This gets the style attribute from the preview element
|
||||||
cut -d '"' -f 2 | cut -d ',' -f 2 | # Gets the base 64 out that we want
|
cut -d '"' -f 2 | cut -d ',' -f 2 | # Gets the base 64 out that we want
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue