TonesNotes
TonesNotes is a free add-in for Microsoft Word available here http://workspaces.gotdotnet.com/tonesnotes. It lets you post to a .Text blog from any open Word document.
Other places to look for (or leave) information about TonesNotes are the .Text Forum, the .Text Wiki, or my own blog Tone's Notes
The intended mode of operation is to use a single Word document in which the ideas you’re working on take shape. When an idea is baked, place the insertion point within its content, click the “Post” button on the TonesNotes toolbar, and the content is simultaneously posted to one or more blogs and archived as a separate Word document on your local file system.
The command bar has a “New” button which starts a new entry at the bottom of the active Word document. An entry is demarked by a paragraph with the style “Heading 1” by default. The “New” command inserts a paragraph with a date stamp which will become the post creation time. Complete the note heading with a comma separated list of categories and a title. Anything in the note heading paragraph not recognized as a date or category name becomes part of the title.
Since not all ideas are suitable for public posting, the behavior of the Post command is driven by assigning a category name to each configured blog. A note is posted to each blog whose category name is listed in the note heading, or simply archived if it isn't meant to be blogged.
In addition to the “New” and “Post” functions, the toolbar has a “Config” button which brings up the configuration dialog.
Getting Started
The installation was successful if you see a new toolbar with three buttons on it ("Post", "New", and "Config") when you launch Microsoft Word.
Drag the toolbar to place it next to your existing toolbars at a convenient location.
To get in the swing of things, it might be helpful to start by creating a dummy note which you will post and archive if you follow along with the examples below.
With a Word document open (doesn't matter which), click the "New" button. You should see something like this appear at the end of the document:
The paragraph style has been set to Heading 1 (this is configurable) and the insertion point should be blinking just after the comma. If you don't like the date or time format you can change them later. Complete the note heading so it looks like this:
2004-02-12 12:56:32 Thu, myblog, My first note using TonesNotes
The commas are important. "myblog" is the category name assigned to your blog by default. By sticking it in the note heading like this, you're saying that when the note gets posted, it should go to your blog. The rest of the heading will become the title of your blog posting.
Every note you post has to have a body, so type a return and some text like the following:
2004-02-12 12:56:32 Thu, myblog, My first note using TonesNotes
This is the body of my note. It can contain most of the formatting Word has to offer.
That's it, your first note is ready to Post, but before you click the "Post" button, it iss essential that you customize TonesNotes' configuration.
Click the "Config" button to set things up for your particular situation.
TonesNotes Configuration Dialog
Archive Configuration
The "Archive" tab controls how TonesNotes saves a copy of each note you post to your local file system.
If you just installed TonesNotes, you're initially configured to save each note under a folder called "Notebook" in your "My Documents" folder.
Here is the purpose of each item on the "Archive" tab:
- Enabled
- Check the box to save each note on your computer when you Post them. Clear the box to stop archiving notes locally.
- File format
- You can save each note either as an ordinary Word document with the ".doc" extension, or as Filtered HTML with a ".htm" extension. The .doc format has the advantage of always keeping your work in a single file. The .htm format may put things like images that you insert into your notes in separate files that are associated with the main .htm file.
- Folder
- Your notes will be saved in this folder. Every note that has at least on category in its heading is saved in a subfolder with the name of the first category.
- Filename format
- Controls how filenames are generated from note headings. {0} is replaced with the date and time. {1} is replaced by a comma separated list of categories. {2} is replaced with the note's title.
- Heading format
- Controls how the note heading will be formatted at the beginning of each saved note file. You can clear it if you don't want the heading in each file.
- Add, Delete, Prev, Next
- These buttons let you configure additional archive locations, each with its own format. Leave these buttons alone for now.
Blog Configuration
The "Blog" tab controls how TonesNotes posts each note to one or more blog servers. In this version of TonesNotes, you must be using a .Text (Dottext) blog server.
If you just installed TonesNotes, you will have to make changes to this tab's settings before you can post to your blog.
Here is the purpose of each item on the "Blog" tab:
- Enabled
- Check the box to post to this blog. Clear it to temporarily prevent posting.
- Configm posting
- Check the box if you want to a confimation dialog to appear before posting to your blog.
- Category
- This is the category that you will use in the heading of each note you want to post to this blog. Keep it short and don't including any commas or other unusual characters.
- Username
- Your blog server account's username.
- Password
- Your blog server account's password.
- Service url
- The full address of your blog server's posting service page. For .Text, add "Services/SimpleBlogService.asmx" to the usual base URL for your blog.
- None, Original Size, Thumbnail
- If you post a note containing embedded images (images you've inserted or dragged into your note), they can be automatically copied up to your blog server (provided it has bee upgraded with a minor modification to supprot this. Visit the TonesNotes workspace on GDN for information on obtaining and installing this modification.
"None" discards images when they are posted. This may be useful if you want to archive the images but not post them, or if you have multiple blogs, some with images and some without.
"Original Size" will display the full size image in your blog entry.
"Thumbnail" will display a thumbnail image in your blog entry which will automatically link to the original image.
- File types
- Only files with extensions in this list will be sent to your blog server.
- Gallery
- The title of the image gallery that will receive your images on your blog server. If a matching gallery doesn't already exist it will be created and marked as invisble so that it won't appear to your community by default.
- Add, Delete, Prev, Next
- These buttons let you configure additional blogs. Leave these buttons alone unless you have multiple blogs.
Add creates a new blog configuration. Prev and Next let you move between the configurations. Delete permanently removes the currently displayed blog configuration. You can assign multiple blogs either the same or a different category, depending on how you want to control which blogs you post to.
Advanced Configuration
The "Advanced" tab controls a number of important settings. You don't need to make changes here but you probably will eventually.
Here is the purpose of each item on the "Advanced" tab:
- Microsoft Word Heading Style
- TonesNotes identifies notes in a word document by searching for text with the formatting "style" that matches this property.
The default value is "TonesNotesHeading".
If the style doesn't already exist, it will be created for you.
You are free to redefine the style as long as it remains a paragraph style.
- Recognized date formats
- These are .NET standard DateTime format strings which define the date formats TonesNotes will recognize in a note heading.
The first format is also the format used by the "New" button when it inserts the start of a new note entry in the active document.
- Log file folder
- You can leave this alone unless you're working with the source code or helping debug a problem. Enter something like "C:\" to enable the generation of a log file while TonesNotes is running.
- Open .config file in Notepad
- Launches Notepad with the configuration file being manipulated by the Configuration dialog. This is an XML format file which will contain the settings from the time when you opened the Configuration dialog. Any changes you have just made have not been saved to this file yet.
One of the reasons for this button is to easily determine where your configuration information is being stored. In some cases, it may also be easier just to edit the xml file. If you close the dialog before saving the file, TonesNotes will automatically notice the change and update its configuration.
Appendix: Required .Text Modification for Image Posting
Add the following function to the SimpleBlogService.asmx.cs file:
/// <summary>
/// Add an image to a specified gallery and return the url by which it will be accessible.
/// </summary>
/// <param name="username"></param>
/// <param name="password"></param>
/// <param name="gallery">Title of the target gallery, gallery will be created if it doesn't exist.</param>
/// <param name="postdate">Date to associate with the image. Not currently supported by the data model.</param>
/// <param name="title">Title for the image.</param>
/// <param name="description">Description for the image.</param>
/// <param name="categories">Array of categories to associate with the image. Not currently supported by the data model.</param>
/// <param name="filename">The non-path image filename including extension. Note that currently filenames must be unique within a gallery.</param>
/// <param name="data">Image file data in on-disk format matching the filename's extension.</param>
/// <returns>A url in the form http://blogs.mydomain.com/myblog/8/o_filename.jpg, where 8 is the integer CategoryID assigned to the gallery.
/// The returned url is an absolute url with a "o_" prefix on the filename.
/// Caller can make the prefix "t_" for thumbnail and "r_" for standard size.</returns>
[WebMethod(MessageName="AddImageToGallery",Description="Insert an image into a gallery with Categories",EnableSession=false)]
public string AddImageToGallery
( string username
, string password
, string gallery
, DateTime postdate
, string title
, string description
, string[] categories
, string filename
, byte[] data
) {
BlogConfig config = Config.CurrentBlog(Context);
CheckUser(username,password);
int categoryID = 0;
// Lookup the categoryID of gallery (gallery is the title).
LinkCategoryCollection lcc = Links.GetCategories(CategoryType.ImageCollection, false);
foreach (LinkCategory lc in lcc) if (string.Compare(lc.Title, gallery, true) == 0) { categoryID = lc.CategoryID; break; }
// If gallery doesn't exist, try creating it.
if (categoryID == 0) {
LinkCategory category = new LinkCategory();
category.CategoryType = CategoryType.ImageCollection;
category.Title = gallery;
category.IsActive = false;
category.Description = "Images uploaded with new posts.";
categoryID = Links.CreateLinkCategory(category);
if (categoryID == 0) throw new Exception("CategoryID is zero");
}
// Insert the new image into the selected gallery.
// This puts three copies (thumbnail, standard size, original size) of the image on disk under the "images" folder
// and adds a record to the blog_Images table.
Image image = new Image();
image.CategoryID = categoryID;
image.Title = title;
image.IsActive = true;
image.File = Images.GetFileName(filename);
image.LocalFilePath = Images.LocalGalleryFilePath(Context, categoryID);
int imageID = Images.InsertImage(image, data);
if (imageID == 0) throw new Exception("ImageID is zero");
string baseImagePath = Images.HttpGalleryFilePath(Context, image.CategoryID);
return baseImagePath + image.OriginalFile;
}