User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » new tool thing: ncsu class data fetcher Page [1] 2, Next  
evan
All American
27701 Posts
user info
edit post

ever needed to access ncsu class data but didn't have a good way of doing so?

well here you go!

http://e00.us/ncsu/courses.php

arguments:
d - department (from here) (required)
f - format: either "json" or "php", php is default and outputs a print_r, json outputs json data (duh)

example:
http://e00.us/ncsu/courses.php?d=BCH
http://e00.us/ncsu/courses.php?f=json&d=BCH

i'll add more features and sorting and whatnot later, i just coded this for a personal project and thought someone else might be able to use it

lemme know if you have comments/suggestions/bitching

12/4/2008 8:44:18 PM

DeltaBeta
All American
9417 Posts
user info
edit post

It doesn't work.

12/4/2008 8:45:20 PM

OmarBadu
zidik
25071 Posts
user info
edit post

Quote :
"insert crap data "


really? you consider this useful?

V are we playing jeopardy - "what are things evan has started that never panned out and ultimately failed?"

12/4/2008 8:45:24 PM

legatic
All American
7481 Posts
user info
edit post

EMS/EUPHALO/TWW RADIO/TWW PICTURE HOSTING/THIS

12/4/2008 8:45:42 PM

EMCE
balls deep
89773 Posts
user info
edit post

this offends me, will you take this site down?

12/4/2008 8:45:43 PM

evan
All American
27701 Posts
user info
edit post

yes, i consider json data to be very useful

^^^how has this failed

why is it that whenever i try to be nice and share something, everyone bitches

12/4/2008 8:45:58 PM

joe17669
All American
22728 Posts
user info
edit post

JaSON?

12/4/2008 8:46:49 PM

Sweden
All American
12295 Posts
user info
edit post

jaZon?

12/4/2008 8:47:16 PM

qntmfred
retired
40728 Posts
user info
edit post

i guess i should fix school tool next

12/4/2008 8:48:06 PM

evan
All American
27701 Posts
user info
edit post

why next?

12/4/2008 8:49:01 PM

Sweden
All American
12295 Posts
user info
edit post

message_topic.aspx?topic=544751

12/4/2008 8:50:06 PM

qntmfred
retired
40728 Posts
user info
edit post

cus it's one of the biggest broken things on here

i was gonna do it in the summer but i forgot

12/4/2008 8:50:23 PM

PaulISdead
All American
8781 Posts
user info
edit post

fail

12/4/2008 8:50:42 PM

evan
All American
27701 Posts
user info
edit post

what is wrong with you people

can i not do anything to help anyone at all? god damn.

12/4/2008 8:51:22 PM

qntmfred
retired
40728 Posts
user info
edit post

i think if you dropped a UI on this thing it might have potential

12/4/2008 8:54:35 PM

Aficionado
Suspended
22518 Posts
user info
edit post

ding ding ding

12/4/2008 8:55:37 PM

evan
All American
27701 Posts
user info
edit post

i figured as much.. if i have time, i might throw a simple UI on it

i didn't need it to have a UI though and that was never my intention, so i didn't give it one... i'm using it to provide data for a better version of xtracs, and json is perfect for inter-application transfer

i figured json data was much more flexible; people can do whatever they'd like with the data as opposed to being locked down to a gui

12/4/2008 8:56:18 PM

OmarBadu
zidik
25071 Posts
user info
edit post

Quote :
"what is wrong with you people

can i not do anything to help anyone at all? god damn."


Quote :
"i think if you dropped a UI on this thing it might have potential"



no way - people love just looking at plain text and parsing through it - clearly

12/4/2008 8:56:35 PM

wdprice3
BinaryBuffonary
45912 Posts
user info
edit post

I don't get it. Looks like it could be useful, but a page full of garbled text is hard to read


Quote :
"INTRO TO BAE METH"


BAE has an intro into meth?1?!?!?!

[Edited on December 4, 2008 at 8:58 PM. Reason : .]

12/4/2008 8:57:13 PM

joe17669
All American
22728 Posts
user info
edit post

how many non-programming people have ever heard of json? i had to google it.

[Edited on December 4, 2008 at 8:59 PM. Reason : also i tried ece and it didn't work]

12/4/2008 8:57:50 PM

catalyst
All American
8704 Posts
user info
edit post

what exactly am i looking at here

12/4/2008 8:58:37 PM

wdprice3
BinaryBuffonary
45912 Posts
user info
edit post

I, have not.

12/4/2008 8:58:45 PM

evan
All American
27701 Posts
user info
edit post

Quote :
"no way - people love just looking at plain text and parsing through it - clearly"


if you would read my post, you'd see that it was never my intention for this to be parsed by a human
that's the whole reason it outputs json data...

Quote :
"I don't get it. Looks like it could be useful, but a page full of garbled text is hard to read "


that's because you aren't supposed to read it

Quote :
"how many non-programming people have ever heard of json? i had to google it."


it's a pretty standard specification... and it's just the notation that javascript uses for arrays. if you've used javascript at all, the notation should be familiar.

Quote :
"also i tried ece and it didn't work"


thanks, that's the type of feedback i was looking for - i'll take a look and see why that's happening.

12/4/2008 8:59:07 PM

wdprice3
BinaryBuffonary
45912 Posts
user info
edit post

WELL I DON'T KNOW JASON, SO HOW AM I SUPPOSED TO KNOW WHAT HE DOES?

12/4/2008 8:59:59 PM

qntmfred
retired
40728 Posts
user info
edit post

that's fine if that's what your intention is, but clearly you can't expect most people to see any value in that. not to hate on your efforts, but you know nobody on here would find this useful (in its current state)

12/4/2008 9:00:20 PM

evan
All American
27701 Posts
user info
edit post

^i knew it would have a limited audience, but i don't think that *no* one has a use for it

12/4/2008 9:01:09 PM

Stein
All American
19842 Posts
user info
edit post

ahem

http://www.wolftech.ncsu.edu/tracster

[Edited on December 4, 2008 at 9:03 PM. Reason : it reads actual, useful XML in to boot!]

12/4/2008 9:01:56 PM

qntmfred
retired
40728 Posts
user info
edit post

^ WHAT'S WRONG WITH YOU I CAN'T LOG IN TO THAT

12/4/2008 9:02:34 PM

evan
All American
27701 Posts
user info
edit post

wow, i didn't even know that existed

it has potential, but that's a god-awful UI

12/4/2008 9:02:50 PM

qntmfred
retired
40728 Posts
user info
edit post

Quote :
"but that's a god-awful UI"


ahem...


12/4/2008 9:03:23 PM

wdprice3
BinaryBuffonary
45912 Posts
user info
edit post

^,^^

12/4/2008 9:03:51 PM

OmarBadu
zidik
25071 Posts
user info
edit post

Quote :
"but that's a god-awful UI"


ahem...


12/4/2008 9:03:57 PM

evan
All American
27701 Posts
user info
edit post

:carlface:

THIS WAS NEVER INTENDED TO EVEN HAVE A UI
it was for use as a datasource

how many times do i have to say that

12/4/2008 9:04:04 PM

Stein
All American
19842 Posts
user info
edit post

ALL THE FANCY JAVASCRIPT STUFF OF NOW DIDN'T EXIST THEN

PLUS THEY MADE ME FIT IT IN LIKE A 600 PIXEL WIDE BOX

MIGHT AS WELL JUST SHOOT A GUY IN THE FACE; I JUST DO FUNCTIONALITY

12/4/2008 9:04:43 PM

Jen
All American
10527 Posts
user info
edit post

hey evan, can you give a a "how and why to use this for dummies" brief? I just have no clue what im looking at

12/4/2008 9:04:54 PM

wdprice3
BinaryBuffonary
45912 Posts
user info
edit post

so where's the UI?

12/4/2008 9:06:04 PM

Stein
All American
19842 Posts
user info
edit post

The idea is that other things can use the data to do something useful with it.

The problem is that JavaScript is going to go OH SHIT CROSS SITE-SCRIPTING and bitch.

(I mean, granted there are ways around it, but still)

12/4/2008 9:06:44 PM

evan
All American
27701 Posts
user info
edit post

Quote :
"hey evan, can you give a a "how and why to use this for dummies" brief? I just have no clue what im looking at "


thanks for asking nicely Jen, you're the first person to do so

the only thing this is really good for (in it's present state) is use as a datasource to another application
say you wrote an application that figured out what the best schedule was for a person based on what classes they needed

you could use this to grab the data on all the classes instead of parsing it yourself



i wrote it because i'm writing something sort of like that tracster thing above, except it will automatically figure out the best schedule for you based on the criteria you select... mainly for me, but if it works well enough i'll share it with everyone else

Quote :
"The problem is that JavaScript is going to go OH SHIT CROSS SITE-SCRIPTING and bitch."


yeah, i know but you can just put a proxy script on your server that CURLs the url and spits the json data back out

12/4/2008 9:07:44 PM

evan
All American
27701 Posts
user info
edit post

joe#s: what didn't work about ECE? it's working fine for me...

12/4/2008 9:09:30 PM

Stein
All American
19842 Posts
user info
edit post

Quote :
"i wrote it because i'm writing something sort of like that tracster thing above, except it will automatically figure out the best schedule for you based on the criteria you select... mainly for me, but if it works well enough i'll share it with everyone else"


You know, about once every six months I get an e-mail from someone who wants to do just this and I go "hey, go for it. Tracster's not something I have time to work on anymore, but I'd love to improve/see improved" and nothing ever comes of it

12/4/2008 9:12:56 PM

evan
All American
27701 Posts
user info
edit post

heh

this is just a hobby, i was bored at work today waiting on some builds to finish compiling and made this

where are you getting your class data from? are you parsing the R&R html output like i am?

12/4/2008 9:15:49 PM

Stein
All American
19842 Posts
user info
edit post

No, I have a direct feed from R&R.

I work for the university, mang.

12/4/2008 9:19:11 PM

Ernie
All American
45943 Posts
user info
edit post

XTRACS IN THE HOUSE

12/4/2008 9:21:14 PM

KE4ZNR
All American
2695 Posts
user info
edit post

How's about you write a program that makes it easier for me to listen to 6 or 7 radios at once?

12/4/2008 9:25:20 PM

evan
All American
27701 Posts
user info
edit post

Quote :
"No, I have a direct feed from R&R.

I work for the university, mang."


lemme get dat hookup yo
that would make this much easier, haha

12/4/2008 9:28:18 PM

qntmfred
retired
40728 Posts
user info
edit post

shit man, you got it easy as it is

when i worked at packbackers, we had to type every course catalog into our system. took 2 guys every day for a week to type in just the undergrad classes

after a couple semesters of that, i did what you did, parsed the R&R pages, wrote some javascript to automate our telnet console at work, and import the entire thing in under an hour. did the same thing for 20 other universities and made some $texas

12/4/2008 9:33:14 PM

evan
All American
27701 Posts
user info
edit post

tr00f

regular expressions are your friend

12/4/2008 9:35:06 PM

qntmfred
retired
40728 Posts
user info
edit post

they are also the devil. is there a getElementsByTagName() type of html parsing library for php? i've looked in the past but it's been a while

12/4/2008 9:39:22 PM

evan
All American
27701 Posts
user info
edit post

not that i know of - i know there's a DOM object, but i'm not exactly sure what it does - read up: http://us3.php.net/DOM

edit: yep.
# DOMDocument::getElementById — Searches for an element with a certain id
# DOMDocument::getElementsByTagName — Searches for all elements with given tag name
# DOMDocument::getElementsByTagNameNS — Searches for all elements with given tag name in specified namespace


i just use regular expressions because i've used them so much over the years

they're hard to learn, but soooo powerful

[cue XKCD comic] (my boss actually bought me the shirt they made of it, haha)

12/4/2008 9:41:05 PM

qntmfred
retired
40728 Posts
user info
edit post

hmmm. i remember playing with that once back in the day, i don't recall it being that easy then. looks good though, will def try it next time

12/4/2008 9:43:52 PM

 Message Boards » Chit Chat » new tool thing: ncsu class data fetcher Page [1] 2, Next  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.