Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

programming question

Name: Anonymous 2015-10-11 11:56

I asked this on /tech/ but nobody was able to respond. Can anyone here help?

How would you make a 'multimedia document' viewer from scratch in linux?

I know a fair bit of programming but I don't know how this would be done and I really want to do it.

I want to create something that can display a simple markup language (A bit like .md) that includes text, images, buttons and user input forms.

I know how to parse the language into an AST but then how do I lay it out graphically in such a way that users can select text out of it to copy and also resize the window.

Name: Anonymous 2015-10-11 12:06

>>1
/tech/

Suspicious face.jpg

Name: Anonymous 2015-10-11 12:23

Name: Anonymous 2015-10-11 12:27

Name: Anonymous 2015-10-11 12:33

here's the bookmarklet to make /prog/ into an imageboard. can upload using ipfs.pics

var all = document.getElementsByTagName("a"); for (var i = 0, x; x = all[i++];) { if(x['href'].substring(0,8) === 'ipfs:///' && x.parentElement.nodeName == 'SAMP') { var im = document.createElement("img"); im.setAttribute('src', 'http://ipfs.io/ipfs/'+x['href'].substring(8)); x.parentElement.replaceChild(im,x); } }

Name: Anonymous 2015-10-11 12:37

bookmark this: javascript:(function(){var all = document.getElementsByTagName("a"); for (var i = 0, x; x = all[i++];) { if(x['href'].substring(0,8) === 'ipfs:///' && x.parentElement.nodeName == 'SAMP') { var im = document.createElement("img"); im.setAttribute('src', 'http://ipfs.io/ipfs/'+x['href'].substring(8)); x.parentElement.replaceChild(im,x); } }})();

Name: Anonymous 2015-10-11 17:43

>>5,6
This requires multiple runs to get all images because all is modified by replaceChild, so all[i] already refers to the next image once it is substituted.
Either only increment i if the link is not an IPFS link, or just set inner HTML to the image.

Also it mangles itself because he board auto-links the string ipfs:///.

Name: Anonymous 2015-10-11 18:56

>>7
ohh thanks a lot javazcript is such a great language

Name: Anonymous 2015-10-12 8:13

>>1
Just use an existing renderer

Name: Anonymous 2015-10-12 12:30

I use cat.

Name: Anonymous 2015-10-12 21:13

>>10
I use dubz.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List