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 ]
EMJ 20190907: No, it can't, so does it still exist anywhere?
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: https://wiki.tcl-lang.org/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 https://wiki.tcl-lang.org/_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 https://wiki.tcl-lang.org/_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:
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? :-)
uniquename - 2012-07-30 03:29:11
RLE, I just looked at the Formatting Rules page. The part on uploading an image is just as puzzling as the first time I read it a day or so ago. There is one sentence on uploading an image (which does not really say how to upload one). The rest is about using the image after it is uploaded.
AK - 2012-07-30 23:48:15
Well, the 'Edit' page of any page has an 'Upload from file:' label at the bottom (underneath the text entry area), with an 'Upload' button and entry field for the path to the file to upload. I guess that the explanation on the Formatting Rules on 'uploading' simply refers to this part of the page and that the connection was thought to be obvious, given the labeling and such.
RLE - 2012-07-30
Re uniquename, uploading an image works identically to creating a new page. You:
At which point you'll be dropped into the page editor. At the bottom of the page editor is a label: Upload from file:, a button "Upload", an entry, and a button "Browse...". You now:
uniquename - 2012-08-06 04:02:58
uniquename -2012aug05: Thanks AK and RLE for pointing out the upload button at the bottom of the EditPage. It was so far to the bottom of the page on the small (600 pixel high) netbook screen that I was working on, that I did not scroll down far enough to see it. (I think I must have scrolled down and thought I was at the bottom of the page, but I wasn't.)
I see that someone has added the phrase '(Look for "Upload from file:" at the bottom of the edit page)' to the one sentence on the 'Formatting Rules' page that described how to upload an image.
Previously, that sentence could have been paraphrased as:
"How to upload an image: Upload your image."
Not much help. The person who wrote the original sentence probably had a picture in his/her mind about how to do the upload. But the picture in his/her mind was not conveyed to the printed word on the page.
So thanks for adding the phrase. I was going to suggest that someone do that.
Actually, I am making this post to suggest a little more --- a further improvement to the upload-an-image process.
Currently, there are still a few flaws in the process:
1) It is not immediately obvious how to upload an image. A user still has to wade through a lot of verbiage or do some keyword searches to find the help info.
2) The EditPage is being used --- with a text area and a warning about using the Upload button if text is entered on the page. And the Upload button, entry field, and Browse button are way down at the bottom of the page --- far out of sight. There are quite a few complications introduced by using the TextEditPage as an ImageUploadPage. To cut this item short, I will simply borrow from Chuck Berry and say: using this TextEditPage as an ImageUploadPage introduces "too much monkey business to be involved in".
3) It is not clear what should be used at the Title prompt that one receives (along with the ReCaptcha prompt) before being presented with the EditPage. What should one enter as a title for an image upload? I have not seen any guidelines on that.
4) The ReCaptcha is hard to read and often yields failures, in which case whatever one enters in the Title field has to be re-entered on the next attempt.
I suggest you add an 'Upload image' option to the left menu of the wiki.tcl.tk pages, as seen in the following image --- right under the 'Create new page' option.
Then there would be no need for Tcler's to look all over the site for info on how to upload an image. It would immediately be clear what to do.
That link would take the user to a new page --- just like the EditPage, but without the big text area (which the user should not use, and probably the typical user wonders about whether he/she should totally clear it or not, of the default text).
The only thing on the new UploadImagePage would be the Upload button, the entry field, and the Browse button that are currently at the bottom of the EditPage, as seen in the following image.
Note that the verbiage about not using the Upload button if text is edited etc. etc. under those widgets could be removed --- or replaced by other verbiage, such as suggestions on a recommended maximum size of uploaded images, or whatever.
On the subject of the Title:
Currently, when 'Create new page' is chosen, the user gets a Title prompt along with the ReCaptcha prompt.
For the 'Upload image' option, I would suggest simply providing the ReCaptcha prompt.
It seems like the best thing to do for the ImageUploadPage is to simply make the name of the image file the title of the new image-only page.
There would need to be a check that the image filename was not already in use, but there is probably already code in place on the TitlePromptPage to check that the Title that a user enters is not already in use.
So, although this suggestion would require making one or two new pages on the site, the ImageUploadPage would essentially be a copy of the EditPage, with a bunch of stuff removed --- and perhaps some Title processing code added, similar to code used for the current TitlePromptPage.
And the ReCaptcha prompt page would essentially be a copy of the TitlePromptPage --- with the Title prompt removed.
CGM, 2012-10-09: How the *^*^%*&% do I update a previously-uploaded file??? Yesterday I got a bug report for gush.tcl in https://wiki.tcl-lang.org/_repo/gush/ which I uploaded 3 years ago. Fixing the bug was simple, but cannot see how on earth to upload the fixed file and replace the buggy version. I can browse and select a local file, but how do I upload it? There's a "subdirectory to create" entry but that doesn't help. I see no option to edit or upload the files in the existing folder. Help!!!