dir2meme - brcon2023-hackathons - Bitreichcon 2023 Hackathon Repository
(HTM) git clone git://bitreich.org/brcon2023-hackathons git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/brcon2023-hackathons
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
---
dir2meme (364B)
---
1 #!/bin/sh
2
3 if [ $# -gt 1 ];
4 then
5 printf "usage: %s [dir]\n" "$(basename "$0")" >&2
6 exit 1
7 fi
8
9 printf "meme\n"
10 find ${1:-.} -maxdepth 1 -type f \
11 | while read -r medianame;
12 do
13 case "${medianame}" in
14 *.meme|*.memeblob.*)
15 continue
16 ;;
17 esac
18
19 filename="$(basename "${medianame}")"
20 memetag="${filename%.*}"
21 printf "#%s %s\n" "${memetag}" "${filename}"
22 done
23
24