jlord / offline-issues

:grey_exclamation: :signal_strength: Get your GitHub Issues to read offline later. Mmm.
Other
640 stars 68 forks source link

Add --list option, and prompt user to open an issue #7

Closed muan closed 10 years ago

muan commented 10 years ago

Hi @jlord how is this.

$ offline-issues --list

You have these issues:
  1. github-github#1
  2. github-github#2
  3. github-github#3
  4. github-github#4
  5. muan-emoji#1
  6. muan-github-gmail#1

Which issue do you want to open? [1-6] sup
error:   Invalid input for Which issue do you want to open? [1-6]
error:   Must be a number and <=6
Which issue do you want to open? [1-6] 3
Opening ./html/github-github-3.html

I really want issue titles though.

jlord commented 10 years ago

Ok, now I see what you were wanting to do. But I'm wondering, why wouldn't people just:

ls
open filename.html

But also, I'm pretty excited about all the node you did!!!

dideler commented 10 years ago

Just chiming in from a user's perspective. I would much rather ls and open than be stuck guided in a command interpreter.

Edit: If I were to list my issues, I may not necessarily want to open one. Or I might want to open more than just one. And so on.

P.S. Very excited about this project!

muan commented 10 years ago

why wouldn't people just:

ls open filename.html

Because that'd require me being in the offline-issues folder. And - where is it?!

Edit: If I were to list my issues, I may not necessarily want to open one. Or I might want to open more than just one. And so on.

Simply press either enter or ctrlC will exit the prompt.

jlord commented 10 years ago

Because that'd require me being in the offline-issues folder. And - where is it?!

Do you mean the globally installed offline-issues the module folder? You don't need to (and shouldn't) be in that directory. You can run offline-issues from any directory on your computer to fill it with the static files. For example:

cd Desktop
mkdir read-these-issues
cd read-these-issues
offline-issues jlord/offline-issues#7
ls html
# see all the files you have
open filename.html

If I use ls or if I use what you've written, I'm going to have to cd back into Desktop/read-these-issues to get the list of files. Neither will work from anywhere on the system, ie, I can't be in Documents/pictures run your command and be shown the issues I have saved in Desktop/read-these-issues. Also, people can (and may likely) have these stored in many places so that wouldn't make sense anyways.

So in my mind (and with my understanding of this) it adds:

But in doing so:

Whereas default ls does nearly same thing, without locking you in a prompt and without numbers and vertical ordering (though if you have lots of issues, maybe numbers/list would be nice, see last paragraph):

screen shot 2014-06-15 at 10 58 57 am

The user doesn't have to use the --list option so it won't hurt to put it in. I'm probably going to stick with ls myself because it's more muscle memory and does nearly the same thing.

Anyway, I don't mind putting it in since it's optional and already written but I just wanted to surface this stuff @muan so that it's clear about what it is/isn't doing.

:heart_eyes_cat:

jlord commented 10 years ago

@muan Do you think it would be possible to show offline-issue instances across multiple directories? Like if we had a hidden . file in the directory to identify it and could search for that?

muan commented 10 years ago

So what I thought happen was all files get stored in the directory where the module is, but apparently I was wrong, seems like files get stored at whichever directory you were in, so never mind. lol I definitely didn't mean for it to do exactly what ls open can do.

Such node. Much to learn.