Open rbarros opened 10 years ago
Nice. I would change email
to contact
(so it could be Skype or corporate chat (irc, jabber, whatever)). related #88
Also,
self.author = self.view.settings().get('author', None)
self.author_name = self.author['name'] if self.author else ''
self.author_email = self.author['email'] if self.author else ''
self.author = ' %s <%s>' % (self.author_name, self.author_email)
or
self.author = self.view.settings().get('author')
if self.author:
self.author_name = self.author['name']
self.author_email = self.author['email']
self.author = ' %s <%s>' % (self.author_name, self.author_email)
else:
self.author = ''
Ok, I changed the email to contact.
self.author = self.view.settings().get('author', None)
self.author_name = self.author.get('name', '') if self.author else ''
self.author_contact = self.author.get('contact', '') if self.author else ''
self.author = ' %s <%s>' % (self.author_name, self.author_contact) if self.author else ''
✔ Task 1. @bug @done (14-03-06 15:48) User1 <contact1>
✘ Task 2. @change @cancelled (14-03-06 15:48) User2 <>
✔ Task 3. @change @cancelled (14-03-06 15:48) <contact3>
✔ Task 4. @change @cancelled (14-03-06 15:48)
//User1
{
"author": {
"name":"User1",
"contact": "contact1"
}
}
//User2
{
"author": {
"name":"User2"
}
}
//User3
{
"author": {
"contact": "contact3"
}
}
//User4
{
"author": {
}
}
@rbarros send pr, would you? convert this issue to pr or create separate one.
Also, I’ve two thoughts (feel free to ignore them):
"author": "Vova (ping me @vovkkk)"
hi, I like the idea of user names/contacts listed at completion entries, but dislike the config setup. Not a big deal, just questioning the overhead for this ;) How about: .) use the current log-in when completing a task .) in addition scan the file for completion entries and IF the user-name is already listed with a contact-info use that as well
So the first time you complete a task in the file just add the contact at that entry and from there on that contact would be used for other completion entries => no need for config file.
Just wanted to drop/share this idea, obviously will happily use the config file ;) Cheers and thanks for the plug in and the addition to it.
btw, the small issue with config file is that it needs to be shared in addition to the todo file. That is the driver behind my idea above. cheers
use the current log-in when completing a task
It may vary, user may have different usernames on different machines, moreover you may create another profile on the same system e.g. for testing purpose. Scanning is not and cannot be robust either:
☐ reply to AliceBlitterCopper <reply+i-28906804-045d7d64ee3a5a18ef0bd3f39c31d7fedd49e128-1975298@reply.github.com>;
✔ buy milk @done (14-03-15 18:16) Vova (ping me @vovkkk)
We can enclose signature into something, e.g. 〈Vova〉
(not a regular parentheses), but still it doesn’t garantee anything and would increase overall complexity… Nah. I mean automation is a great thing, but sometimes it’s better to keep the thing silly simple.
reg. different names on different machines: Sure it may, but how often does it? And is it really a problem? Covering all the corner cases tends to complicate things. (btw, maybe they are not corner cases for the intended usage scenarios, i don't know)
reg: finding/parsing the contact info: how about just trying to parse already completed tasks with username entries which do have the additional
reg: silly simple: hmmm, syncing the sublime config files between users is not, right?
Obviously there several levels and definitions of "simple" ;) Anyways, thanks for the work Cheers.
It doesn’t matter how often, because at some point one would face such usecase and will ask to make system-independent way — we end up to add settings entry.
how about just trying to parse already completed tasks with username entries which do have the additional directly following it (via regex fe)?
We cannot (in any way) garantee that parsed one is correct one. The whole point of the feature that file will be edited by many persons, names are not unique there might be another Vova with same username, but different email.
hmmm, syncing the sublime config files between users is not, right?
I, personally, do not consider it is a problem, I need set up working environment on new system anyway.
Obviously there several levels and definitions of "simple"
I meant in programmatic matter :smirk:
@rbarros ping, have no time to send pr? just tell me I’ll commit myself.
Came the need to share with someone else the same
.todo
file. The idea would be to add the name/email from whom modified the task.E.g:
✔ Task 1. @bug @done (14-03-06 15:48) User1 <user1@domain.com>
✘ Task 2. @change @cancelled (14-03-06 15:48) User2 <user2@domain.com>
E.g PlainTasks.sublime-settings:
Code: