Document Browser
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
Document Browser
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!
(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.
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!
(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.
- kv83
- Maxcoderz Staff
- Posts: 2735
- Joined: Wed 15 Dec, 2004 7:26 pm
- Location: The Hague, Netherlands
- Contact:
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?
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?
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
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.kv83 wrote:Wow. This is extremly useful for all those different z80 text files and other documents and stuff...
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).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
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.
Yes, the famfamfam set. Thank you.BTW: Where did you get those cool icons? Are thos from the site I gave you?
Re: Document Browser
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 againbenryves 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.
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
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
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
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
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?
Z80
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?
Z80
- CoBB's Z80 guide
- Z80 Family CPU User Manual, Zilog Z80 Product Specification, The Undocumented Z80 Documented
- Z80 Bits (Where might I find the latest mirror?)
-
- MCF Legend
- Posts: 1601
- Joined: Mon 20 Dec, 2004 8:45 am
- Location: Budapest, Absurdistan
- Contact:
This is the official, always most up-to-date version of Z80 Bits:
http://baze.au.com/misc/z80bits.html
http://baze.au.com/misc/z80bits.html
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
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:
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)?
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:
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)?
- elfprince13
- Sir Posts-A-Lot
- Posts: 234
- Joined: Sun 11 Dec, 2005 2:21 am
- Contact: