Version 24 of Half Bakery

Updated 2012-07-30 03:20:27 by uniquename

The Half Bakery is an experimental repository for tcl code which isn't quite polished enough for tcllib, is too big to publish in a wiki page, but still deserves some airing.

As the name implies, and common sense should dictate, code from the Half Bakery may not be entirely reliable. You should inspect it before relying upon it.

It can be accessed here: [L1 ]

One can create directories for packages, upload files to directories, download individual files and whole directories as tar archives. There is a limit of 1Mb per uploaded file - subject to revision.

Please keep the package directories continent - so one directory contains one package. Also, please don't upload crud, and please don't delete stuff without reason. Currently modification is not protected by authorisation, but this is subject to revision.

AMG: What happens if a bored prankster clicks all the delete buttons? Will everything be irretrievably destroyed?

DKF: Yes. That's why you shouldn't be putting anything there that is fully baked.

CMcC: Don't believe the buttons! The stuff's not immediately deleted, just renamed and rendered invisible. Then I, wearily, re-rename it, and give the bored prankster something to get excited about.

AMG: Heh, rename $file "" . ;^)


Lars H, 2008-08-28: Would it be possible to get a link for viewing files in the browser? Right now my browser just downloads any .tcl file I click on (probably because the server is helpful and specifies the file contents as Tcl source code — Safari seems to have a hard-wired set of mime types that shouldn't be viewed on screen, but rather just downloaded, and application/x-tcl seems to be one of them).

CMcC Yes, but there's a conceptual problem I have yet to solve. Perhaps you can suggest solutions. The problem is that any kind of object can be uploaded, and 'view' means just some things (such as application/x-tcl) as text/plain and others (say, image/jpeg) as they are and some things not at all. I can't think of a perfect solution to this, and that annoys me.

I've gone for the simplest thing that isn't provably always wrong, and defaulted to text/plain for viewing.

Lars H: Works fine, AFAICT. Another question: Must the directory names be equal to the wiki page names linked to for documentation?

CMcC Yes. The documentation link is just a synthetic link back to the wiki. As the repository is just a file system, there's no other place to store the link, so we just use the directory name. I think it's nice to have a 1:1 mapping for half-bakery names and wiki pages anyway.

AMG If the name doesn't directly link to a page, the search engine kicks in. Example: http://wiki.tcl.tk/virtualmouse/ indirectly links to VirtualMouse Cross Platform Mouse Handling. I have no complaint.


JR, 2009-01-27: The half-bakery seems to be much under-utilized, with most code snippets remaining in individual pages. Should we expect it to stick around?

Also, what's the preferred way to use a page name containing spaces as the doc link?

CMcC As far as I'm concerned it's going to stick around. Don't know how to use a page name containing spaces. Essentially the repo directory name is the page name in wiki. Does that help?


CGM 2009-2-17: I just get a 404 error when I try to use the link above (same result at home and at work, through different ISPs).

AMG: Ditto. "File '/' doesn't exist."

CMcC Argh. Good thing I was idly browsing the wiki and came across this bug report. Thank you. Problem fixed, thanks again for spotting it.


pdt 2012-07-12: I've tried to upload a small image file to http://wiki.tcl.tk/_repo/wiki_images/ , by pressing the Browse button at the bottom of the page and selecting my file to add. The file doesn't get added, and underneath the button I get 'x filename' where filename is the file I tried to add. I also tried to add an image to http://wiki.tcl.tk/_repo/images/ but got the same behavior. Is the half bakery working ok, or am I doing something wrong?


uniquename - 2012-07-30 02:17:37

uniquename -2012jul29: I too am puzzled about how uploading an image works. I have a couple of small images I would like to upload but have the same questions as pdt, on this page. It seems some info (preferably clearly stated) on uploading images should be on the main Wiki help pages --- even if it is to say that images will no longer be hosted at 'wiki.tcl.tk'.

I had a heck of a time finding out how to do an upload until a search on 'wikidbimage' and some other keywords happened to lead me to the 'dynnotebook' page. That's a heck of a way to provide help info.

If it is OK to use the 'Half Bakery', i.e. the '_repo' directory (with warnings about 'volatility' duly noted), then some guidelines on which image directory to use would be helpful. As 'pdt' points out, should 'wiki_images' or 'images' or what be used? Some guidelines would help prevent images being scattered all over the directory structure, and perhaps being unusable.

And a step-by-step guide on how to upload an image would surely be appreciated by almost any poster here.

RLE (2012-07-29) Uploading an image is actually easy, and the instructions are on the Formatting Rules page:

  • Images can be added to the wiki by uploading an image the first time a wiki page is edited.

I.e., an "image" is just another wiki "page". So to upload an image, click the "create new page" link, give the new page (which will actually be an "image page") a name/title, click the "create new page" button, then instead of entering text content upload the image.

Note what is implied in the Formatting Rules page. You have to upload the image as the very first thing you do to the new page. Implying that if you do no do this, it will become a regular text page, and not be capable of becoming an "image page".

Then you can link to the image by using the name/title you gave it in square brackets: e.g. [my_new_images_name].


uniquename - 2012-07-30 03:20:27

uniquename - 2012jul29 : RLE, Is there an upload button (or hint) on the EditNewPage page? I did not see one. By the way, the garbled text that we have to enter to start a new page is now so garbled that I have to try about 5 times (or more) to find a pair of words that I can read. Is this a new 'feature' --- to discourage new pages? :-)