Giter Club home page Giter Club logo

evertils's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @aapis aka Ryan Priebe
  • I like databases, automation, macOS apps, privacy and NON-GENERATIVE chatbots
  • I work regularly with PHP and Swift, but have many years experience with Python, Ruby, various shell scripting languages, plus a wee bit of C#, Obj-C and C++.
  • Currently learning Swift/macOS APIs and ML.

evertils's People

Contributors

aapis avatar prieber-yp avatar

Stargazers

 avatar

Watchers

 avatar  avatar

evertils's Issues

Refactor architecture, more OOP-friendly

A lot of the functionality is implemented in helpers right now, should be changed so we're directly updating Evertils::Common::Entity model objects instead. Most classes do not follow single responsibility principle. Classes to refactor/remove:

  • Helper::Xml
  • Helper::ApiEnmlHandler
  • Controller::Log
  • Helper::EvernoteENML

Change namespace to Evertils

Currently it's Granify, i.e.

# now
module Granify
  class Utils
    @cache = Hash.new
    # ...

# desired
module Evertils
  class Utils
    @cache = Hash.new
    # ...

Controller (and other files) may require modification as well.

Support pre-populating content in YML note config

notebook: Standup
title: Standup For [%MONTH_NAME% %DAY% - %DOW_NAME%]
action: duplicate_previous
tags:
    - day-%DOY%
    - month-%MONTH%
    - week-%WEEK%
content: THIS IS A TITLE

OR

notebook: Standup
title: Standup For [%MONTH_NAME% %DAY% - %DOW_NAME%]
action: duplicate_previous
tags:
    - day-%DOY%
    - month-%MONTH%
    - week-%WEEK%
content: 
    - 
        label: Daily
        path: '%EVERTILS_CONF_TYPE_PATH%/daily.yml'

Template filenames should be capitalized

Noticed this while implementing evertils as a cron task, it failed while trying to load template daily.enml (expected Daily.enml). Thought this already handled the downcasing? Investigate.

Time spent calculation

It will always be an estimate unless you are very diligent about logging, but the app should attempt to calculate how much time was spent on a task. Perhaps a new command log-stats, or a modification of log-group.

Historical queries

Maybe this is a new controller (query SOMETHING for ex)? Allow you to say "get all rows that match this query term on THIS DAY or THIS WEEK or in THIS MONTH".

Log-at to log a message at a specific time

* 01:22 - 2223 - working on the callback
* 02:22 - 2223 - finished callback

Then..

$ evertils log at 02:11 'callback now receives args from caller'

Result

* 01:22 - 2223 - working on the callback
* 02:11 - 2223 - callback now receives args from caller
* 02:22 - 2223 - finished callback

Key feature is that the new row is auto sorted into the existing log items.

Get all logged messages by job number

New command to parse the EN/rolling logs and get all messages for the requested job number.

Could also sort (non-destructively) and give you all the jobs you worked on grouped together (and sorted by time).

CRON output

  1. Add flag --cron
  2. Output should be stripped.
  3. May require updating notifaction too?

Remove old code

Should be focused on generating notes from YML definition files going forward.

Log doesn't create the first time

Not the first time I've noticed this, but if you try to log something before going into the daily note and manually hitting "*-tab" under the Triage title, it errors out claiming the following.

