A tool for downloading the files from your Hic Et Nunc collection (https://www.hicetnunc.xyz/) and then creating thumbnails.
It should generate thumbnails for static images, videos, HTML pages, SVG and even 3D models!
What's the point? Well there will be a static site generator coming soon so you can have a nice little gallery of your collection wherever you want.
Can also be used as a slideshow. Add it to a screen or even Chromecast.
It's a mess. I know. Just hacking things together as quick as possible to see if it works. It does. Kinda. I hope. If you want to make it nicer please fork / pull request.
Also thanks to
- Mac OSX. Sorry for now at least it is only tested on OSX and uses Chrome path for OSX.
- Node 12 ... I think?
npm install
- serve:
npm install -g serve
- python3
- python3:
python -m pip install ipfsapi
(IPFS API) - For PDFs:
brew install imagemagick ghostscript poppler
(sorry MacOS only ATM)
- Just set the
ownerAddress
in config.
ownerAddress : string
: your Tezos wallet addresscloudFlareUrl : string
: at the moment just leave this ...downloadPath : string
: the location to store downloaded fileslargeImagePath : string
: the location to store large imagesdistPath : string
: the location for generated datapuppetSize
: the size of large images for HTML, SVG and GLTF (browser size)fillMode: object
: if set runs in a different mode. Used to fill out missing information in H=N databasedata: string
: ie./fill.json
the data to load OBJKTs fromuploadToIpfs: boolean
: (currently unsupported) iftrue
uploads created thumbs to IPFSdeleteDownloadsAfterCreation: boolean
: iftrue
deletes downloaded files after each is processeddeleteLargeAfterCreation: boolean
: iftrue
deletes large images after thumbnail creationobjPath: string
: ie./tmp/obj
where to store JSON files with info about created tnumbnails. Also stores error file.limit: int
: if set above0
will only process this # of OBJKTs,offset: int
: if set above0
will process from this # in the queue,startAtObjectNumber: int
: if set above0
will overrideoffset
and start at OBJKT with thistoken_id
thumbnail
: options for thumbnail generationpath: string
: the directory under yourdistPath
to store generated thumbnailsmaxGifSizeKb
: size in KBs before GIFs are converted to videosimage: {formats, sizes}
: format and sizes for image thumbnailsformats: Array<{type, options}>
type: string
: one ofjpeg
,png
,avif
,webp
options: object
: valid options object for type from Sharp (https://sharp.pixelplumbing.com/api-output)
sizes Array<int>:
: width dimension for thumbnails
video: {formats, sizes, maxLengthSeconds}
: options, format and sizes for video thumbnailsmaxLengthSeconds: float
: maximum length in seconds for video thumbnails ie15
will truncate all video thumbnails to 15 seconds long (max)formats
: currently ignoredsizes Array<int>:
: width dimension for thumbnails
ignoreObjects: Array<int>
: list of OBJKT IDs to ignore when generatingonlyObjects: Array<int>
: only process OBJKTs with these IDs
npm start
node index.js <other_config_name>
: ienode index fill
- run
npm run serve-dist
- open a URL displayed
I have my /dist/
directory connected to Github, and have Netlify watching this repo. To update I simply run the tool and then push inside the /dist/
directory.
- @quasimondo scraper: https://gist.github.com/Quasimondo/30416ce22243610a9c95424e8796b008
- @__orderandchaos: random inspiration to fix Chromium (by replacing with Chrome)
- all @hicetnunc2000 community