Show HN: ppl - The Command Line Address Book
ppladdressbook.org
ppladdressbook.org
I tried really hard to find an existing one, but I'd be interested to hear if I messed up and accidentally reinvented the wheel.
One thing that might be nice would be an abook to ppl exporter. abook saves its information in a flat file at ~/.abook/addressbook with items like the following:
# abook addressbook file
[format]
program=abook
version=0.5.6
[0]
name=Someone Somewhere
email=someone.somewhere@gmail.com
[1]
name=Another Person
email=another_person@yahoo.com
nick=Another
[3]
name=Detailed Somebody
email=somebody@details.org
address=2222 Main Street
city=New Somewhere
state=NY
zip=10011
phone=212-111-1111
nick=person
notes=Birthday May 14th
It shouldn't be too hard to convert that, but I'm not sure (yet) about how you're storing information. (You mention vcard, but I'm not familiar with the details of that.)Great work!
You're right that an exporter shouldn't be hard to build. Might get on that once some bugs and other features are out of the way!
http://blog.karssen.org/2010/05/24/script-that-converts-a-sq...
Reminds me of when I built Logbook - store notes on Gists from CLI. The mindset is amazingly the same :) Though I offloaded most of the CLI processing to Thor, and didn't build Command/CLI abstraction into it.
You might even find it useful: https://github.com/jondot/logbook
I don't know, all I can say is you have excellent taste! :)
The semantics of contact data exposed via the Contacts API is supposed to be quite close to vcard, which would make pushing data from Google Contacts to your Git vcard repository reasonably easy, but the other way could be hairy.
So my suggestion for the killer feature here is an ability to sync with some major service provider such as iCloud or Google (preferably both / some standard protocol?). I'd love to help the development of such a feature.
I think the reason I didn't find starting a new address book from scratch to be a problem for my own "itch" is that the previous non-existence of a CLI address book had always prevented me from building up any decent amount of data in any other place!
The page is giving me kind of cognitive dissonance, because it looks very startupy, and I would expect something about pricing, free plans, connection to facebook, or links to Android and iOS app store ... but this is an honest to god, desktop command line application.
I guess I never had enough of contacts to put in there to notice its usefulness. Kind of sad, actually.
I don't like almost everything else, including the syntax ('ppl phone alice 12345' feels icky and against-the-grain to me), the use of (slow?, and) dependency-heavy git, the redefinition of on-disk format, the lack of formal data-description, the lack of customization for such, trying to do more than one thing well (versioning/diffing/merging/branching = git's job, not yours... keep that out of scope), the lack of meaningful, nontrivial use cases. (What problem does this solve, in the real world, except your itch? If you'd included GPG key, included autopopulation support based on directory lookups or some mature script system, helped people migrate contacts off Gmail and in to private git-based cloud hosting with hooks to preload their FirefoxOS beta with privacy-enhanced contact solution, I would have been more impressed)
Why not do something different like 'ppl alice --phone=12345' (set) and 'ppl alice --phone' or 'ppl phone <alice' or 'ppl -f %phone <alice' (get). In general taking input via pipes is better than adding mandatory arguments.
Better yet, stuff the command line syntax thinking entirely for the moment and focus on JSON. Spec the JSON Schema instead of the interface to it, focusing on data, and how it might differ in different use cases / environments (eg. countries). Some argue that if you get your understanding of the data right, the program is right.
By way of contrast, right now I suspect a lot of the hassle of such a program is going to be things like (0) trying to do too many things, succeeding at none of them (1) yet another definition of what a phone number, address, etc. is that is not going to work for everyone (2) some developer second-guessing what i, the user, want or have to accept in terms of duplicate input, normalization, whitespace significance, etc. (3) non-i18n interface (4) let me smoke my unixpipe, dammit!
I dunno, I'm just playing devil's advocate, but there's probably some value in that rant.
Thanks for the suggestion. The link was helpful because I could tell in moments how easy it would be to get started with this.
As the author is posting here: why using ruby, a language which seems to be missing from many Linux distributions and which needs to be installed. Why not C or Python or Perl? Present everywhere?
C lost out because I wanted to use this project as an opportunity to try out full-on TDD, and C's automated testing tools seemed like a pain.
I also wanted to build something that I could release relatively quickly to validate the idea. Not to mention my eagerness to be able to use it for my own address book needs. I'm not very experienced with C so it probably would have taken me six months to get to this point instead of one.
As it stands, the main downside has been that I've encountered a lot of Rubygems-related woes resulting from the choice. Some earlier versions of Ruby are still very commonly installed on peoples' computers and don't work with ppl because they lack certain methods. I'd rather that than another five months of the app not even existing.
I wouldn't be averse to a C port, if the stars aligned just right so that it was both necessary and possible. For now I'm hoping Ruby will suffice!
I could do with knowing what command you're running, what version of Ruby you're on, and whether you're running it inside an initialized address book repo.
Sorry about the bug by the way :(
Can I do a pull/push-like commands to a different repo from this app?
There are no built in "ppl push" commands or anything like that at the moment. I was wary of tempting YAGNI and the inner platform effect until some valid use case becomes clear.
I can Create a remote repo on Dropbox and have a cloud based service :)
You can do that easily enough with bash :-)
2.css is part of the little CSS build process I came up with for this site. There are a bunch of LESS files in a directory (https://github.com/h2s/ppladdressbook.org/tree/master/_style...). Then there's a rake task to build them into {{site.version}}.css. This means I can update the CSS, bump the version number, run jekyll, and push the changes live being certain that there won't be any annoying caching issues stopping people from getting the updated CSS.