Comments (5)
Oh, yes. The dates are directly from the noticeboard itself. The reason I didn't add a time
field to the database was that:
- The time formats are inconsistent between the noticeboards.
- One of the noticeboards (http://www.iitkgp.ac.in/for-students) has no timestamp.
We could add timestamps based on the time at which the new notice was found by the scraper, but then we'd have to handle all the older notices separately. And using the one included in the notice would mean we'd have to handle the 'no timestamp' noticeboards separately. Both of which, in my opinion, aren't high priority problems.
Besides, the API currently returns the notices in latest-first fashion (latest as defined by higher position in the original noticeboard), which seems consistent enough to me.
Is there any case that I might be missing which would be worth going through all this trouble to get the order right?
from dashboard.
Also, I think this issue would make more sense in the API repository: https://github.com/metakgp/veritas
(As a side note, the scraper code lives here: https://github.com/metakgp/hermes. The reason for this separation is explained in the README.)
from dashboard.
So right now the notices are persisted in redux, and new notices are fetched when tabs are switched (so that we always have fresh notices) and merged with existing list of notices. After merging, it would be good to sort the notices again so that new ones are at the top. We can probably do this with _id field (mongodb _id is just a timestamp of document creation) but maybe you can figure out something better
from dashboard.
Oh, I see. Yep. That makes sense! Good suggestion.
I am indeed using the _id
fields to fetch the latest notices. I'll return that as well in the GET request.
from dashboard.
Actually, the API is indeed already returning this. My bad!
from dashboard.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dashboard.