View Single Post
Old 01-22-2025, 11:38 AM   #775
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,652
Karma: 7908443
Join Date: Sep 2020
Device: none
PHP Code:
programout '  💾 'epub=select(formats_sizes(),'EPUB'); epub_str=cmp(epub,'',''''strcat('EPUB: 'human_readable(epub), ' | ')); out=strcat(outepub_str); 
pdf=select(formats_sizes(),'PDF'); pdf_str=cmp(pdf,'',''''strcat('PDF: 'human_readable(pdf), ' | ')); out=strcat(outpdf_str); 
azw2=select(formats_sizes(),'AZW2'); azw2_str=cmp(azw2,'',''''strcat('AZW2: 'human_readable(azw2), ' | ')); out=strcat(outazw2_str); 
azw3=select(formats_sizes(),'AZW3'); azw3_str=cmp(azw3,'',''''strcat('AZW3: 'human_readable(azw3), ' | ')); out=strcat(outazw3_str); 
bmp=select(formats_sizes(),'BMP'); bmp_str=cmp(bmp,'',''''strcat('BMP: 'human_readable(bmp), ' | ')); out=strcat(outbmp_str); 
cbr=select(formats_sizes(),'CBR'); cbr_str=cmp(cbr,'',''''strcat('CBR: 'human_readable(cbr), ' | ')); out=strcat(outcbr_str); 
cbz=select(formats_sizes(),'CBZ'); cbz_str=cmp(cbz,'',''''strcat('CBZ: 'human_readable(cbz), ' | ')); out=strcat(outcbz_str); 
computer=select(formats_sizes(),'COMPUTER'); computer_str=cmp(computer,'',''''strcat('COMPUTER: 'human_readable(computer), ' | ')); out=strcat(outcomputer_str); 
dir=select(formats_sizes(),'DIR'); dir_str=cmp(dir,'',''''strcat('DIR: 'human_readable(dir), ' | ')); out=strcat(outdir_str); 
djvu=select(formats_sizes(),'DJVU'); djvu_str=cmp(djvu,'',''''strcat('DJVU: 'human_readable(djvu), ' | ')); out=strcat(outdjvu_str); 
docx=select(formats_sizes(),'DOCX'); docx_str=cmp(docx,'',''''strcat('DOCX: 'human_readable(docx), ' | ')); out=strcat(outdocx_str); 
fb2=select(formats_sizes(),'FB2'); fb2_str=cmp(fb2,'',''''strcat('FB2: 'human_readable(fb2), ' | ')); out=strcat(outfb2_str); 
gif=select(formats_sizes(),'GIF'); gif_str=cmp(gif,'',''''strcat('GIF: 'human_readable(gif), ' | ')); out=strcat(outgif_str); 
htmlz=select(formats_sizes(),'HTMLZ'); htmlz_str=cmp(htmlz,'',''''strcat('HTMLZ: 'human_readable(htmlz), ' | ')); out=strcat(outhtmlz_str); 
jpeg=select(formats_sizes(),'JPEG'); jpeg_str=cmp(jpeg,'',''''strcat('JPEG: 'human_readable(jpeg), ' | ')); out=strcat(outjpeg_str); 
jpg=select(formats_sizes(),'JPG'); jpg_str=cmp(jpg,'',''''strcat('JPG: 'human_readable(jpg), ' | ')); out=strcat(outjpg_str); 
kfx=select(formats_sizes(),'KFX'); kfx_str=cmp(kfx,'',''''strcat('KFX: 'human_readable(kfx), ' | ')); out=strcat(outkfx_str); 
lit=select(formats_sizes(),'LIT'); lit_str=cmp(lit,'',''''strcat('LIT: 'human_readable(lit), ' | ')); out=strcat(outlit_str); 
lrf=select(formats_sizes(),'LRF'); lrf_str=cmp(lrf,'',''''strcat('LRF: 'human_readable(lrf), ' | ')); out=strcat(outlrf_str); 
lrx=select(formats_sizes(),'LRX'); lrx_str=cmp(lrx,'',''''strcat('LRX: 'human_readable(lrx), ' | ')); out=strcat(outlrx_str); 
md=select(formats_sizes(),'MD'); md_str=cmp(md,'',''''strcat('MD: 'human_readable(md), ' | ')); out=strcat(outmd_str); 
mobi=select(formats_sizes(),'MOBI'); mobi_str=cmp(mobi,'',''''strcat('MOBI: 'human_readable(mobi), ' | ')); out=strcat(outmobi_str); 
odt=select(formats_sizes(),'ODT'); odt_str=cmp(odt,'',''''strcat('ODT: 'human_readable(odt), ' | ')); out=strcat(outodt_str); 
opml=select(formats_sizes(),'OPML'); opml_str=cmp(opml,'',''''strcat('OPML: 'human_readable(opml), ' | ')); out=strcat(outopml_str); 
png=select(formats_sizes(),'PNG'); png_str=cmp(png,'',''''strcat('PNG: 'human_readable(png), ' | ')); out=strcat(outpng_str); 
rar=select(formats_sizes(),'RAR'); rar_str=cmp(rar,'',''''strcat('RAR: 'human_readable(rar), ' | ')); out=strcat(outrar_str); 
rtf=select(formats_sizes(),'RTF'); rtf_str=cmp(rtf,'',''''strcat('RTF: 'human_readable(rtf), ' | ')); out=strcat(outrtf_str); 
snb=select(formats_sizes(),'SNB'); snb_str=cmp(snb,'',''''strcat('SNB: 'human_readable(snb), ' | ')); out=strcat(outsnb_str); 
svg=select(formats_sizes(),'SVG'); svg_str=cmp(svg,'',''''strcat('SVG: 'human_readable(svg), ' | ')); out=strcat(outsvg_str); 
tpz=select(formats_sizes(),'TPZ'); tpz_str=cmp(tpz,'',''''strcat('TPZ: 'human_readable(tpz), ' | ')); out=strcat(outtpz_str); 
txt=select(formats_sizes(),'TXT'); txt_str=cmp(txt,'',''''strcat('TXT: 'human_readable(txt), ' | ')); out=strcat(outtxt_str); 
xps=select(formats_sizes(),'XPS'); xps_str=cmp(xps,'',''''strcat('XPS: 'human_readable(xps), ' | ')); out=strcat(outxps_str); 
zero=select(formats_sizes(),'ZERO'); zero_str=cmp(zero,'',''''strcat('ZERO: 'human_readable(zero), ' | ')); out=strcat(outzero_str); 
zip=select(formats_sizes(),'ZIP'); zip_str=cmp(zip,'',''''strcat('ZIP: 'human_readable(zip), ' | ')); out=strcat(outzip_str); 
out 
Hi,

I'm using the above composite to display human readable format sizes and this looks fine on Book Details but I wanted to prevent the trailing pipe showing when there's only one format available, so instead of...

💾 EPUB: 1.2 MB |

the ideal output would be:

💾 EPUB: 1.2 MB

Ideas?
Attached Thumbnails
Click image for larger version

Name:	MWSnap 2025-01-22, 13_34_11.jpg
Views:	568
Size:	335.1 KB
ID:	213226  

Last edited by Comfy.n; 01-22-2025 at 11:43 AM.
Comfy.n is offline   Reply With Quote