Giter Club home page Giter Club logo

Comments (3)

jhilden avatar jhilden commented on July 21, 2024

I have build a Rails app to export Hamster data to the third party online service Freckle using their API: https://github.com/jhilden/frecklinghamster

Maybe this can be useful for somebody. I would certainly be interested in feedback.

from hamster.

tstriker avatar tstriker commented on July 21, 2024

Awesome and i'm sure it will be useful!

Haven't really worked with ruby projects i was surprised about the sheer amount of files in the project (and the empty dirs - wonder if you can get rid of those or if that's a hardwired demand from the framework)

If i can suggest - you might be better off consuming the d-bus API instead of going straight to the sqlite file.
The dbus bits are less scary than one might think and the hamster service, if installed, will be started on demand by dbus to answer those queries.

The benefits are that you don't break logic (for example - hamster day - we start days by default at 5am and task is considered to belong to the day it has the largest part in), don't have to worry about changes in db structures and file location and can make use of search interface and other bits. If you are concerned where would you store the info added by freckle - you could combine in another sql lite database for this meta information.
The API is fully used by hamster itself (the backend is fully separated from frontend). Here are the implementations:

There is also bit of javascript wrapping but that hasn't been isolated cleanly just yet (https://github.com/projecthamster/shell-extension)

As for the export part - it looks like freckle is using consolidated form of reporting (exactly what we need) - in such case why not have a simple set of categories one would want export and instead keeping track of each individual record, and export the whole day at once, allowing exporting several times by overwriting (if the API permits - i couldn't see the list of endpoints in their docu - http://developer.letsfreckle.com/)

Very nice job, thank you! :)

from hamster.

jhilden avatar jhilden commented on July 21, 2024

Thanks a lot for the detailed feedback.

The general problem is, that I'm a 100% web developer and those are just the tools that I'm most familiar with. Rails is certainly not really a great fit, but it worked for me. And I don't really see myself looking into d-bus, even though it would make a lot of sense from an architecture perspective.

Concerning the exporting. This manual step in the end fits my personal process pretty well, since it usually also involves some reviewing of the work week. Don't know how other people feel about it.

They are just overhauling the Freckle API documentation, so I think there is currently some information about endpoints missing.

from hamster.

Related Issues (20)

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.