Coder Social home page Coder Social logo

evanthegrayt / standup_md Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 623 KB

๐Ÿ‘จโ€โš•๏ธ Standup Doctor: An automated and customizable way to keep track of daily standups in markdown files.

License: MIT License

Ruby 97.82% HTML 2.18%
standup standup-meetings productivity markdown cli api ruby-gem gem command-line-tool

standup_md's Introduction

standup_md's People

Contributors

evanthegrayt avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jimkil

standup_md's Issues

Add more options to executable

  • -e to prevent adding a new entry for today if it doesn't already exist.
  • -t to add tomorrow's entry
  • -n to write the file, but don't open it in the editor.

Make Entry class

Make an Entry class and split out all the hash/entry stuff into objects that can be manipulated.
This will make it easier to edit old entries if necessary. Methods the class should have:

  • to_md return the entry as Markdown
  • to_json return the entry as JSON
  • header and all things to do with formatting

Preserve subtasks

I think this one will be tricky, but if you have subtasks, they are stripped of leading whitespace, so they're lost.

Example:

- Task 1
  - Subtask 1

In the above example, the leading whitespace from Subtask 1 would be lost.

Allow headings to not be markdown headings

Because Slack (bafflingly) doesn't use real markdown, I've noticed some of my coworkers use asterisks for headers (like*Current*) so the header will actually be bold in the Slack UI. I don't like this, because it's not markdown headers, but I understand the need for it.

the real fix would be for Slack to implement markdown but I've given up hope on that

Ability to change sub-header order

Allow the user to set an array that will specify the preferred order of sub-headers. Default will be

    @sub_header_order = [:previous, :current, :impediment, :notes]

Changes to headers

Add another two attributes. Instead of header formats including the #, have header_depth=(integer) and sub_header_depth=(integer). The number (1..6) will determine how many octothorps will preface the header. Keeping them separate will assist when we do #9, as we won't want the octothorps in our headers.

New month's file contains last month's entries

Entries are being carried over to new month's files. Today is May 1st, and while it did create the new file, it still printed all of April's entries in May's file.

# 2020-05-01
## Previous
- TDC: [Admin routes](https://gitlab.com/publicstrategies/tdc/-/issues/59)
- TDC: [Email sign-up and contact us](https://gitlab.com/publicstrategies/tdc/-/issues/56)
## Today
- project: [task](link)
## Impediments
- None

# 2020-04-30
## Previous
- TDC: [Install and evaluate CKEditor](https://gitlab.com/publicstrategies/tdc/-/merge_requests/35)
- TDC: [Admin routes](https://gitlab.com/publicstrategies/tdc/-/issues/59)
## Today
- TDC: [Admin routes](https://gitlab.com/publicstrategies/tdc/-/issues/59)
- TDC: [Email sign-up and contact us](https://gitlab.com/publicstrategies/tdc/-/issues/56)
## Impediments
- None

<!-- rest of april's entry below -->

Make entries searchable

Add a way to search entries. This would mean it would have to know how to find entries in their associated file if the user specified an entry that's from a different month.

april_6th = Standup.entry('2020-04-06') # Also maybe accept a `Date` object

Also make files searchable.

april = Standup.entries('2020_04.md") # Also maybe accept a `Date` object

All entries for March will be returned. Make the file string honor file_name_format.

Finish and fix tests

There are a few TODOs in the test suite. These need to be fixed, and also, StandupMD#reload! isn't working as expected. This should also be fixed.

Fix readme

Github pages and rdoc can't support tables, apparently....

Add zsh completion

The following doesn't work, as the output isn't 100% _gnu_generic compatible.

# Put in ~/.zshrc
compdef _gnu_generic standup

Write a custom completion function.

By the way, until this is ready, using the above method mostly woks, so it can be used in the meantime.

Find better way to organize config file

Because we let the user set editor via the config file, but the StandupMP class doesn't use editor and loads the config file.

We should probably add a cli sub-section to the YAML. Something like:

current_header: Today

cli:
   editor: vim

All previous entries changes

Change #all_previous_entries from array into a hash. #to_json can then be called on it. Structure should be:

{
  "2020-04-20": {
    "previous": ["task 1", "task 2"],
    "today": ["task3"],
    "impediments": ["None"]
  },
  "2020-04-19": {
    "previous": ["task 1", "task 2"],
    "today": ["task3"],
    "impediments": ["None"]
  }
}

This will be a pretty significant refactor, related to #13 and #15

Add way to convert files

Add way to change configurations for the whole pre-existing file. For example, if a file currently uses - (dash) for bullet_character, but they want to change it to *, call a method called #convert:

def convert(attribute, from, to)
  # rewrite the file with the attribute change from`from` to `to`
end

s = Standup.new
s.convert(:bullet_header, '-', '*')

Add section to readme about using existing files

The parser requires files to be formatted exactly in the way it expects. If a user has a previously existing file, but it's not in the right format, the parser will fail. Options will need to be set via config file before the executable is run. Add this to readme.

Print or find isn't working correctly

When calling standup -p DATE, only certain entries are found. From a little bit of testing, seems like the newest two from the file? More research is needed.

Add more verbose output

If a user is adding an entry from the command line, if they pass -v they should know it worked. This should be the same for all options.

Change behavior of header depth and sub header depth

It's annoying to change header_depth because it can't be greater than sub_header_depth, but header_depth starts at 1, and sub_header_depth starts at 2. To change it, header_depth, you first must change sub_header_depth or an exception is raised. Just automatically change the depths if they're too high or low.

Fix Entry#create's yield

This is wrong. Shouldn't yield config, but entry.

   def self.create
      entry = new(
        Date.today,
        config.current,
        config.previous,
        config.impediments,
        config.notes
      )
      yield config if block_given?
      entry
    end

Should be

   def self.create
      new(
        Date.today,
        config.current,
        config.previous,
        config.impediments,
        config.notes
      ).tap { |config| yield config if block_given? }
    end

Add different file formats

It'd be cool if this gem knew how to read/write yaml files. The only thing that would need to be added is new load/write methods.

This will actually help with another design problem I'm having. I want to add a to_md method at the entry level that will return the entry as an array of markdown lines. We already have to_json and to_h, at the entry level, so to_md would be nice. Then, when writing a file, we could just do

File.open(file, 'w') do |f|
  entry_list.each { |e| f.puts(e.to_md) }
end

The only thing I don't like about this, is I don't feel like the config for markdown should be in the Entry class. In other words, this feels wrong:

StandupMD.configure do |s|
  s.entry.header_depth = 2
  s.entry.bullet_character = '*'
end

BUT, if we have different parsers for YAML, Markdown, etc, then the config can live in those classes.

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.