GreaseDoggy
GreaseDoggy is a
Greasemonkey script that lets you add events from web pages to your Cosmo collections. It detects events marked up in the
hCalendar microformat embedded within the HTML of a web page. For each hCalendar event in the page, GreaseDoggy adds a select menu that lets you choose a Cosmo collection to put the event into.
Upcoming is an example of a web site that marks up its event pages with hCalendar. With GreaseDoggy installed, you can add any Upcoming event to a Cosmo collection.
This is an early access version of GreaseDoggy. It is only intended for bleeding edge users and hackers who are comfortable editing JavaScript code and interpreting HTTP messages. We will see what we can do about making it more usable by a wider audience.
Installation and Configuration
- Have a Cosmo account. If you don't have one already, you can sign up for a free one at https://hub.chandlerproject.org/.
- Be using Firefox and, if you haven't already, install Greasemonkey.
- Find the feed service URL for your collection:
- Open the Cosmo web UI in your browser.
- Click the "i" icon next to the name of the collection you will be adding events to in the sidebar to open the collection details dialog.
- Choose "Other..." from the "Subscribe with" menu.
- Copy the URL from the "Atom" text box.
- Click the link for the script in the list of attachments at the bottom of this page. Greasemonkey will recognize the script and ask you to install it. Click the "Install" button when it is enabled.
- Configure the script:
- Open the Greasemonkey "Manage User Scripts" dialog (Tools > Greasemonkey > Manage User Scripts ...). On smaller displays the dialog box may hide the instructions on this page. If so, you can dismiss the dialog, open a new window with these instructions and move it out of the way, then open the dialog in the original window.
- In the "Manage User Scripts" dialog, check the "Enabled" checkbox and click the "Edit" button (the first time you do this, you will be prompted to choose a text editor application). This opens the script in an editor window.
- Find the
const COLLECTIONS section on line 9.
- Replace the
hub.chandlerproject.org URL with the feed service URL you copied from the Cosmo collection details dialog.
- Important: remove the trailing
/basic from the URL you just entered if there is one (this is due to a tiny Cosmo bug that will be fixed soon).
- Optional: change the name of this collection from "My Calendar" to something else, if you like.
- Save the script and close the text editor window.
- Click "OK" to close the "Manage User Scripts" dialog.
- Repeat the process for each collection you want to be able to put events into.
Adding an Event
After configuration, the following paragraph should have a "Add to Chandler Server" select menu next to it. The menu should have an option for each collection you configured in the script.
Sample hCalendar event
Choose the collection you want to put the event into from the menu. This causes the browser to send the event to Cosmo. The browser will likely pop up a dialog asking you to enter your Cosmo username and password. Once you've done that, the browser will pop up a second dialog box with some geeky details of the server response. If the first line of these details is the status code 200, then the event was successfully stored. You can go to the Cosmo web UI and observe the event in the both the calendar and dashboard views of the collection and in the account browser.
What if there's a problem?
If no dialog box popped up, then the browser probably couldn't contact Cosmo. If the status code in the dialog box is a number starting with 4 or 5, then you've discovered a bug - send a message to
cosmo-dev and describe what happened, including as much information from the dialog as possible.
To Do
- polish both success and failure UI
- add GMail messages to Cosmo
- add external .ics resources to Cosmo
- auto-configure Cosmo collections when visiting the Cosmo UI