MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Document Browser
PostPosted: Mon 30 Oct, 2006 11:16 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
One more piece of software to add to the EarlyMorning/Brass/Latenite collection is something that can be used as an entirely standalone app. :)

I don't know if you're like me, but if you are you'll have directories stuffed to the brim with odd bits of documentation in a variety of exotic formats.

What I'm writing is something a bit like the Visual Studio documentation browser, but a tad more flexible. And, of course, plugin-extendable!

Image Image Image

(Click for larger screenshots). From left to right, some HTML (CoBB's excellent guide once again!), PDF and text.

It's the last one, actually, that gave me the idea of this project - I've got a lot of old text files which I can't read properly as they rely on a variety of quirky encodings. Hence the text file plugin adds its own custom toolbar to allow you to pick a new encoding and save the current file back as UTF-8.

The files will be stored within the directory "My Documents\Latenite\Documentation\", the library file held at "My Documents\Latenite\Documentation\library.doclib". For files to appear at all, they need to have an entry in the library.doclib file (just an XML file).

I'll probably add the functionality to import documentation from a single file - most likely a PAK/Zip-alike file which contains its own library.doclib file, which when "installed" through the browser will extract to the right place and merge libraries.

Currently HTML/PDF support is delivered via IE, and text and RTF files have their own plugins. I've wrapped XP's Picture and Fax Viewer up to view images, and I'd like to find a way to wrap Office components to display Word/Excel files.

Some sort of indexing to provide text searches would be nice, but I don't really want to reinvent the wheel and will see if I can find a simple way to use Windows IFilters. A CHM/HLP plugin might be useful, not sure how feasible that would be.

Let me know if you have any requests/ideas. I'll post an update when there's a usable beta.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 30 Oct, 2006 2:43 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Wed 15 Dec, 2004 7:26 pm
Posts: 2735
Location: The Hague, Netherlands
Wow. This is extremly useful for all those different z80 text files and other documents and stuff...

Btw, I guess the files I output with my "secret" project will blend in fine, since they are HTML, but what do I need to do to make such a nice tree-view of all htmlfiles :)

BTW: Where did you get those cool icons? Are thos from the site I gave you?

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 30 Oct, 2006 3:06 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
kv83 wrote:
Wow. This is extremly useful for all those different z80 text files and other documents and stuff...
That's the intention. I've got hundreds of the blighters. ;) The worst part is that they're all in many different formats, and having a viewer open for each different one is a pain.

Quote:
Btw, I guess the files I output with my "secret" project will blend in fine, since they are HTML, but what do I need to do to make such a nice tree-view of all htmlfiles :)
You could even make it so that the "secret" project would directly load the files it works with. The plugins inherit from a Panel, so you can do whatever you like on said panel. The existing plugins are all very simple (they just stick a TextBox or WebBrowser, docked to fill, on themselves).

For a tree view, you could do something like the PDF plugin does (in my case, it's Foxit Reader) and provide your own tree view on the tab itself.

Creating plugins is pretty easy, given that all you're really inheriting from is a standard Panel control (and the extra method - "bool TryLoadDocument(string filename, string arguments)" - which returns true on success, false on failure).

As for the structure of the library, it's just an XML document made up of nested <document /> elements.

If a <document /> has a "src" attribute, when clicked it loads that particular document. If it has any child attributes, it turns into an expandable menu and gets a blue page icon instead of a white one.

The "book" icons are just <document />s which don't have a src attribute.

As well as a src attribute, you need to include a name attribute (display name) and can optionally include an args attribute. For example, with CoBB's Z80 guide, everything under the "Simple Structures" section points to the same HTML document, but the "args" bit contains an extra string that is passed to the plugin which it uses as a bookmark - file.htm#whatevertheargwas.

There isn't a library editor in there yet (I'm currently editing the XML by hand), but I intend to add one (renaming documents, dragging-and-dropping them around to arrange things to your liking). At the simplest level, you can add a file (or a collection of files) through an open file dialog, but as previously mentioned a format that allows you to install documentation from a single file would be convenient.

