Giter Site home page Giter Site logo

earthbound19 / _ebdev Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 3.46 MB

Various tools, mostly custom-made for art development.

Batchfile 0.67% Shell 67.43% Python 13.83% Perl 1.36% JavaScript 2.10% AutoHotkey 0.93% HTML 0.41% Processing 10.98% C 2.24% sed 0.05%

_ebdev's People

Contributors

earthbound19 avatar scribblemaniac avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

_ebdev's Issues

replace `which` with `whereis` for Windows in all scripts?

which maddeningly fails in Cygwin half the time, inexplicably. whereis prints extra info I don't want.

where, built in to windows, returns the path to any .exe or script in the %PATH%, reliably, it seems.

But this means checking if it's Windows or not ($OS env. variable), which is more cumbersome.

I would really like to fix Cygwin which not working (know why), when it fails :(

primitive geometry with decorations

primitive geometry with doily / decorative / curly appendixes / details

+1 fuzzy / grungy / splatter / inverse areas art using those as templates

[MOVED to Trello] combinatorial animated color slides script

  • take a black and white SVG vector image source with N empty (white) regions to fill
  • take a list of colors like this
  • for every possible combination of N colors from the list (combinations without repetition), make an image which fills the N regions with the N colors
  • animate the images

I might start with N = 2 hard-coded, then refactor to make N infinitely extensible.

could use python itertools:

>>> import itertools
>>> falf = [1,2,3,4]
>>> fler = itertools.combinations(falf, 2)
>>> for item in fler:
	print(item)

	
(1, 2)
(1, 3)
(1, 4)
(2, 3)
(2, 4)
(3, 4)

Done ages ago: create a pipeline with these features:

  • automated metadata creation / population of metadata in final publication-ready exported file format(s)
  • blog automated metadata / image metadata population (via WordPress plugin)
  • published/not published tracking
  • auto-syndication to social media outposts from a central canonical site (WordPress Nextscripts

Could probably be improved; documentation locally scattered..

gfind or find??

This question (and going back and forth on it?) has plagued this repo for very long. Maybe an answer is at line 44 of ffmpegAnim.sh in commit 055a0ed

BSaST color override bug

bug fix: color override uses override background color on next variant (newly picked background color isn't loaded--maybe isn't set?--in that scenario

Solve the dang cygwin windows newline problem, everywhere

UPDATE: stop using any gnu utilities ports that create windows newlines (such as those that come with cygwin), and use only ones that don't (such as from MSYS2).

items in this problem:

  • standardize array creation via find command (applies to many scripts, underway); a previous way that may appear in some scripts is: find . -name '*.svg' | sed 's|^./||' > all_svgs.txt. Do instead something like: array=( $(find . -maxdepth 1 -type f -iname \*.png -printf '%f\n') )
  • consistentize sed usage in scripts (stop using gsed). see comments in installUsedBrewPackages.sh
  • Find gnu ported utilities for windows that don't destroy variables by adding windows newlines which confuse assigning results to a variable. Cygwin tools do this apparently randomly, and it is UNACCEPTABLE. It has caused so many hours of troubleshooting, repeatedly, before I go "OH, DUH! CHECK THE STUPID CYGWIN PROBLEM!" ~ Meanwhile (/OR?), a workaround:
  • In every script that needs it, and as standard practice, implement: the following tr -d command eliminates a maddening problem of gsed (et al) returning windows-style line endings, which muck up echo and varaible concatenation commands so that elements after one varaible with a bad line ending disappear; RE: https://stackoverflow.com/a/16768848/1397555 ~ secondOfPair=gsed "$sedCommand" numberedCopies.txt | tr -d '\15\32' ~ Uh, better yet, pipe to tr -d .. when the text file is created.

Case with find vs. gfind: https://serverfault.com/a/354407/121188

Dynamic image crossfades in art (or not dynamic?)

Find a way to crossfade a series of images on-the-fly, and code art formulas that exploit that method (e.g. cross-fading variants of an art image). This would save gigabytes of storage space of rasterized image sequences (video). Stream ffmpeg processing to a video player? avisynth?

https://trac.ffmpeg.org/wiki/StreamingGuide
https://support.metacdn.com/hc/en-us/articles/204513935-How-to-Live-Stream-Using-FFmpeg
https://rwdy15.wordpress.com/2015/02/12/streaming-with-ffmpeg-and-receiving-with-vlc/
https://www.wowza.com/docs/how-to-use-ffmpeg-with-wowza-media-server-mpeg-ts
https://www.npmjs.com/package/ffmpeg-stream

Split imgs2imgsNN into single-convert and all-convert scripts

There is no single-file-conversion script with the functionality of imgs2imgsNN.sh, which converts all images of a given type to another (upscaled by nearest neighbor).

Break the functionality of imgs2imgsNN.sh into a convert-one-file purpose script: img2imgNN.sh, then update imgs2imgsNN.sh to repeatedly call the convert-one purpose script.

BSaST grayscale mode color change bug

  • change to grayscale mode
  • advance 1 variation, then "change" to grayscale mode again.
  • repeat
    Unexpected result: background is gray, but shapes are still colored. Curiously, unexpected result doesn't happen first time, only second and subsequent time that steps are followed.

Doesn't happen with color override mode.

On further investigation, it appears that some objects changed grayscale, and others don't. Maybe sometimes they all don't. And the background doesn't.

Improve .sh script loops over arrays

Replace all mapfile-generated loops (from resultant arrays) in .sh scripts with ifs read loops (which read the last line if no trailing newline at end of input), re: http://stackoverflow.com/a/31398490

while IFS= read -r line || [ -n "$line" ]; do
  echo "$line"
done <file

Or should that be with IFS=' ' ?

I HAD THOUGHT THE FOLLOWING better, but it breaks down when array elements contain spaces, even if you set IFS="". If you try to iterate over an array with spaces in the elements, it lumps it all into one element: UPDATE: Isn't that supposed to be IFS=' ' or IFS=" "` (with a space) though? will that work?

Or skip creating any files and iterate through an array created in memory (the printf command trims any ./ from the start of output) ; re: https://stackoverflow.com/a/12566981/1397555

IFS=" "
array=(`find . -maxdepth 1 -type f -iname \*.$1 -printf '%f\n'`)
# or to find every file,`gfind .` . .
for element in ${array[@]}
do
	echo $element
done

-- which may work with loops that use ffmpeg where file loops that use ffmpeg usually fail on Mac, it seems

Update .sh parameter/no (e.g. $1 or $2) detection in all bash scripts

A lot of bash scripts have unnecessarily complex logic like the following; update them like the simpler examples:

CONVOLUTED:

# if no parameter 2:
if [ -z ${2+x} ]
then
  echo "No argument 2 supplied"
fi

SIMPLER:

# if no parameter 2:
if [ -z "$2" ]
then
  echo "No argument 2 supplied"
fi

CONVOLUTED:

# if _not_ no parameter 1 (in other words, if parameter 1) exists:
if [ ! -z ${1+x} ]
then
  echo "Paramater 1 passed. Will assign from."
  defaultValueTwo=$1
else
  echo "No paramater 1 passed. Will assign default parameter."
  defaultValueTwo=thing
fi

SIMPLER:

if [ "$1" ]
then
  echo "Paramater 1 passed. Will assign from."
  defaultValueTwo=$1
else
  echo "No paramater 1 passed. Will assign default parameter."
  defaultValueTwo=thing
fi

Also change e.g.
if [ ${2+x} ]
to:
if [ "$2" ]

This simpler logic has been tested on all platforms I'm involved with (Mac, Cygwin, Linux, and it doubtless works on msys2); go ahead and update all script thus.

reference: - 1 - 2

Try these SVG tools?

altered color perception prediction script

python script that predicts two colors that will look identical under different lighting (near color / optical illusion match color finder), via CIECAM02 space if possible

brutal/geometric/simple-styled sci-fi generative landscape

super simple geometric science fiction planetscape: brutal triangles for mountains, planets / ringed / with moons / moons background, cloudscapes, forests, rockets

/ rockets ascending

the Zolphenxi lived on a planet bordering folded space which rained new intelligent species annually in exchange for (?) their departed adventurers.

processing / other tesselation

class that takes any collection of geometry and mirrors/tiles (tessellation?) it (in one of the 17 math "wallpaper" groups). maybe someone's already done this with processing--search first.

examples and lists of wallpaper groups:

Possible reference program: tesselmaniac on windows (which is much more handy for original tessellation creation and exploration, but can't handle custom SVG load or other things I may be able to do with Processing).

THE PRISMACOLOR VORTEX (Processing):

  • a circle appears and grows, colored idx 0 from pallete
  • a circle within it appears and grows, idx 1 in palette
  • a circle within that appears and grows, idx 0 in palette
  • ad infinitum until end of palette, then start palette over
  • ad infinitum

mitigate spurts with --reclaimOrphanedCoordinates, colorGrowth.py

Terminal command on Mac that produces a video where this effect is clear and repeated (if you string the frames together in an animation) ; it slows, then starts again in spurts:

python /path/to/_ebDev/scripts/imgAndVideo/colorgrowth.py --viscosity 6 --width 800 --height 100 -n 1 --rshift 20 --stopPaintingPercentAsDecimal 1 -a 1 -q 4 --reclaimOrphanedCoordinates True --randomSeed 838061001 -b [252,251,201] -c [252,251,201] --savePreset False

other irreg. geom. generator improvements

rectangles/circles irregular geometry generator (Processing) improve -- how?

  • abstracted / remembered objects that rotate / translate?
  • make sub-parts of arrangement always in contact with parents (no floating)?
  • RND repeat of shapes across vector?
  • larger canvas, multiple arrangements?

update scripts that used irfanView2imgNN.sh

The functionality of irfanView2imgNN.sh was ported into img2imgsNN.sh which invokes irfanview command-line converter for conversion from ppm to other formats. However, references to irfanView2imgNN.sh remain in other scripts. Find them all, update them, test and verify the fix, then commit and push it to the repo.

BUT, I don't want img2imgsNN.sh to behave as it does. So before this, solve issue #43

goemetric basics color regions over image

geometric basics (start with circles) super enlarged "pixels" from any image:

  • import image
  • get subset of pixels and make an array of their color and location
  • group pixels near each other with similar color into "shape" area
  • replace them with geometric primitives of sampled color, spaced apart and on colored backdrop.

Others have done this with these programs in Go and Filter Forge (which I don't remember the names of right now). The shape and outline and stroke and distancing possibilities I'm imagining would be different though--actually similar to some Aboriginal art.

update all relevant scripts to faster base file name extraction

In all scripts, implement this much faster and more elegant basename / extension extraction method:

fileNameNoExt=${filename%.*}
fileExt=${filename##*.} (does not get full extension if extension has more than one period, as in the tar.gz extension.)
fileExt=${filename#*.} (gets all the dots in extensions, even if it is .blor.blar.tar.gz)

re: https://www.cyberciti.biz/faq/unix-linux-extract-filename-and-extension-in-bash/

Comment I removed from a script; in tests it failed for complex strings piped from a find command:
re: http://stackoverflow.com/a/26753382/1397555

  • To get file name up to first period or dot (.) :
    fbname=$(basename "$fullfile" | cut -d. -f1)

  • To get the file name up to just before the last; preferred:
    filename=$(rev <<< "$1" | cut -d"." -f2- | rev)
    fileext=$(rev <<< "$1" | cut -d"." -f1 | rev)

[the =${.. assignment is more efficient and does the same thing]
re: http://stackoverflow.com/a/17203159/1397555

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.