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

Piping curl into a pager

Name: Anonymous 2018-02-26 9:33

E.g.
$ curl www.google.com | sed '/<[^>]*>/d' | less

Could this be used as the basis for a text-based browser? Curl has POST and cookies support too, and Guile Scheme could be used instead of javascript.

Name: Anonymous 2018-02-26 12:05

It's a start, but everything would be either on one line or would have ridiculous white-space due to how it was created.

Name: Anonymous 2018-02-26 12:35

>>2
Easy, just insert a linefeed every 80 characters.

Name: Anonymous 2018-02-27 3:04

>>3
Sure, but that doesn't fix the other presentation problems.

Name: Anonymous 2018-02-27 3:04

But I guess since you said ``as the basis,'' it's different.

Name: Anonymous 2018-02-27 8:13

But nobody uses scheme on the web, what would the point be?

Name: Anonymous 2018-02-27 8:16

Improved: $ wget -q -O - https://dis.tinychan.org/prog/ | sed '/<[^>]*>/d' | less

Name: Anonymous 2018-02-27 8:18

	    	


1: Piping curl into a pager (7)
2: Code Thread (22)
3: Perl6 'fun' (9)
4: Nikita (47)
5: Is Computer Science the most redpilled field? (11)
6: CloverOS GNU/Linux (68)
7: Small /proggles/ girl (58)
8: Donald Knuth appreciation thread (14)
9: Touhou Cirno Radio / chiru.no (229)
10: The Big Bang Theory (8)
11: /prog/ Challenge 63: House of Annus (33)
12: Hey (28)
13: 3D modeling (7)
14: Prog chaleng (6)
15: Provably undecidable problems (10)
16: Being Stalked by Filthy Gypsy (22)
17: Linux Users are Rude Thieves (122)
18: the state of web development (8)
19: funny memes (47)
20: No ANIME please (12)
21: Where did our people go? (39)
22: ATTN whoever got our company IP banned from tinychan (7)
23: Simple way to ensure null-safety (3)
24: /prog/ Challenge: HP Bar (11)
25: /prog/ API (9)
26: hax my aniii (4)
27: the fallacies of being cummed inside (4)
28: best programming language for EDC? (4)
29: ive decided i like free and open source software (39)
30: Object Oriented Nonsense (21)
31: Security protocols (8)
32: Consider this (10)
33: Banned for Nothing (49)
34: /prog/ Challenge: RFC 6503 (25)
35: Is this the house of spastics? (7)
36: Symta Brevity (8)
37: so Twitter mass banned &quot;russian bots&quot; (3)
38: /prog/ Challenge: JPEG9001 (15)
39: /prog/ Challenge: Micro$oft Excel 2018 (23)
40: Why is ios so good? (27)




Name:
Name:
Name:
Name:

Don't change these.





Name:
Name:
Name:
Name:

Don't change these.




Name:
Name:
Name:
Name:

Don't change these.




Name:
Name:
Name:
Name:

Don't change these.




Name:
Name:
Name:
Name:

Don't change these.





Name:
Name:
Name:
Name:

Don't change these.





Name:
Name:
Name:
Name:

Don't change these.




Name:
Name:
Name:
Name:

Don't change these.





Name:
Name:
Name:
Name:

Don't change these.




Name:
Name:
Name:
Name:

Don't change these.


Don't change these.

Name: Anonymous 2018-02-27 9:02

>>8
Seems good.

Name: Anonymous 2018-02-27 9:14

>>9
Seems useless.

Name: Anonymous 2018-02-27 9:24

>>10
It has all the most important, functionality, poasting on \prog\ is worthless anyway.

Name: Anonymous 2018-02-27 11:08

if you can't follow links, your're are missing an essential feature of hypertext. even cudderbrowser has more functionality than this

Name: Anonymous 2018-02-27 11:14

>>12
it's the basis for a browser
this isn't a complete ENTERPRISE browsing solution

Name: Anonymous 2018-02-27 11:50

>>13
downloading and paginating text is not the same as browsing

Name: Anonymous 2018-02-27 13:32

>>14
It's pretty close tho

Name: Anonymous 2018-02-27 13:35

>>15
uncorrect

Name: Anonymous 2018-02-27 14:26

>>12,13
Next in plan is creating a 'lshttp' script (similar to ls) for listing all linked hyperlinks inside a given web page.
Something like
#!/bin/bash
curl $1 | sed '/<\s*a \s*href\s*=\s*"([^"])"/gi!d'

(Haven't tested yet.)

Name: Anonymous 2018-02-27 14:35

>>17
this is going to be the worst, least convenient way to browse the internet

Name: Anonymous 2018-02-27 15:07

>>17
Lol'd

Name: Anonymous 2018-02-27 15:50

>>18
your thinking on w3m-mode

Name: Anonymous 2018-02-27 18:06

>>1,8
Try
#!/bin/bash
curl -s $1 | sed 's/<[^>]*>//g' | less

Name: Anonymous 2018-02-27 18:08

>>17
you can't parse html with regex, don't be dumb

Name: Anonymous 2018-02-27 19:04

>>22
It's not about parsing, but about extracting the information I want, in this case, the list of links contained in the page.

Name: Anonymous 2018-02-27 19:24

>>22
my favorite stackmeme HE COMES haha :)

Name: Anonymous 2018-02-27 21:29

>>24
faggot

Name: Anonymous 2018-02-27 22:20

>>21
Curl is against my religion, I refuse to use it. I also feel offended that you use #!/bin/bash instead of #!/bin/sh.

Name: Anonymous 2018-02-27 23:04

>>26
Then substitute it for the world wide web application of your choice.
I also feel offended that you use #!/bin/bash instead of #!/bin/sh.
To be honest, I've started learning shell script recently, and haven't yet gathered enough experience to develop any sense of elitism between shells.

Name: Anonymous 2018-02-28 8:03

>>27
it's not about elitism, it's about portability. if your script works with #!/bin/sh, it will work with other Bourne-compatible shells (ash, dash, bash, probably ksh and zsh too but I'm not an expert on those)

Name: Anonymous 2018-02-28 9:09

>>28
Nobody cares. 99% of people use
bash
anyway.

Name: Anonymous 2018-02-28 9:11

>>29
I don't
guess I'm special

Name: Anonymous 2018-02-28 9:21

>>23
First of all, you meant /<\s*a \s*href\s*=\s*"([^"]*)"/
second, that won't work if the tag has any other attribute before href. So it only works for basic html.

>>24
?

Name: Anonymous 2018-02-28 9:45

>>30
Yes, you are. Are you using a meme OS like CloverOS or Plan 9?

Name: Anonymous 2018-02-28 10:46

>>32
I used to use 9front, but no

Name: Anonymous 2018-02-28 13:22

>>31
/<\s*a.*?\s*href\s*=\s*"([^"]*)"/g

Name: Anonymous 2018-02-28 13:24

:;'"``,, -=_+_=-+_=-==?<>cjkfdhsdl;d;'\;'';/.klhu[pld]we0=r-0[[pi4[pwo]wepe[]pe]repe[]pwe][wepwe[okdklk=[]]-\!!2@]]\]\[][]

Name: Anonymous 2018-02-28 13:34

>>35
What syntax language is this?

Name: Anonymous 2018-02-28 13:36

>>36
VALID

Name: Anonymous 2018-02-28 13:38

>>37
PERL

Name: Anonymous 2018-03-01 1:08

>>28
Makes sense. I'll start testing it with sh to check if it is portable.
>>18
I'll pipe that output into something else later, but it is useful to have that as a separate tool.

Name: Anonymous 2018-03-01 2:37

surfraw

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