PhpDeliciousClient is a CLI program for administering your Delicous account. When you invoke it from the command line you have some methods to administer your tags and your posts.
It's written in PHP and uses Ed Eliot's PhpDelicous class to contact the del.icio.us api. (included in download)
PhpDeliciousClient is licensed under the GPL v2, while the PhpDelicious class is licensed under the BSD license.
The main reason I started developing it is because administering your account on the del.ico.us web interface can be cumbersome.
This is especially true in the case of balancing your tags:
After a while, your del.icio.us account can get unbalanced: this is when you have many tags, but most of them only contain a few posts (very often even just one! ).
So you would want to balance them again, by deleting and renaming some very specific tags so that you get a collection consisting of less tags (who are more general) and contain about 10 ~ 30 posts each. Maybe you even also want to delete or rename some general ones who have way to many associated posts.
If you want to do this via the del.icio.us web interface you could either go to your personal page, click a tag, and delete the tag manually from each associated post. Or you could go to the delete or rename tag pages. On these pages you have a form where you can select an existing tag from a dropdown (which usually is huge) and choose to delete or rename it (depending on which page you are on). Then you would need to go to the form again and do this again for each tag.
With this tool, you can get a list of tags with certain conditions. Eg "show me all tags who have between 1 and 3 associated posts". You can then loop through that list and for each tag the tool will present you the option to delete, rename or skip it.
Of course it can do more, but this was my focus: making balancing an account as pleasant as possible. Other features, such as adding or editing single posts are considered less important as these things can be done just fine on the del.icio.us page.
Currently the tool seems to do what it is intended to (and pretty well, at least for me: I cleaned up my account from about 400 to 80 tags during development of this program).
However I don't give any warranty, the tool is only moderately documented, performs little to no user input checking and isn't very well tested so don't expect any higher quality then that of the average Microsoft product.
This program shouldn't empty your del.icio.us account or blow up your computer but if it does I cannot be held responsible.
- [t] View Tag: Based on the name of tag you enter, you can see the associated posts and edit or rename the tag.
- [ts] View Tags: Shows you all tags based on certain criteria:
- lowerlimit: the minimum amount of times a tag has to be associated to a post
- upperlimit: the maximum amount of times a tag has to be associated to a post
- hard limit: the maximum number of tags you wish to edit/view at once
You can decide to view associated posts for each tag, and you can choose wether to only show the tags, or to present you a menu with options for each one. I usually use the latter, along with associated posts viewing enabled.
- [p] View Post: shows you the first hit based on a tag and url*
- [ps] View Posts: shows you all posts based on a tag and url*
- [lu] Date of last update: Shows you the time when the data (on the serverside) last changed
*: url based searching is still buggy, I'm working on it.
Plans for the future
My goals for upcoming releases are (aside from bug fixing) to add features to let you do stuff that you currently can't do or at least not in a productive manner.
Known bugs to be fixed
- URL-based post querying doesn't work
- Timezone not taken into account or something like that, because the "last updated" date has a 2hrs offset for me
- During list iteration tags that have been renamed/deleted already still appear in posts for other tags
- Issue less load on the Del.icio.us webservice by using the updated date (gonna take a look at Ed's caching system for that)
Features I have on my mind
- Try to hide password as it is typed in by user
- When a tag has many associated posts, automatically show them more concisely
- An "are you sure?" thing when you want to rename to a tag that already has many (say: 40) associated posts
- A mode to only show tags that differ one letter, or differ several letters, as long as they have enough in common (say: 2/3, 1/2 or user configurable)
- An improved commandline that allows commands/queries like "rm tag1 tag2 tag3"
- A shell (such as bash)
- PHP 4 or higher, with php-cli enabled (default)
- A del.icio.us account, preferrably a very messy one
Unpack the archive and put the directory somewhere on your system. On Linux /usr/local/bin/ is usually a good choice.
Make sure pdclient.php has the executable flag (x). If the directory is in your $PATH, you can just type pdclient.php on your console, otherwise you need to type <path to program>/phpdeliciousclient/pdclient.php or edit your $PATH.
You could also create a symlink in a good directory: ln -s <path to program>/phpdeliciousclient/pdclient.php /usr/local/bin/pdclient
I choose a mysql-like syntax for invoking the program. Valid options are:
- pdclient.php --help
- pdclient.php --user <delicious username>
- pdclient.php --user <delicious username> --password
- pdclient.php --user <delicious username> --password <delicious password>
With method #4, the program will ask your password upon execution. With the other methods this doesn't happen. You can always update your account information from the menu. (account setup)
In the program prompt you can always type 'h' to get help. Aside from that, just try the options, you'll figure it out in no time.
Bug reports & feature requests
You can report bugs or file feature requests through the comment system on this page. Choose an appropriate title and prefix it with "Bug: " or "Feature: "