โœ– undefined method `before' for nil:NilClass
/Users/prieber/.rvm/gems/ruby-2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/node_set.rb:55:in `before'
/Users/prieber/.rvm/gems/ruby-2.4.0/gems/evertils-0.3.21/lib/evertils/controllers/log.rb:39:in `modify'
/Users/prieber/.rvm/gems/ruby-2.4.0/gems/evertils-0.3.21/lib/evertils/controllers/log.rb:21:in `message'
/Users/prieber/.rvm/gems/ruby-2.4.0/gems/evertils-0.3.21/lib/evertils/controller.rb:40:in `exec'
/Users/prieber/.rvm/gems/ruby-2.4.0/gems/evertils-0.3.21/lib/evertils/router.rb:41:in `route'
/Users/prieber/.rvm/gems/ruby-2.4.0/gems/evertils-0.3.21/bin/evertils:15:in `<top (required)>'
/Users/prieber/.rvm/gems/ruby-2.4.0/bin/evertils:23:in `load'
/Users/prieber/.rvm/gems/ruby-2.4.0/bin/evertils:23:in `<main>'
/Users/prieber/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `eval'
/Users/prieber/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `<main>'

May have something to do with how the "first" section is determined in log.rb#L39.

Log-message should have a max number of characters/line

After X chars, repeat the templated sections of the line (time + job number) and move the remaining characters to a second line. This way you could write whole paragraphs and they won't look weird in evernote (word wrapping really breaks the layout on small monitors).

This should be configurable in the future messages.yml file.

Notes not being tagged properly

Weekly and monthly notes are supposed to get tagged with week-X or month-X to help with searching and statistics, but for some reason they are no longer being tagged during the generation process.

Make EOD section configurable via ~/.evertils

New configuration file (and directory) to customize template content. This will live outside the repo in $HOME/.evertils/ and be user customizable. Evertils should create the config file with a default section (EOD - End of Day) if it does not exist on when run, but should fall back on built-in templates if no custom templates are defined. If a custom template does not exist, stop program execution and alert the user.

a) Custom sections:

# ~/.evertils/config.yml
sections:
    EOD:
        - Item one
        - Item two
    JIRA links:
        - link one
        - link two

b) Custom templates:

# ~/.evertils/config.yml
templates:
    Daily:
        ~/.evertils/templates/daily.yml
    Weekly:
       ~/.evertils/templates/weekly.yml

Weekly log fails to link to the daily note on Mondays

Running evertils generate weekly manually returns an EDAM code 11. Will need to find out the proper ENML format for this note by pulling an existing one from EN and modifying the built in and local templates accordingly.

New template/note type: Monthly Task Summary

Command
evertils generate mts CLIENT_NAME

Template

<div><span style="font-size: 18px;">Completed</span></div>
<ul>
<li>...</li>
</ul>
<br />
<div><span style="font-size: 18px;">Logs</span></div>
<ul>
<li>...</li>
</ul>

Tags

  • Client name
  • Month (i.e. month-2 for February)

This note should be uploaded to the $COMPANY_NAME Logs/Monthly Task Summaries notebook.

Integrate with ykman

New configuration option "yubikey_serial". If present, code should check if this key is connected. This is enough for initial implementation, perhaps a smarter method would also verify the pgp key onboard but I don't know how to do that yet.

Notes not being created

A currently unknown issue is preventing notes from being created in v0.2.8.2. This will be updated when the issue is diagnosed and resolved.

YAML configuration parser class

There are now several YML configurations for different kinds of generators, a class should be built to parse and manage these internally. Right now everything is basically crammed into the Cfg object and that's not working out so well.

It should:

  • read and store the YML config
  • provide a single/simple way to get this data and pass it around

Use yaml config files for note type definitions

Basically you would have a number of config files in your ~/.evertils/templates folder and evertils would parse the config and create them on demand. This would be a small change as far as generating from templates goes, but large in that you could create any "type" of note you wanted so long as you had a valid configuration for it.

For example, at a new job they have a new daily task called scrum. You want to record those things without having to modify evertils core.

# ~/.evertils/templates/type/scrum.yml

- type_name: Scrum
- format: Scrum For [%MONTH% %DAY% %DOW%]
- sections:
    header: nil
    body:
        - `Done`
        - `Next`
        - `Blockers`
    footer: nil
- tags:
    - day-%DOY%
    - month-%MONTH_NUM%
    - week-%WEEK_NUM%

Daily could be represented as follows.

# ~/.evertils/templates/type/daily.yml

- type_name: Daily
- format: Daily Log [%MONTH% %DAY% %DOW%]
- sections:
    header: nil
    body:
        - Triage
        - Meta:
            - Queue
            - Scrum
    footer: nil
- tags:
    - day-%DOY%
    - month-%MONTH_NUM%
    - week-%WEEK_NUM%

Missing types would throw TypeNotFoundException and exit.

Use tokens to determine styling

notebook: Daily
title: Daily Log [%MONTH_NAME% %DAY% - %DOW_NAME%]
sections:
    header: nil
    body:
        - h2.Triage <----
        - p.Some text <----
    footer: nil
tags:
    - day-%DOY%
    - month-%MONTH%
    - week-%WEEK%

Add crontab samples

Add page that describes how to use evertils as a cron job to the wiki. Include sample crontab file, recommend RVM installation, etc.

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.