Quote:
BTW: Where did you get those cool icons? Are thos from the site I gave you?
Yes, the famfamfam set. Thank you. :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Document Browser
PostPosted: Mon 30 Oct, 2006 5:37 pm 
Offline
Calc King
User avatar

Joined: Sun 23 Jan, 2005 12:37 am
Posts: 1727
Location: Netherlands
benryves wrote:
I don't know if you're like me, but if you are you'll have directories stuffed to the brim with odd bits of documentation in a variety of exotic formats.

I love you for your software and the bright light you shed on this dark, Americanized forum with sentences that make me smile time on time again :)

Great application once again, I'm sure it'll come in very handy and not just for calculator related documentation!

_________________
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 30 Oct, 2006 11:58 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 4094
Location: I cant seem to get out of this cryogenic chamber!
benryves wrote:
You could even make it so that the "secret" project would directly load the files it works with.


Not only is this whole thing awesome, that feature is incredibly useful! I always have an asm/project documents folder open when im working on stuff, this fees up space on the taskbar :).

_________________
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 31 Oct, 2006 7:58 pm 
Offline
Calc King
User avatar

Joined: Sun 23 Jan, 2005 12:37 am
Posts: 1727
Location: Netherlands
Maybe you could add an internet explorer pane too, and add a bookmark to the tiwiki in the directory..?

_________________
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 31 Oct, 2006 11:04 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Wed 15 Dec, 2004 7:26 pm
Posts: 2735
Location: The Hague, Netherlands
Quote:
Currently HTML/PDF support is delivered via IE


So that's a "yes" i guess :)

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 01 Nov, 2006 5:52 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Well, sort of. The browser expects documentation to be on your hard disk, so it's a good point to raise. I'll add support for external links. :)

I'd like to find a slicker OLE solution than using IE as the container, so if you have any bright ideas...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu 02 Nov, 2006 11:26 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Hm, do I really need support for external links... if the document is a .lnk/.url file?

Anyhow, I've now added exporting (right-click any tree node in the contents, pick "export" and it rattles away to get all the linked files and exports the node details and binaries in a single compressed ".docpack" file). Importing comes next.

I've also added the ability to search for broken links (if a document is missing, it rattles through the documentation directory trying to fix the link for you). Currently it only works on filename, but I'll probably store extra data (file size and hash) along with the link so that it can work out which of the myriad 'index.htm's you really meant.

Now, I need suggestions as to which document packs I should provide. As a standalone it won't come with any, but the Latenite website will host a few (and Latenite itself might come bundled with some).

What I have so far is of course the official TI guides - and I spent some time yesterday importing that well-known link protocol guide.

Suggestions?

Z80TI

(It all depends on whether I can get permission, of course).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu 02 Nov, 2006 12:12 pm 
Offline
MCF Legend

Joined: Mon 20 Dec, 2004 8:45 am
Posts: 1601
Location: Budapest, Absurdistan
This is the official, always most up-to-date version of Z80 Bits:

http://baze.au.com/misc/z80bits.html

_________________
The Independent Z80 Assembly Guide
Acelgoyobis
PindurTI


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 06 Nov, 2006 11:52 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Thank you. :)

The browser now imports/exports via a single file - the .docpack.

To go with the contents, one needs an index, so I've added a search-as-you-type sort of affair:

Image

I can't find any way to get an embedded PDF (within IE) to jump to pages/sections (bookmarks), something that would be rather useful. I don't know if anyone can recommend a decent PDF viewer control (a lot of the .NET/ActiveX ones are rather pricey)?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 07 Nov, 2006 11:46 am 
Offline
Sir Posts-A-Lot

Joined: Wed 12 Oct, 2005 10:46 pm
Posts: 171
search-as-you-type...reminds me of OSX or Vista...that will be easier...

_________________
Free Pencil-thin Ipod!
Image
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu 14 Dec, 2006 8:52 pm 
Offline
Sir Posts-A-Lot
User avatar

Joined: Sun 11 Dec, 2005 2:21 am
Posts: 234
/me suggests the ability to import data from a specified category in a wiki.

_________________
Vermont Sustainable Heating Initiative || my author profile


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt