Giter VIP home page Giter VIP logo

node-timelord's Introduction

node-timelord

NodeJS implementation of Timelord

How to run

See the wiki for info about the deployment on URY.

Docker

docker compose up --build

Will build the docker image

docker compose up -d

Can then be used to run the container in the background, by default using port 8000

Development

$ git clone https://github.com/UniversityRadioYork/node-timelord/
$ cd node-timelord
$ npm install # you should only need to run this once
$ grunt
# browse to localhost:8000 to see it
# any changes to files in `src/` will be compiled and the browser will automatically reload 

Production

Deployment on URY is handled by Jenkins. Use the node-timelord and node-timelord-staging jobs to deploy the master branch. See the wiki for more about deployment on URY.

Manual instructions

You will need some kind of way of serving static files from the /bin folder. I.E. Apache, Nginx etc.

$ git clone https://github.com/UniversityRadioYork/node-timelord/
$ cd node-timelord
$ npm install # you should only need to run this once
$ grunt build #will compile all files needed into /bin/

If you want to do a development build without clearing out /bin then run grunt build:noclean instead.

Dependencies

http://expressjs.com

Global Dependencies

Dev Dependencies

Use npm install --dev to get the following for deployment:

  • flightplan: A library for streamlining application deployment or systems administration tasks

License

ISC

Generated by package-json-to-readme

node-timelord's People

Contributors

mstratford avatar christhebaron avatar brookke avatar dincahill avatar lordaro avatar michael-grace avatar danzibob avatar joseph-s12 avatar keeeeeeeen avatar markspolakovs avatar hicks927 avatar

Stargazers

 avatar

Watchers

Matt Windsor avatar James Cloos avatar  avatar Anthony W avatar  avatar

Forkers

dincahill

node-timelord's Issues

Cannot call news feed endpoint for breaking news messages

GET /api/v2/news/latestnewsitem/3?api_key=9C4KCqywpDfzIk7OEhYO3tOjDJWftg2sZ65fKT5fTGCWvshnz5tinVt1MiqvETM4eZYDtQbRs13GoTCNB8HTsmQQlcDwFmRo8Xw3uHQoycYkumyTVGdXbxtt1S2Ow7RFbK HTTP/1.1
Host: ury.org.uk
Connection: keep-alive
Accept: /
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5
Referer: https://ury.org.uk/timelord/
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,nb;q=0.4
Cookie: wikis_session=o6q1qg4s70o9u0tnht1p6o9p05; PHPSESSID=n3cis049k35f0u494ta5sfvb26

HTTP/1.1 403 Unauthorized
Server: nginx
Date: Mon, 09 Nov 2015 16:30:16 GMT
Content-Type: application/json; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Encoding: gzip

autonews fun

anyone feel up for playing with enough api calls such that if you're doing a webstudio show, but are doing neewwwssss yourself, it shouldn't say "autoneeeewwwwwsssss is on air". lol, have fun

Bottom bar not rendering correctly on studio monitors

[1:32 PM] Sam Willcocks: Timelord looked good, only slightly odd thing is that the bottom bar labels seem to not be rendering quite right

[1:32 PM] Sam Willcocks: they weren’t h/v centered, but fonts are loading fine now

[1:32 PM] Sam Willcocks: And uzbl should be pretty up to date webkit so not sure what’s going on there

API Error Handling (I Guess)

timelord (well everything, but timelord is part of everything) gets its information from myradio, and if myradio is down, timelord doesn't know what to do, and gives up, but still likes to tell you what time it is. we should sort that

Song should be Track

Slight pedantry, but the rest of URY uses 'track' as the generic noun for "thing from the central database or library currently being played", since it's more generic (for e.g. you don't usually call pieces of classical music "songs"). So the internal names in here should be renamed in the interests of standardisation.

Add countdown and ups

It's been mentioned before, but I thought I would add it here.

Some of the code already exists from the 101 countdown and up but it needs tidying up.

@ChrisTheBaron suggested we have a sidebar with the timers and labels, configurable via the current config file.

Private repo?

Why's this repo private? What needs to be done to make it public?

Current/Next shows are coming up with demos

Should this be happening?

GET /api/v2/timeslot/currentandnext/?n=2&filter%5B%5D=1&filter%5B%5D=2&api_key=9C4KCqywpDfzIk7OEhYO3tOjDJWftg2sZ65fKT5fTGCWvshnz5tinVt1MiqvETM4eZYDtQbRs13GoTCNB8HTsmQQlcDwFmRo8Xw3uHQoycYkumyTVGdXbxtt1S2Ow7RFbK HTTP/1.1
Host: ury.org.uk
Connection: keep-alive
Accept: /
Origin: http://ury.org.uk
User-Agent: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36
Referer: http://ury.org.uk/timelord/
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6,nb;q=0.4

{"status":"OK","payload":{"current":{"title":"Morning Glory","desc":"\n

Wake up with Morning Glory for the sweet music that gets you up in the early hours to make your coming day count. </p></body></html>\n","photo":"/static/img/default_show_player.png","start_time":1447228800,"end_time":1447232400,"presenters":"Marco Bolt","url":"/schedule/shows/timeslots/137263","id":137263},"next":[{"title":"URY Demo","desc":"A URY demo slot.","photo":"/static/img/default_show_player.png","start_time":1447232400,"end_time":1447236000,"presenters":"","url":"/schedule/shows/timeslots/137255","id":137255},{"title":"URY Demo","desc":"A URY demo slot.","photo":"/static/img/default_show_player.png","start_time":1447236000,"end_time":1447239600,"presenters":"","url":"/schedule/shows/timeslots/137256","id":137256}]},"time":"0.050162"}

image

Timelord doesn't like end of term

It breaks when /timeslot/currentandnext/ returns something like:

{
   "status":"OK",
   "payload":{
      "current":{
         "title":"Cool Britannia",
         "desc":"...",
         "photo":"\/static\/img\/default_show_player.png",
         "start_time":1480892400,
         "end_time":1480896000,
         "presenters":"...",
         "url":"\/schedule\/shows\/timeslots\/139856",
         "id":139856
      },
      "next":{
         "title":"URY Jukebox",
         "desc":"Non-stop Music",
         "photo":"\/media\/image_meta\/ShowImageMetadata\/22.png",
         "start_time":1480896000,
         "end_time":"The End of Time"
      }
   },
   "time":"0.049179"
}

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.