jacobevelyn / friends Goto Github PK
View Code? Open in Web Editor NEWSpend time with the people you care about. Introvert-tested. Extrovert-approved.
License: MIT License
Spend time with the people you care about. Introvert-tested. Extrovert-approved.
License: MIT License
Allow users to edit friend information without directly opening friends.md
.
This might look something like (assuming Jeffrey Lebowski starts off without any nicknames):
$ friends edit friend "Jeffrey Lebowski" add nickname "The Dude"
Nickname added: Jeffrey Lebowski is also known as "The Dude"
$ friends edit friend "Jeffrey Lebowski" remove nickname "The Dude"
Nickname removed: Jeffrey Lebowski has no nicknames
$ friends edit friend "Jeffrey Lebowski" add nicknames "The Dude", "Jeff"
Nicknames added: Jeffrey Lebowski is also known as "The Dude" and "Jeff"
In reference to #40 (comment)
Perhaps syntax should be:
### Friends:
- Jacob (Jake, Jevelyn)
Nicknames can also change... see #16.
Hi! What it says on the tin: the link to http://www.rubydoc.info/JacobEvelyn/friends
in the README leads to a 404.
friends update
treats 0.10
as being less than 0.9
, because they're compared as rationals.
Hi, it seems, you're missing an # encoding: utf-8
somewhere:
/usr/local/bin/friends:23:in `load': /var/lib/gems/1.9.1/gems/friends-0.5/bin/friends:151: invalid multibyte char (US-ASCII) (SyntaxError)
/var/lib/gems/1.9.1/gems/friends-0.5/bin/friends:151: invalid multibyte char (US-ASCII)
/var/lib/gems/1.9.1/gems/friends-0.5/bin/friends:151: syntax error, unexpected $end, expecting ']'
puts colors.take(count).map { |rgb| Paint["█", rgb] }.join
^
from /usr/local/bin/friends:23:in `<main>'
$ friends suggest
Error: undefined method `n_activities' for nil:NilClass
My friends.md
is very simple since I just added a few activities to test the app.
Something like friends stats
could easily return interesting information like:
Total activities: 457
Total friends: 165
Time period: 1 year, 1 month, 14 days
The format may need some tweaking but the basic idea would be fairly simple to implement.
Inspired by this comment.
Or should we rely on gem update?
It's ugly and doesn't play nicely with things like Opal.
Hey,
I'm not really familiar with the ruby ecosystem. I get the following error when trying to run any of the commands:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': /Library/Ruby/Gems/2.0.0/gems/friends-0.5/lib/friends/introvert.rb:55: syntax error, unexpected ')' (SyntaxError)
/Library/Ruby/Gems/2.0.0/gems/friends-0.5/lib/friends/introvert.rb:75: syntax error, unexpected ')'
/Library/Ruby/Gems/2.0.0/gems/friends-0.5/lib/friends/introvert.rb:103: syntax error, unexpected ')'
/Library/Ruby/Gems/2.0.0/gems/friends-0.5/lib/friends/introvert.rb:122: syntax error, unexpected keyword_end, expecting end-of-input
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/friends-0.5/bin/friends:12:in `<top (required)>'
from /usr/local/bin/friends:23:in `load'
from /usr/local/bin/friends:23:in `<main>'
I tried updating ruby using homebrew, but the error persists.
This lets us avoid annoying things like the shell interpreting characters like (
and !
.
This should also make sure filename is passed to Introvert.
It would be nice to allow this, similar to how activity descriptions can be entered via prompt, but for all commands. So I could just say friends graph
.
We can simplify the file-writing logic a lot by simply making it a gli
post hook that file-modifying commands execute. This also helps with #57 by removing a lot of file I/O from Introvert
.
I'm a little hazy on what this would actually look like, but I think in its most basic form it would probably be two commands for adding/removing friends suggest
from your crontab
(all from within the friends
program).
It would be nice to be able to do something like this:
friends add activity "Went for a run. #exercise"
and then later filter activities like:
friends list activities --tagged exercise
or
friends list activities --with James --tagged restaurants
For now this would only support one tag to be passed to the --tagged
argument (see #88 for more details on lifting that limitation).
When I type friends list activities --with John
or friends graph John
it's annoying to get this error:
Error: More than one friend found for "John": John Deere, John Doe
It might be nicer if friends
automatically picked the friend with more activities in these cases, but I can see arguments in favor of keeping the current system as-is as well. I think I'm leaning towards this idea because much of the philosophy of friends
is to let the program simplify and make assumptions for you (as in friend matching in activities).
Curious what others think here.
Instead of YYYY-MM-DD
, users should be able to use phrases like "yesterday" or "two Tuesdays ago," as in git
.
Likely the best way to incorporate this functionality: https://github.com/mojombo/chronic/
Current master has four RuboCop errors that prevent a git commit without skipping. These are not of great importance but I feel the change is beneficial if not for style then at least to prevent confusion while contributing.
-> % friends --version
friends version 0.10
-> % friends add friend Anton
Friend added: "Anton"
-> % friends add friend Berta
Friend added: "Berta"
-> % friends add friend Cäsar
Friend added: "Cäsar"
-> % friends add activity "Foo with Anton and Berta"
Activity added: "2016-01-12: Foo with Anton and Berta"
-> % cat friends.md
### Activities:
- 2016-01-12: Foo with **Anton** and **Berta**
### Friends:
- Anton
- Berta
- Cäsar
-> % friends add activity "2016-01-10: Bar with Anton and Cäsar"
Activity added: "2016-01-10: Bar with Anton and Cäsar"
-> % cat friends.md
### Activities:
- 2016-01-12: 2016-01-12: Foo with **Anton** and **Berta**
- 2016-01-10: Bar with **Anton** and **Cäsar**
### Friends:
- Anton
- Berta
- Cäsar
-> % friends add activity "2016-01-09: Baz with Anton, Berta and Cäsar"
Activity added: "2016-01-09: Baz with Anton, Berta and Cäsar"
-> % cat friends.md
### Activities:
- 2016-01-12: 2016-01-12: 2016-01-12: Foo with **Anton** and **Berta**
- 2016-01-12: 2016-01-10: Bar with **Anton** and **Cäsar**
- 2016-01-09: Baz with **Anton**, **Berta** and **Cäsar**
### Friends:
- Anton
- Berta
- Cäsar
(The example isn't as minimal as it could be, because I suspected it was related to the amount of friends you specify, but I hope it's clear enough.)
Whilst working on #83 I discovered running bin/friends
refers to the version of the gem that you have installed rather than the one within the repository.
I changed:
require "friends/introvert"
require "friends/version"
To:
require_relative "../lib/friends/introvert"
require_relative "../lib/friends/version"
And that seems to do the trick.
It makes sense to me that it would work this way in development, though I haven't tried to figure out if this will work when the gem is installed.
Is there a different way to run bin/friends
during development that works as I would expect?
In Germany, it is quite common to have double names (e.g. first names consisting of two first names). Unfortunately, their use currently leads to garbled output. Here is an example:
friends add friend "Anna-Lena Mustermann"
friends add friend "Lena Test"
friends add activity "went fishing with Anna-Lena"
that last command outputs
Activity added: "2016-01-20: went fishing with Anna-Lena Test Mustermann"
when one would expect something similar to
Activity added: "2016-01-20: went fishing with Anna-Lena Mustermann"
Note the recursive replacement: Anna-Lena
turned into Anna-**Lena Test**
which turned into **Anna-**Lena Test** Mustermann**
in the friends.md
database.
This certainly isn't what the user intends. I would suggest to treat en-dashes/minus signs as regular characters which don't indicate a splitting boundary.
p.s.: finally got it working :)
It could be nice to be able to filter activities like so: friends list activites --with Jessie --with James
(or some other syntax). This should possibly also be allowed for locations (#66) or tags (#89).
Open question: should multiple flags return the union of activities that match or the intersection?
Should be pretty straightforward.
And update activities accordingly.
Adding an activity with The Dude should be captured as an activity with Jeffrey Lebowski.
$ friends add activity "Went bowling with The Dude and Walter."
Activity added: "2015-01-04: Went bowling with Jeffrey Lebowski and Walter Sobchak."
Reporting on activities with a friend should work if you use their nickname.
$ friends list activities --with "The Dude"
2015-01-04: Went bowling with Jeffrey Lebowski and Walter Sobchak.
Both for fuzzy and exact searching.
And test that it works!
This is easy to fix—we just need to prepend the new activity instead of appending it.
"Earnest H" should correctly be turned into **Earnest Hemingway**
instead of **Earnest Hemingway** H
or **Earnest Shackleton** H
.
Open question 1: is there an elegant way to handle periods (e.g. "Earnest H. and I went to the store" and "I went to the store with Earnest H. We both love shopping.")? Off the cuff it might be easy enough to include the period in the "name" if it's followed by some amount of whitespace and then a lowercase letter (for instance with a lookahead regex), but there could be other good edge cases to consider here.
Open question 2: should this concern itself with more complex names (like "James Earl Jones" or "Jennifer Love-Hewitt")? Are there simple rules that will handle most of those cases?
If there's more than one match, prompt the user.
Must decide whether we want to have friends right in activity text or as annotations.
Right in text:
Rollerskating with **Lance**, **Brad Paisley**, and **Elmo**.
)Annotations:
Rollerskating => Lance Bass, Brad Paisley, Elmo
)Rollerskating => Lance Bass
becomes Rollerskating with **Lance** and **Brad Paisley**
(when two friends are named Brad)Rollerskating with Brad => Brad Paisley
becomes Rollerskating with **Brad Paisley**
(when two friends are named Brad)So a friend could be a #work
friend or a #family
friend, and they could be combined like:
friends.md
### Friends:
- Grace Hopper (a.k.a. The Admiral) #work #school
- Marie Curie #school
@andypearson is this what you were thinking?
Right now, Introvert
has a lot of impure behavior, like writing files in the middle of lots of methods, and opening up command prompts. These should all be moved to bin/friends
, or possibly an in-between class (Extrovert
?).
There are a lot of ways this could be incorporated:
geocoder
gem)suggest
and list friends
and list activities
filters by locationWould love to hear thoughts on what people would find useful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.