Giter VIP home page Giter VIP logo

agendra's Introduction

Agendra: What I'm going to do today Code Climate

This is a simple web app that I use to remind myself what I mean to do today. I don't expect it to be useful to anyone else, because it's tailored to my own specific journal format. But hey, maybe you're looking for an example of a simple functional application that uses Node and Express (for web stuff), Mocha and Zombie (for headless browser testing), Dropbox (for storage), and Babel (for ECMAScript 6 and 7 language features). It's your lucky day!

Background (i.e., why?)

I keep a nightly journal in Markdown format, and I store it in Dropbox so it's available on all my devices. At some point I started including a "What about tomorrow?" section to help me plan, which was nice, except that sometimes it just meant that at the end of the next day I looked at it and thought, "Ohhhh, that's what I was supposed to do today!"

"Wouldn't it be better," I thought, "if that little agenda was the first thing I saw when I looked at my phone or tablet in the morning?" There are lots of dedicated apps that are all about daily planning, but what I wanted was something that would help me out without making me change my habits at all. I've got a journaling practice that works for the first time in my life, and I don't want to mess with it. And besides, I'm a professional web application developer; how hard could it be?

The plan I came up with: Build a simple web app that pulls the agenda section out of my latest journal entry and renders it as HTML, and use Meta Widget to display it on my Android home screen.

Setup

If, for whatever reason, you want to try this out for yourself:

  1. Have a journal. Store the journal in a Dropbox folder, in Markdown format, in files named YYYY-MM-DD.md. In each file, have a first-level header with the word "tomorrow" in it, followed by a bullet list of things to do. If anyone ever asks, I'll put up an example.
  2. Be a Dropbox developer. This app relies mostly on security through obscurity: I use my Dropbox key to get access to my Dropbox account, and host the app somewhere I haven't told you about. You'll need to do that too. Create a Core API app, authorized to access text files in all folders, and generate your own access token in the App Console.
  3. Clone this repository.
  4. Configure your repo using dotenv. First copy the file .env.example to .env, then edit .env to insert your own access token and the path to your journal folder (relative to the Dropbox root).
  5. Have Node.js. (On OS X, brew install node.)
  6. Install node packages: npm install
  7. Try it out, I guess? npm start and then go to http://localhost:3000/.
  8. Put it on Heroku or somewhere. Use environment variables in your hosting environment (e.g., heroku config:set) to do the configuration found in .env.

Development?

If you want to do anything with this code, go ahead; it's available under the free and open ISC license.

I recommend ESLint; the repo has a configuration file that should work.

The tests run against a live Dropbox folder. I use one Dropbox app for development and "production," and a separate one for testing. (The testing app only has access to its own folder.) If you want to do this too, put your test configuration in .env.test. Settings in .env.test override .env when testing.

The tests expect that Dropbox folder to contain some specific files. Again, if anyone ever asks, I'll make a version of those files available.

agendra's People

Contributors

eostrom avatar

Stargazers

 avatar

Watchers

 avatar  avatar

agendra's Issues

only show top-level agenda items

Meta Widget is capable of displaying list items as a list, but otherwise loses all HTML formatting, which means nested lists look terrible. If we render only the top-level elements of the agenda list, we'll lose a little information, but it'll be a lot more readable.

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.