Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
<<options>>
<<option chkUseYourSearch>> Use 'Your Search' //([[more options|YourSearch Options]]) ([[help|YourSearch Help]])//
It turns out, like her sister [[Bpu]], [[iPu]] [[loves the water|http://en.wikipedia.org/wiki/Hydrophilic]]. The day iPu learned to scoot and the day she learned to pull herself up were not much, compared to the day I set her down and gave Bpu a bath. While standing and running the water for Bpu, I discovered that iPu -- who I had left far down the hall with a pile of toys -- under foot.
Damn. That's one fast baby.
The motivation? Water. Bath water, to be precise. This kid loves to splash and play, the first real giggles I've heard from her. It's a real joy to see the girls play in the bath. If only she would puke before or while in the bath, instead of when being toweled off to dry ...
I bought Travis' fiance's old computer from them for 35 smackers. It's an old Athalon of some kind, with a Voodoo5500 video card and two really slow 10mb ~NICs. It serves as a file share, name server, and does other crap whenever I need it to. I hasn't been turned on since I moved to MyNewHome, and sits in the basement of SweetHomeChicago.
I [[Ubuntu]]'d the AgedAthalon. This took awhile because the disk image for the installer wasn't completely downloaded. Wasted a bunch of discs figuring that out. I only had a few setbacks.
#Screen resolution was too small. This was an [[Ubuntu configuration bug|href="http://bugzilla.ubuntu.com/show_bug.cgi?id=14787]] where the refresh rate is never set for my monitor, so it defaulted to the smallest size possible.
**Thank god for having run DebianGnuLinux for a couple of years. This was RelativelyEasy to track down and self-repair.
#It needed a NonFreeSoftware video driver for Linux, which I'm not sure there even is for the Voodoo5500
#Samba file sharing was not automagically enabled, and had to be installed [[and then hand-configured|http://bugzilla.ubuntu.com/show_bug.cgi?id=14896]]. These days, when you tell Ubuntu/Gnome to share folders, it helps the user step through installing NFS or Samba.
#Needs BIND installed so I can refer to other computers on my network by name. This had the interesting side effect while using my PrivoxyProxy: sometimes, other user's computers were served when browsing to 192.168.0.1. I didn't think that was possible. This has been fixed in my browser settings.
The best part of installing Ubuntu? The Ubuntu/Gnome printer wizard which trivially added the HP PSC 750 with the correct HP driver. Post configure, printing the test page took 1 second. This definately was the easiest setup of a printer under linux I ever did, and the only one that worked the first time.
[[Well, no he didn't|http://en.wikipedia.org/wiki/Alastair_Reynolds]]. But he did write a shit-ton of space opera science fiction that consumed my daily El and Metra commutes. And after having sucked those down, reading [[the plot description of MassEffect|http://masseffect.bioware.com/gameinfo/]] did not really inspire me to think 'Wow, what a cool RPG!'. I was more like, 'Whoa, what a derivative idea'.
{{{
A Spectacular New Vision of the Future
---------------------------------------------------------
The galaxy is trapped in an endless cycle of extinction.
Every 50,000 years, an ancient machine race invades the galaxy.
With ruthless efficiency, the machines wipe out all advanced organic civilization.
They leave behind only the scattered ruins of technology,
destroying all evidence of their own existence.
}}}
However, the wikipedia plot summary (which you will have to go see on your own, since it probably has some spoilers) makes MassEffect seem more reasonable. And the videos look pretty dope. PC should be out soon, so they say.
[[This thing is sweet|http://uche.ogbuji.net/tech/4suite/amara/]]; it's a pythonic xml binding. You know, for python to read and use XML with.
You can slurp in a whole xml file or process by user-defined record-chunks. Attributes and child elements are dot-properties of the document root. Text containers assign-to and stringify sensibly. Using a whole document's bindings to have it around and editable is turning out not to be fast enough at work - I'm talking about creating thousands of python objects in memory in order to bind to a complete video game world file in reasonable time.
The things I'm having trouble with are:
* preserving attribute order (element/record order seems preserved ok)
* preserving text nodes in badly written XML from a vendor that contain embedded (illegal!) html entities that describe utf-8 characters - amara loves to transform everything into unicode, so I lose these and have to do bookkeeping on them.
* speed. now that I want my prototypes to work with every file in the game, it seems unreasonable. [[Uche|UcheOgbuji]]'s own benchmarks don't show Amara particularly ahead of the curve (about 3x slower than cElementTree in a non-scientific test)
I used to roleplay avidly, and as an Amber fan I sought out the game at GenCon, the largest roleplaying convention in the US. Roger was supposed to show up. Though he did not, I had a great time roleplaying. My friends and I nicked the rules, and played substantial amounts of what was to become the AmberDicelessRolePlayingGame. To this day it is my preferred face-to-face RPG (with the sole exception of TheApostate's games, especially TORG).
Apparently these days, you have to [[get in line|http://www.powells.com/s?kw=amber+diceless&x=0&y=0]] for a used copy of the roleplaying source books. Or read the whole internet [[starting here|http://www.mortijingle.com/amberlink/]].
All the copious character development which accompanies playing ADRPG lead me to the conclusion that it's easier, more productive, and more fun to develop stories and characters for a living. So I thought I'd get a job making games. It turns out, not everyone at a game company gets to directly influence the design and direction of the product.
When ILivedInBeijing, I tried my hand at running ShatteredJade, a [[play-by-email|http://en.wikipedia.org/wiki/Play-by-mail_game]] (~PbEM) Amber game based around Chinese mythology.
[[Bpu]], [[Cpu]], and our friends and their toddler went to a touristy lil [[apple orchard|http://www.honeyhillorchards.com/]] today. Bpu ate about 3 fresh donuts, clambered over some hay bales, [[fed some goats|TheGreatOutdoors]], checked out some pigs and ponies, and picked her first apple (a very crisp, sweet little [[Cortland|http://en.wikipedia.org/wiki/Cortland_%28apple%29]]). She also went mental about 1pm, so we split.
We picked up a nice pair 'o punkins for one smacker on the way back, refueled for about 0.80 smackers a gallon less than usual, and picked up an 8-piece Popeye's chicken dinner for a very late lunch. Bpu demolished the red beans and rice, which she bogarted from her mommie. When informed that the beans would make her stinky, she replied: "Just like daddy!".
She's not wrong.
Last year I really wanted to use [[MadMan II|http://madman.sourceforge.net/]]. I don't remember why. I thought I would build it for win32, or at least port it brokenly. Boy, was that a dumb idea.
But mid dumb idea, the ~MadMan author switched to using the [[gnu Arch revision control system|http://www.gnuarch.org/arch/index.html]] instead of CVS. Tim Mensch had mentioned that Arch might be worth checking out for work, so I asked it out, just as friends. You know. Low expectations.
I gave up on compiling it early, and got the binaries from the wiki. I have a whole list of GnuArchIssues.
The sellers removed a junky carpet from the basement stairs, only to reveal additional asbestos tile. Just like the basement tile they had already removed. The terms of the [[Deal]] specified that no asbestos could be present in the house, so the asbestos guys came back and finished the job, getting paid out of escrow at the title company. Such is HomeImprovementHell in SweetHomeChicago!
Dude! It's CarWars on the Apple][e. Make and level up your car and hunt down the badass bad guy in a final showdown. Or just keep raking in the cash and playing forever.
[[iPu]] and [[Cpu]] doing ok. Baby is happy and healthy, nursing ok, awaiting results of GBS test. 7lb 14 oz. and 21 inches long, February 7, 11:17 pm.
Cpu's bag broke February 7th, 5:15 pm. Cpu contacted MyInlaws, who were in the area working, and they came buy afterwards to watch [[Bpu]]. Early labor persisted until about 8:30 pm. Cpu was pretty active, talking, cooking through contraptions until about 8:00. Dinner, muffins, and a coleslaw salad were made during the day. Not to mention the Bpu needed tending.
I called ChicagoDoula at onset of active labor, about 8:30, and Cpu took a shower while I cleaned up the kitchen and dining room. Then we worked together on hypnosis. Cpu needed a lot of counter pressure, and believed that the baby needed turning. Unable to turn baby with positioning. ChicagoDoula arrived at 9:30 pm, and after about 15 minutes informed us that we should get to the birthing center. In between contraptions, we got Cpu's coat, hat, etc. on. It is very cold here right now. I split extra stuff with ChicagoDoula and put it all in the car.
The GreenChooChoo did not start. Did I mention that it is cold out and my wife is in active labor?
Lucky us, we were able to put everything we needed into MyInlaws' car, and off we went. When we arrived, we parked in a ramp and made our way to the bridge to the hospital.
The bridge was locked shut.
Lucky us, a kind staffer asked us if we needed help. Maybe it was Cpu's screams and her hands-and-knees posture that clued them in. Staffer let us in with their security badge, and off we went. I would like to point out that the security inside the hospital and around the babies is very tight.
We made it to the birthing center, and were greeted by the on-duty midwife and a gaggle of nurses. They could hear us before we made it to the front desk. When they asked 'Cpu, do you think you can make it?', she replied that she couldn't. We skipped the check-in, triage, and any waiting around and went straight to pushing. That meant we didn't have time for antibiotics or pain relief or nuthin.
About an hour and twenty minutes later, baby was almost out. Posterior even. The heartbeat was flagging, so midwife suggested an episiotomy. Amazingly, Cpu was game for it. Could not push out baby. Another cut applied. iPu was out almost all at once on the next contraption, and that was that.
There's more to the story, but I need to eat, shower, and get back to mom and baby.
2007-02-10 Update:
* Cpu points out she didn't wear any mittens, so this was corrected to 'hat'.
* I know the difference between contractions (correct spelling) and contraptions (the usage borrowed from the movie //[[The Snapper|http://www.amazon.com/Snapper-Colm-Meaney/dp/B00005R87D/sr=8-1/qid=1171130296/ref=pd_bbs_sr_1/102-7670289-5060966?ie=UTF8&s=dvd]]//).
* MyInlaws were kind enough to drive me to a nearby car parts store to replace my apparently frozen-solid battery. The GreenChooChoo works well again.
Installed 3dsmax 8 trial version to poke around the new features.
#It doesn't fully support choosing your own install directory (help ends up in default location: who needs help files anyways?)
#Backburner can run custom commands and scripts. Can you say, art build farm?
That's the best part, really; the idea that I can have the equivalent of a render farm running my custom commands on shared files on a fileserver. Dude. Sweet. Now, all that needs to be done is to have them also hooked into the make system so programmers can also generate their files.
I don't. I mean, not really. Not like I could recover from disaster and have all my data intact. Shit, some of the data I 'backed up' onto CD and DVD is already worthless. Discs do get bad with age.
Seriously, who backs up 120gb and 160gb drives? I originally bought my 120 and had it sled-mounted and used it to back up my system/bin partitions and my data partition, only it took 2 whole days to use windows backup utility to do this, and according to MyPops, when it needs to be restored, one hase to first re-install and re-patch windows to the identical patch level it was at when you took the backup. Please. Who tracks this info? I want them dead. I want to punch them.
So if I had [[Raid5|KillsBugsDead]], would I be any better off? Could I rest easy knowing I'd just slap a new drive in? Does win32 + raid controller of your choice know to alert me and bug me? Would it do the right thing, or would it go right on freaking out? Would I have to own like a shitload of extra drives? Wouldn't mirroring be as easy? Certainly any hard-drive-based backup is better than burning off 9gb dual layer discs at 5 smackers a pop. (Doing the math: 150gb / 9gb * 4 smackers is roughly 60 smackers to make a full disc backup.)
It looks like the creators of the [[Ubuntu]] Linux [[Distro]] have forked the [[unhappy arch project|GnuArchIssues]]. Imagine my joy! [[Bazaar|http://bazaar-vcs.org/]] looks like its healthier offspring, integrating the private key encryption crap and who knows what else.
Way back when I originally checked it out, I stalled out CompilingBazaarForWin32. This is no longer a real issue, since the original Bazaar {{{baz.exe}}} was replaced by its python re-interpretation BazaarNG {{{bzr.exe}}}, which is now the mainline AFAIKT.
There are tools for importing Arch {{{tla.exe}}} archives to {{{baz.exe}}} to {{{bzr.exe}}}, but hopefully you never drank the FlavorAid to use {{{tla.exe}}} in serious production in the first place.
Dude, it's like [[they're reading my mind|http://www.bazaar-ng.org/download.html]]. Someone Out There is reading my brain waves with a tuning fork. After an [[insane rant against the shitty system that is Bazaar/TLA|GnuArchIssues]], reading more of the canonical pages yields a Python version. There //is// intellegent life out there!
[[bzr|http://www.bazaar-ng.org/tutorial.html]] is an incomplete replacement for [[Bazaar]], which is in turn the replacement for gnu arch client tla. It's authored in python, is more experimental than [[baz|Bazaar]], but less complete. Let's just say my attempts at using tla in day-to-day use were a failure, with baz being a little better, and bzr more better.
Back in July of 2005, I tried out BazaarNG. It halted immediately on win32 as I followed the tutorial steps for adding a file to source control.
{{{
H:\epu\fumm\.bzr>bzr add -v README
bzr: error: cannot add control file README
at G:\bzr\0.0.5\bzrlib\add.py:74 in smart_add()
see ~/.bzr.log for debug information</blockquote>
}}}
Upgrading to the dev tree fixed the problem, but on my way there, I noticed that there is no RsyncForWin32. Apparently, most users are happy enough with the cygwin version. This is one of MyPetPeeves, which I attempted to resolve. It was VeryDifficult. Building under MSys gives configure error; {{{socklen_t is undefined. No reference to winsock2.h}}} on win32 build. Then it needs to be added to flags somewhere, but don't know how to explicitly include it. {{{-I<path>}}} will handle the dir, but where to include {{{winsock2.h}}}?? I abandoned this.
When you can teach programming, master the innards of the C++ newsgroups, do SCUBA, caving, edit open-source map data for kicks in your free time, travel to foreign lands, program flash games, and still make the remainder of rent via your pirate-themed web site, you know you're good.
Beej has a network programming guide, a guide to taking good photos, and much fine original content on the intertron. And he's pretty rad to hang out with.
According to [[recent keyword activity|http://www.statcounter.com]], I am in the top 10 links for searches on [[gurps meerkat manor|http://www.google.com/search?source=ig&hl=en&rlz=1G1MOBI_ENUS241&q=GURPS%20Meerkat%20Manor&btnG=Google%20Search]].
What blows my mind more than the kind of pencil and paper RPG experience one would have playing meerkats in MeerkatManor with the GURPS system, is that I would find that fun.
* [[hide the .swp and ~ backup files|http://www.vim.org/tips/tip.php?tip_id=20]]
** Remember when you create your local user _vimrc on windoze, you are also clobbering the useful defaults that enable such things as proper syntax highlighting. Migrate your changes into a clone of the default _vimrc, and assign it to your $HOME directory, and all shall be good in the hood. You could probably just source the default windoze one.
My first time playing SheepsHead in almost a year, I did pretty good. By which I mean I was 6th worst. By which I mean, I was best of the night with 38 points up.
MrPathetica invited me over to play. We played 5 handed, called ace, double-on-the-bump, dealer sits, doublers only. Which is just about as close to family rules as can be. I ended up talking them into alternating doublers with leasters, which the two new guys hadn't played before. One guy was a crazy mauer (skilled, tho), and the others were well skilled from college. Granted, MrPathetica and I picked the most, so we might have been just picking before the mauer. By which I mean, the mauer might not have been one. Did I mention we are all from CheeseVille originally, but now live in ChicagoLand?
I got to go alone and win a couple of times: once by the skin of my teeth, and like 3 times with all 4 queens. Having recently recovered from being a sick wreck (by recovered, I mean a dry nose, almost no cough, no fever, no sinus pressure, and no headache), this was amazing. I also managed to not follow suit once, to not know the unknown rules well enough to tell people what to bury, and to not count all the queens more than a few times. I'll attribute it to rusty and luck, since I walked away with the loot.
I washed my hands every time I coughed into them, did not stink up the bathroom, but did have to beg for food since I came straight from work. Thank you for cards, pizza, beer, pretzels, companionship, and a really nice night! And thanks to [[Cpu]] and [[Bpu]] for scheduling alternate events so I could attend.
The Cingular [[V3 RAZR|http://www.planetmotox.net/monster_packs.php]] phone from Cingular I have isn't detected or used by [[BitPim|http://www.bitpim.org/help/]], although I can see the USB modem com port OK. Gave me a good excuse to [[download and install Eclipse|http://www.eclipse.org/downloads/]] and its subversion integration. Imported the source into a new project, and started looking through it. Interesting to see that the python files were generated from a meta-description of phone features. Good design, that.
Since there is already a V3c phone available, it seemed like I should be able to hack out something. I think there's some wierd CDMA vs GSM thing that keeps me from syncing up. Thank you open source community for providing an interesting base of software to hack on! It's nice to know you don't have to start from scratch.
xxoo
-Epu
Update Dec. 28, 2006
* Understand a little more about this, having read [[this bitpim developer-oriented page and its linked content|http://www.bitpim.org/papers/phonespecs/]]. Since bitpim supports Qualcomm chipset and CDMA protocols, unlikely that motorola gsm RAZR would work with it. Wierd, considering the form factor of its CDMA brother is identical externally. Need to find out:
## Is the RAZR v3 gsm actually a Qualcomm chipset?
## Am I really looking for an implementation of ETSI TS 127 as described here?
## Possible to glue in moto-specific features (ie, make same framework for GSM as exists for CDMA?)
Game designers need fresh eyes to see if their game works as designed. There is some overlap in understanding with the terms FocusTesting and MarketResearch, but according to SteveJackson, the rules of BlindTesting are pretty simple. If I find my notes, I can illuminate them further. This is what I took away from Steve's GDC2007 talk:
# Frequently get naive users to play your game and observe the playing session personally.
# Do not help the users ever except to get them unstuck.
# Do not alter the users' impressions of the game. That is your data.
# Note everything that is unintended, and act on it in a new design iteration.
# Interview the users about their experience and cut through the impressions and advice to get to the core design problems. Do not use leading questions that may destroy your data.
Interesting to note that WarrenSpector's company does this once a week. According to SteveJackson, this was mandatory at one point, and when the restriction was removed, everyone still attended.
The Monolith team had a presentation in GDC2007 where they mentioned FocusTesting and MarketResearch. Using some kinds of play testing, they exposed several weaknesses in //F.E.A.R.//. More telling than what they changed based on feedback was that they admitted that the main weaknesses of the game (slapped on story system, for example) were never tested with naive users. I think they probably would have done better if they had augmented these types of testing with BlindTesting.
BlindTesting is frequently informally performed at work, but to see it integrated into the schedule would be interesting.
Oh! Oh! Bpu is my first forked child process, and she is so dreamy. When she's not a pain in the ass. The Bpu-tagged items are all about the ups and downs of having little ones. This lil tiddle is dedicated to all you nannies out there. Nice work, ladies. ;)
[img[picture of bpu|files/bpu.mug.png]]
It was bound to happen: after all, Daddy cuts his own hair.
After trimming Bpu's bangs, there was a quiet period. When I went to investigate, she had indeed cut some bangs and hair herself. Scissors are now kept in the closet.
On the Saturday before New Year's eve, [[Bpu]] and I set out on foot to take the [[brown line|http://en.wikipedia.org/wiki/Brown_Line_%28Chicago_Transit_Authority%29]] to [[Millenium Park|http://www.millenniumpark.org/]] to do some ice skating.
While on the 'L', Bpu and I sat side-by-side, facing the windows. We watched the sky line and talked about the features of the train. She asked about the train's destination marquee, and I told her how it worked. I mentioned that we could make one when we got home. Bpu became very animated about using her safety scissors, to the point that a nearby mother stifled her laughter. As the mother was leaving the train, she wished us luck with our project. I told her we would use our scissors, which brought forth fresh laughter.
When we arrived, I skipped the lengthy line to ask if they rented toddler sizes (yes). Then we prepped for the 60 minute wait for skate rentals by using the men's room. While back in line, the family of 5 in front of us spent the hour in line horsing around and hitting each other (mom and dad hitting each other, children throwing elbows at each other). Bpu, of course, learned to throw an elbow. Although it will be useful if and when she plays hockey, I put a stop to that by saying firmly and loudly that it is never ok for her to hit people. The family did not take the hint.
We played 'tear the living leaves off the tree and throw them into the rink!' which I managed to transform into 'find the fallen leaves and throw them into the planter'. Bpu also threw a fit. We talked it out, and then watched the skaters. I reminded her to leave her hat and mittens on so she would be safe (Bpu loves to feel the ice and throw snow from her skates).
Once we got her rentals and put on our skates (hockey skates, just like Daddy's!), we made our way onto the holiday-weekend-crowded ice. We went for about 2 laps, and the Zamboni came out. And did the ice twice, which in the warm weather, meant waiting 20 minutes into nap time for the water to actually freeze before we could skate again. We spent the time reminiscing about the HomeOfBrianBoitano. After another 2 laps, I was beat and Bpu was slap-happy. But she was very happy.
We took a bathroom break and quick bowl of soup at Subway. I carried Bpu from our 'L' station to the house, as sleep overcame her. We had a really fun outing.
Ah, hell. How do I love thee? Let me enumerate (python range?) the ways:
* Rebuilding the 3dsmax OLE interface functions I depended on at MyLastJob. FromHellsHeartIStabAtTheeMaxscript.
* Using [[python unittest|http://docs.python.org/lib/module-unittest.html]] to verify my library of poorly written utility functions and classes.
* Using [[eclipse|http://www.eclipse.org/downloads/]] and [[PyDev|http://pydev.sourceforge.net/download.html]] with an actual seat of PyDevExtensions to remove errors and warnings and debug classes.
* Author a [[scons|http://www.scons.org/]] data build.
The real trick is that this is pretty much solo, although slightly steered. Besides the python module writing, it's all stuff I've done already at MyLastJob, so it can drag at times. But today was full of the promise of having almost all the pieces together; python interpreter importing the win32com.client calling the 3dsmax ole object's exposed functions, the scons scanner for the animation file enumerating the deps. Just short a couple of builders and scripts. Almost there ...
Hmm, carousel cookies.
Yerba Buena carousel horsies scared Bpu, so she sat down in a sleigh instead with her Grampy and Grammy. Then it was time for splashing in a play pool for like 30 minutes and eating on the lawn behind the Metreon. She's having a fab time.
Game developers, it is no surprise, like BubbleTea drinks. They like burritos. They like getting free 23" ~MicroSoft ~HDTVs. Seriously, J. Allard's keynote speech at GDC gave away 1 of these for every 3 attendees. And I skipped it knowing the speech would be stupid (aka PR poo poo). I wanted a TV bad.
Cpu tells me even if I got one, because MS is on her beat, I'd have to return it. We also agreed that keeping it and regifting it counts as keeping it. I brought it up with my co-workers who worked with me at MyLastJob, since after all, MS is a supplier and publisher we deal with. Can we, as game developers, be bought for the simple price of a free TV?
Oh yes, yes we can.
All my co-workers were talking about the ~TVs. Only one of them checked with his manager, as instructed by our ethics training, to see if it was ok to keep it. Sigh.
Everyone needs this guy; putting together a handrail for your stairs but don't know how to finish it? Ask CarpenterUncle. Got a problem finding the drill bit extension you need, and uncertain if it even exists? Ditto.
Thanks to CarpenterUncle for informally vetting our SweetHomeChicago, along with the other final house candidates.
When I first got my domain, I used enom.com. But years later when prices have gone through the floor for DNS providers, they have not passed that savings on to their customers. Moved to ~GoDaddy.com today, since there were no compelling reasons to stay. MyPops will be a little miffed, since the e-mail aliases we have set up may be disfunctional for a little while. Let's hope not.
To be fair, I did look into sticking with them. There were no price savings, no coupon codes, no customer loyalty efforts. I don't need anything frilly since I keep everything on eta.org and piratehaven.org. Seven bucks is cheaper than twenty-nine, that's it.
Later suckers.
/***
|''Name:''|CheckboxPlugin|
|''Source:''|http://www.TiddlyTools.com/#CheckboxPlugin|
|''Author:''|Eric Shulman - ELS Design Studios|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|''~CoreVersion:''|2.0.10|
Add checkboxes to your tiddler content. Checkbox states can be preserved in the document by either automatically modifying the tiddler content or setting/removing tags on specified tiddlers, or they may be saved as local cookies by assigning an optional 'chkID' to the checkbox. Add custom javascript for programmatic initialization and onClick handling for any checkbox. Also provides access to checkbox DOM element data and tracks the checkbox state in TiddlyWiki's config.options[] internal data.
!!!!!Usage
<<<
The checkbox syntax, including all optional parameters, is contained inside a matched set of [ and ] brackets.
{{{ [x=id(title|tag){init_script}{onclick_script}] }}}
An alternative syntax lets you place the optional parameters ''outside'' the [ and ] brackets, and is provided for backward-compatibility with existing content that may include checkbox definitions based on earlier releases of this plugin:
{{{ [x]=id(title|tag){init_script}{onclick_script} }}}
//{{{
[ ]or[_] and [x]or[X]
//}}}
Simple checkboxes. The current unchecked/checked state is indicated by the character between the {{{[}}} and {{{]}}} brackets ("_" means unchecked, "X" means checked). When you click on a checkbox, the current state is retained by directly modifying the tiddler content to place the corresponding "_" or "X" character in between the brackets
//{{{
[x=id]
//}}}
Assign an optional ID to the checkbox so you can use {{{document.getElementByID("id")}}} to manipulate the checkbox DOM element, as well as tracking the current checkbox state in {{{config.options["id"]}}}. If the ID starts with "chk" the checkbox state will also be saved in a cookie, so it can be automatically restored whenever the checkbox is re-rendered (overrides any default {{{[x]}}} or {{{[_]}}} value). If a cookie value is kept, the "_" or "X" character in the tiddler content remains unchanged, and is only applied as the default when a cookie-based value is not currently defined.
//{{{
[x(title|tag)] or [x(title:tag)]
//}}}
Initializes and tracks the current checkbox state by setting or removing ("TogglyTagging") a particular tag value from a specified tiddler. If you omit the tiddler title (and the | or : separator), the specified tag is assigned to the current tiddler. If you omit the tag value, as in {{{(title|)}}}, the default tag, {{{checked}}}, is assumed. Omitting both the title and tag, {{{()}}}, tracks the checkbox state by setting the "checked" tag on the current tiddler. When tag tracking is used, the "_" or "X" character in the tiddler content remains unchanged, and is not used to set or track the checkbox state. If a tiddler title named in the tag does not exist, the checkbox state defaults to //unselected//. When the checkbox is subsequently changed to //selected//, it will automatically (and silently) create the missing tiddler and then add the tag to it. //''NOTE: beginning with version 2.1.2 of this plugin, the "|" separator is the preferred separator between the title and tag name, as it avoids syntactic ambiguity when ":" is used within tiddler titles or tag names.''//
//{{{
[x{javascript}{javascript}]
//}}}
You can define optional javascript code segments to add custom initialization and/or 'onClick' handling to a checkbox. The current checkbox state (and it's other DOM attributes) can be set or read from within these code segments by reference to the default context-object, 'this'.
The first code segment will be executed when the checkbox is initially displayed, so that you can programmatically determine it's starting checked/unchecked state. The second code segment (if present) is executed whenever the checkbox is clicked, so that you can perform programmed responses or intercept and override the checkbox state based on complex logic using the TW core API or custom functions defined in plugins (e.g. testing a particular tiddler title to see if certain tags are set or setting some tags when the checkbox is clicked).
Note: if you want to use the default checkbox initialization processing with a custom onclick function, use this syntax: {{{ [x=id{}{javascript}] }}}
<<<
!!!!!Configuration
<<<
Normally, when a checkbox state is changed, the affected tiddlers are automatically re-rendered, so that any checkbox-dependent dynamic content can be updated. There are three possible tiddlers to be re-rendered, depending upon where the checkbox is placed, and what kind of storage method it is using.
*''container'': the tiddler in which the checkbox is displayed. (e.g., this tiddler)
*''tagged'': the tiddler that is being tagged (e.g., "~MyTask" when tagging "~MyTask:done")
*''tagging'': the "tag tiddler" (e.g., "~done" when tagging "~MyTask:done")
You can set the default refresh handling for all checkboxes in your document by using the following javascript syntax either in a systemConfig plugin, or as an inline script. (Substitute true/false values as desired):
{{{config.checkbox.refresh = { tagged:true, tagging:true, container:true };}}}
You can also override these defaults for any given checkbox by using an initialization function to set one or more of the refresh options. For example:
{{{[_{this.refresh.container=false}]}}}
<<<
!!!!!Examples
<<<
//{{{
[X] label
[_] label
//}}}
>checked and unchecked static default values
>[X] label
>[_] label
//{{{
[_=demo] label
//}}}
>document-based value (id='demo', no cookie)
>[_=demo] label
//{{{
[_=chkDemo] label
//}}}
>cookie-based value (id='chkDemo')
>[_=chkDemo] label
//{{{
[_(CheckboxPlugin|demotag)]
[_(CheckboxPlugin|demotag){this.refresh.tagged=this.refresh.container=false}]
//}}}
>tag-based value (TogglyTagging)
>[_(CheckboxPlugin|demotag)] toggle 'demotag' (and refresh tiddler display)
>[_(CheckboxPlugin|demotag){this.refresh.tagged=this.refresh.container=false}] toggle 'demotag' (no refresh)
>current tags: <script>return store.getTiddler(story.findContainingTiddler(place).id.substr(7)).tags.toString();</script>
><script label="click to view current tags">alert(store.getTiddler(story.findContainingTiddler(place).id.substr(7)).tags.toString());return false</script>
//{{{
[X{this.checked=true}{alert(this.checked?"on":"off")}] message box with checkbox state
//}}}
>custom init and onClick functions
>[X{this.checked=true}{alert(this.checked?"on":"off")}] message box with checkbox state
Retrieving option values:
config.options['demo']=<script>return config.options['demo']?"true":"false";</script>
config.options['chkDemo']=<script>return config.options['chkDemo']?"true":"false";</script>
!!!!!Installation
import (or copy/paste) the following tiddlers into your document:
''CheckboxPlugin'' (tagged with <<tag systemConfig>>)
<<<
!!!!!Revision History
<<<
2006.05.04 - 2.1.3 fix use of findContainingTiddler() to check for a non-null return value, so that checkboxes won't crash when used outside of tiddler display context (such as in header, sidebar or mainmenu)
2006.03.11 - 2.1.2 added "|" as delimiter to tag-based storage syntax (e.g. "tiddler|tag") to avoid parsing ambiguity when tiddler titles or tag names contain ":". Using ":" as a delimiter is still supported but is deprecated in favor of the new "|" usage. Based on a problem reported by JeffMason.
2006.02.25 - 2.1.0 added configuration options to enable/disable forced refresh of tiddlers when toggling tags
2006.02.23 - 2.0.4 when toggling tags, force refresh of the tiddler containing the checkbox.
2006.02.23 - 2.0.3 when toggling tags, force refresh of the 'tagged tiddler' so that tag-related tiddler content (such as "to-do" lists) can be re-rendered.
2006.02.23 - 2.0.2 when using tag-based storage, allow use [[ and ]] to quote tiddler or tag names that contain spaces:
{{{[x([[Tiddler with spaces]]:[[tag with spaces]])]}}}
2006.01.10 - 2.0.1 when toggling tags, force refresh of the 'tagging tiddler'. For example, if you toggle the "systemConfig" tag on a plugin, the corresponding "systemConfig" TIDDLER will be automatically refreshed (if currently displayed), so that the 'tagged' list in that tiddler will remain up-to-date.
2006.01.04 - 2.0.0 update for ~TW2.0
2005.12.27 - 1.1.2 Fix lookAhead regExp handling for {{{[x=id]}}}, which had been including the "]" in the extracted ID.
Added check for "chk" prefix on ID before calling saveOptionCookie()
2005.12.26 - 1.1.2 Corrected use of toUpperCase() in tiddler re-write code when comparing {{{[X]}}} in tiddler content with checkbox state. Fixes a problem where simple checkboxes could be set, but never cleared.
2005.12.26 - 1.1.0 Revise syntax so all optional parameters are included INSIDE the [ and ] brackets. Backward compatibility with older syntax is supported, so content changes are not required when upgrading to the current version of this plugin. Based on a suggestion by GeoffSlocock
2005.12.25 - 1.0.0 added support for tracking checkbox state using tags ("TogglyTagging")
Revised version number for official post-beta release.
2005.12.08 - 0.9.3 support separate 'init' and 'onclick' function definitions.
2005.12.08 - 0.9.2 clean up lookahead pattern
2005.12.07 - 0.9.1 only update tiddler source content if checkbox state is actually different. Eliminates unnecessary tiddler changes (and 'unsaved changes' warnings)
2005.12.07 - 0.9.0 initial BETA release
<<<
!!!!!Credits
<<<
This feature was created by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]
<<<
!!!!!Code
***/
//{{{
version.extensions.CheckboxPlugin = {major: 2, minor: 1, revision:3 , date: new Date(2006,5,4)};
//}}}
// // 1.2.x compatibility
//{{{
if (!window.story) window.story=window;
if (!store.getTiddler) store.getTiddler=function(title){return store.tiddlers[title]}
if (!store.addTiddler) store.addTiddler=function(tiddler){store.tiddlers[tiddler.title]=tiddler}
if (!store.deleteTiddler) store.deleteTiddler=function(title){delete store.tiddlers[title]}
//}}}
//{{{
config.checkbox = { refresh: { tagged:true, tagging:true, container:true } };
config.formatters.push( {
name: "checkbox",
match: "\\[[xX_ ][\\]\\=\\(\\{]",
lookahead: "\\[([xX_ ])(\\])?(=[^\\s\\(\\]{]+)?(\\([^\\)]*\\))?({[^}]*})?({[^}]*})?(\\])?",
handler: function(w)
{
var lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
{
// get params
var checked=lookaheadMatch[1];
var id=lookaheadMatch[3];
var tag=lookaheadMatch[4];
var fn_init=lookaheadMatch[5];
var fn_click=lookaheadMatch[6];
// create checkbox element
var c = document.createElement("input");
c.setAttribute("type","checkbox");
c.onclick=onClickCheckbox;
c.srcpos=w.matchStart+1; // remember location of "X"
c.container=story.findContainingTiddler(w.output); if (c.container) c.container=c.container.id.substr(7); // tiddler containing checkbox
c.refresh = { };
c.refresh.container=config.checkbox.refresh.container;
c.refresh.tagged=config.checkbox.refresh.tagged;
c.refresh.tagging=config.checkbox.refresh.tagging;
w.output.appendChild(c);
// set default state
c.checked=(checked.toUpperCase()=="X");
// get/set state by ID
if (id) {
c.id=id.substr(1); // trim off leading "="
if (config.options[c.id]!=undefined)
c.checked=config.options[c.id];
else
config.options[c.id]=c.checked;
}
// get/set state by tag
if (tag) {
c.tiddler=c.container;
c.tag=tag.substr(1,tag.length-2).trim(); // trim off parentheses
var pos=c.tag.indexOf("|"); if (pos==-1) var pos=c.tag.indexOf(":");
if (pos==0) { c.tag=tag.substr(1); }
if (pos>0) { c.tiddler=c.tag.substr(0,pos).replace(/\[\[/g,"").replace(/\]\]/g,""); c.tag=c.tag.substr(pos+1); }
c.tag.replace(/\[\[/g,"").replace(/\]\]/g,"");
if (!c.tag.length) c.tag="checked";
var t=store.getTiddler(c.tiddler);
c.checked = (t && t.tags)?(t.tags.find(c.tag)!=null):false;
}
if (fn_init) c.fn_init=fn_init.trim().substr(1,fn_init.length-2); // trim off surrounding { and } delimiters
if (fn_click) c.fn_click=fn_click.trim().substr(1,fn_click.length-2);
c.init=true; c.onclick(); c.init=false; // compute initial state and save in tiddler/config/cookie
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
}
}
)
//}}}
//{{{
function onClickCheckbox()
{
if (this.fn_init)
// custom function hook to set initial state (run only once)
{ try { eval(this.fn_init); this.fn_init=null; } catch(e) { displayMessage("Checkbox init error: "+e.toString()); } }
else if (this.fn_click)
// custom function hook to override or react to changes in checkbox state
{ try { eval(this.fn_click) } catch(e) { displayMessage("Checkbox click error: "+e.toString()); } }
if (this.id)
// save state in config AND cookie (only when ID starts with 'chk')
{ config.options[this.id]=this.checked; if (this.id.substr(0,3)=="chk") saveOptionCookie(this.id); }
if ((!this.id || this.id.substr(0,3)!="chk") && !this.tag) {
// save state in tiddler content only if not using cookie or tag tracking
var t=story.findContainingTiddler(this); if (t) {
var t=store.getTiddler(t.id.substr(7));
if (this.checked!=(t.text.substr(this.srcpos,1).toUpperCase()=="X")) { // if changed
t.set(null,t.text.substr(0,this.srcpos)+(this.checked?"X":"_")+t.text.substr(this.srcpos+1),null,null,t.tags);
store.setDirty(true);
}
}
}
if (this.tag) {
var t=store.getTiddler(this.tiddler);
if (!t) { t=(new Tiddler()); t.set(this.tiddler,"",config.options.txtUserName,(new Date()),null); store.addTiddler(t); }
var tagged=(t.tags && t.tags.find(this.tag)!=null);
if (this.checked && !tagged) { t.tags.push(this.tag); store.setDirty(true); }
if (!this.checked && tagged) { t.tags.splice(t.tags.find(this.tag),1); store.setDirty(true); }
// if tag state has been changed, force a display update
if (this.checked!=tagged) {
if (this.refresh.tagged) story.refreshTiddler(this.tiddler,null,true); // the TAGGED tiddler
if (this.refresh.tagging) story.refreshTiddler(this.tag,null,true); // the TAGGING tiddler
}
}
// refresh containing tiddler (but not during initial rendering, or we get an infinite loop!)
if (!this.init && this.refresh.container && this.container!=this.tiddler)
story.refreshTiddler(this.container,null,true); // the tiddler CONTAINING the checkbox
return true;
}
//}}}
You know, people from Wisconsin. Or ardant and loyal followers of the Green Bay Packers. Um, usually the former are always the latter, so it's nearly synonymous. [[More about that|http://en.wikipedia.org/wiki/Cheese_Head]].
I'm talking about [[Wisconsin|http://en.wikipedia.org/wiki/Wisconsin]], but more than that, the nation of cheese which produces CheeseHeads.
ChicagoDoula is a licensed hypno-therapist, a registered nurse, and otherwise useful doula. Luckily she recognized [[Cpu]] was in transition and ready to go to the hospital, or we might have had our baby [[iPu]] in the car!
[[Clinton Keith|http://www.agilegamedevelopment.com/blog.html]] is a tireless advocate for Agile development, which I like hearing about but have no experience with. We have former HighMoon employees at work, so there's talk of adopting some practices.
CloisterMagic Is the name of my first DwarfFortress. I just took a bunch of screens with the very cool [[3dwarf utility|http://www.bay12games.com/cgi-local/ultimatebb.cgi?ubb=get_topic&f=2&t=001450]]. I suppose I should take some ascii screens at some point as well.
It started out by following the wiki tutorial:
* Customized starting dwarves based on their preferences
** One engraver noble carpenter. Damn does she like to polish the place up. I have to disable engraving, or else she won't chop wood.
** One mechanic craftsman. He's not a very good worker.
** One soldier miner. He's the best.
** One miner soldier. Kind of a drunkard.
** One bowyer blacksmith. Pretty busy.
** One farmer/brewer.
** One brewer/cook.
I took my sweet time picking the site, needed hills and woods. I don't think there's any magma. It turns out it has a huge bottomless chasm in the southeast. No pics of that yet.
And when I got there, I burrowed into a plateau and walled off the top. There are 3 stairwells:
* There's one doored-off stairwell from ground level to plateau, and it leads to a trapped-up entry hall. It's the only way in currently.
* There's the east and west stairs. They provide most access to the workshops.
* There's the central stairs that lead to the foundries and the mines.
I've got 24 dwarves now, and am starting to specialize them. I keep them full of beer, but someone keeps eating the PlumpHelmets instead of all the prepared food I've made them. So they tend to go around to the river every now and again when the beer is out. I built a complete road with stairs and a bridge to take them to the river by the most direct route, but I'm going to end up diverting the river and making a well if I can figure out how.
It's slow going because I keep pausing as the number of idlers hits 3 or more. And I keep having to go back to the manual and wiki.
MrFortressCrackMaster and I agree that some Civ-like advisors or tutorial pages that can be disabled would be a welcome addition. That way, instead of working through the wiki, you could stay in the game and get prompted to build features your dwarves clearly needed.
Stuck. Got pre-reqs on the download page:
*gettext - available through gnuwin32 on sourceforge, an easy .exe install.
*Gnupg requires updating probably to later revision.
*Libgpgme also avail easy.
*Lib neon, took me awhile to figure out that maybe it's the library for webdav.
**No, I didn't read INSTALL.txt yet.
Sigh. GPG fails to build. Maybe there is a patch or better instructions than 'configure/make' under MinGW.
{{{
In file included from ../include/util.h:28,
from gpgkeys_finger.c:45:
../include/types.h:51: warning: redefinition of `byte'
g:/MinGW/include/rpcndr.h:50: warning: `byte' previously declared here
gcc -g -O2 -Wall -o gpgkeys_finger.exe gpgkeys_finger.o ksutil.o ../util/libutil.a -lwsock32
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../intl -g -O2 -Wall -MT gpgkeys_http.o -MD -MP
-MF ".deps/gpgkeys_http.Tpo" -c -o gpgkeys_http.o gpgkeys_http.c; \
then mv -f ".deps/gpgkeys_http.Tpo" ".deps/gpgkeys_http.Po"; else rm -f ".deps/gpgkeys_http.Tpo"; exit 1; fi
gcc -g -O2 -Wall -o gpgkeys_http.exe gpgkeys_http.o ksutil.o ../util/libutil.a -lwsock32
make[2]: Leaving directory `/h/epu/cvsroot/gnupg-1.4.1/keyserver'
Making all in po
make[2]: Entering directory `/h/epu/cvsroot/gnupg-1.4.1/po'
make[2]: *** No rule to make target `all'. Stop.
make[2]: Leaving directory `/h/epu/cvsroot/gnupg-1.4.1/po'
}}}
Also, libgpgme fails to configure under MSys with:
{{{
checking for ttyname_r... no
configure: WARNING:
***
*** ttyname() is not thread-safe and ttyname_r() does not exist
***
checking whether we are using the GNU C Library 2.1 or newer... no
checking for getenv_r... no
configure: WARNING:
***
*** getenv() is not thread-safe and getenv_r() does not exist
***
checking for timegm... no
configure: WARNING:
***
*** timegm() not available - a non-thread-safe kludge will be used
*** and the TZ variable might be changed at runtime.
***
checking for gpg-error-config... no
checking for GPG Error - version >= 0.5... no
configure: error: libgpg-error was not found
}}}
Worse, jumping into the tarball dist of Bazaar and running configure is the following:
{{{
The configured versions of diff and diff3 do not handle files
not ending in newline correctly.
configured diff = diff.
configured diff3 = diff3.
Use config options
--with-gnu-diff PROG
--with-gnu-diff3 PROG
NOTE: especially on BSD-derived systems, you will want
to grab a recent version of GNU diff and compile it for use
with those config options. You don't need to replace
the native diff tools on your system, but you do need to
configure tla specially. Sorry about that -- some BSDs
have made a poor decision about their native diffs.
(Example systems: some NetBSD, FreeBSD, and MacOS versions.)
}}}
At least everything's verbose.
SULU, it turns out, is easy to download but hard to make. Ended up grabbing most of the gtk win32 packages, installing to GnuWin32 root directory, and learning all about pkg-config. Replaced some makefile vars (using MinGW make) and added missing include directories (libusb-win32-version/src). Yay LibUsb-Win32. I'm linking against libusb-win32 filter driver.
Still short a few fixes before it builds; popt isn't mentioned as a dependancy. The only hard problem I've had is that there's no win32 version of scandir and alphashort, but I think I replaced them ok with a working win32 implementation from [[VideoLanClient]].
When I run [[SULU]] on the commandline, now I'm getting output:
{{{
found 5 busses
found 5 busses
ERROR: uproar_open usb_claim_interface failed
ERROR: uproar_open could not claim interface 0, error: The paramet
rrect.
NO MP3 DEVICE STRING
}}}
Though everything compiles, I'm stuck and need to debug. And I don't have a god-damn free GUI debugger for windows. Actually, I do in Eclipse. But I feel stuck stuck stuck.
I loves me some puter. Between my day job exercising my [[Gamefu]] and my night job as a slouch potato, I spend probably 12 hours average a day parked in the glare of the monitors. The Compu tagged items are all software, hardware, or compu-torially related. This lil tiddle is dedicated to my real-life partner, ironically also named [[Cpu]]. Cpu, this one's for you ;)
Towel. Toel. Touel.
To [[Bpu]], in March of 2005, a chair pad is a towel, but so is a dish-cloth. Hiding something under a towel amuses Bpu; she and [[Cpu]] played the 'which towel is the thing under' game, and Bpu never got it wrong. She's a big girl. It's still a fun game for her. (Note: as of August 2006, Bpu is //way// beyond this game.)
She also went went went to mommy today when she came home, chanting the Counter-Strike litany 'Go Go Go!' as she crawled. And then she sank her head onto mommy's lap instead of the customary stop 2 feet away. Good times.
I love [[my lady Cpu|http://tessence.blogspot.com/]]. We're married, and have little [[Bpu]] to keep us company. We're having another soon! The Cpu-tagged items are all about espousing spouse-dom, with praise and gripes tossed in. This lil tiddle is dedicated to all you married and soon-to-be-married men out there, and you ladies who stand by them. :/
When we moved into SweetHomeChicago to engage in some serious HomeImprovementHell, [[Cpu]] mandated that I was not to reassemble and use the ShuttleXPC until our major improvement goals were complete.
Since I am a serious computing enthusiast, this seemed reasonable; otherwise, it was likely I would be reading various posts, spending time trying out new software, and otherwise pussy-footing around. We got quite a bit accomplished, but it drove me nuts and actually expired some free services I belong to. It also kept me from changing addresses of important financial and other services.
I would not advocate this to other computer addicts, unless faced with a similar life-threatening decision.
Much of this was addressed by the short time AussieUncle spent helping us out:
* busting up the MoldyPlasterBasementWall and replacing it with an insulated wall covered with fibrous backer board and mortar.
* opening up some big holes to help VentTheCrawlSpace
* buying a dehumidifier and running a hose from it right into the sewer.
* scraping, bleaching, and mopping the basement walls and floor.
** Doubled as cleaning up all the plaster dust which was foolishly left everywhere after tearing out the wall.
MyNewHome used to have lead-based paint in the window wells, and [[Cpu]] forbade the opening and closing of the windows, since the friction was sure to release lead dust. That was one hot summer. So hot that MyInlaws defied her when they would visit. Not to her face, though.
Sure to avoid the same problem in our next home, as part of HomeImprovementHell on SweetHomeChicago, we immediately had the DeadlyLeadWindows tested by a LeadRemediationCompany, and budgeted for a window company to replace them. Yay for EnergyEfficientDoubleHungWindows!
We took the Deal on the house, and are awaiting inspections. If all goes well, we'll close mid May. [[Cpu]] has been very diligent with hunting down the best mortgage via the intertron and a broker. [[Bpu]] cannot wait to have a garden. After all, this Easter she did get a basket full of seeds and gardening tools. From the Target Easter Bunny, no less.
Not to jinx anything, but we penned our half of the signatures on the contract this Friday, April 13. Yeesh.
[[Cpu]] and I are getting ready to place a bid on a house. We've decided on the neighborhood. We brought in the expert family members to help us decide among the top 3 contenders. We're very very sure, and want this to be the one.
This will be different from MyOldHome and MyNewHome in a few ways:
* No ([[asshole|UpstairsNeighborFromHell]] or nice) co-owners to deal with.
* Spensive. The house-to-be's asking price is about 100,000 smackers more, or 400 smackers more a month than we pay now. Lucky for me, I just got TheTVThatWasntARaise.
* Further from direct-route-to-[[CheeseVille]].
* Further from work.
* Further from known friends.
I will also have to come up with an entertaining name for the new-new home.
A Linux [[Distro]] that lives and dies by its sole use of FreeSoftware. NonFreeSoftware is disabled by default by Debian. I ran the Debian Gnu/Linux operating system as my sole operating system for two years. It wasn't painless, but I was able to get by with a little help from my friends. (Thank you DiscoStu and [[Mr3d]] and [[Beej]] for helping me through my Linux growing pains!). At first, doing most things were VeryDifficult compared to win32. But I soon learned some ImportantLinuxSkills and WhatLinuxCanDoForYou.
#[ ] Clean off my table, set up my sewing machine
##[ ] rip CD-ROM to mp3. Archive disc image, mp3. Move CD-ROM to binder.
##[X] super-glue ornaments
##[X] sew head back on charles dickens
##[X] drill out caterpillar rocker and replace handle - Thanks CarpenterUncle!
##[ ] hang art
##[ ] select choice photos for frames.
#[_] make VideoGameCoasters. Need to figure out what that plastic shit is that we used to embed bugs and stuff in. This is made from a 2 part plastic.
#[_] Make hanging art system out of squares of plywood, plexy.
##[_] Move eraseboard to such.
##[_] Add nick-nacks to such.
#[_] Add paper organizer or rack to office wall.
#[_] [[Capture some tapes|http://www.thinkgeek.com/computing/drives/7a8d/]]
##[_]Send more tapes to Nicole
#[_] Make MyUnattendedXPProCD so I can nuke PC whenever. Get some sweet Raid5 to boot.
#[_] Hook PS2 up to bedroom TV.
#[_] make xU rolling rack, or hang rack from desk. put printer on top, and make a low-power consumption case for the aged athalon. get a xU power supply.
#[_] make a raid-5 hot-swap xU rack mount storage box.
Do yourself a favor and use the [[ptkdb GUI debugger|http://search.cpan.org/dist/Devel-ptkdb/ptkdb.pm]]. Then you can set break points, watches, evaluate expressions. etc. Will speed up your development tons.
NoPlinkRsyncForYou
FuckingPythonThreads
MyNewHome
The skin inside your eyeball, the part that light falls onto and your brain interprets as an image? You can get hit in the head hard enough that it peels itself off. If it peels past the middle where light focuses on the optic nerve (the Macula?), you are fucked for reading. Then you lose your vision. The more damage you see, the more bad it is. Seriously.
For god's sake, if you're reading this because you think you have a detached retina, call the emergency room or your doctor. If they don't listen to you, call a different doctor.
DS used to sit behind me at MyLastJob. He taught me the arcane ways of Perl, AptGetUpdate and AptGetUpgrade. He showed me NetHack. He also personally executed the MostBrilliantOldSchoolHack I have ever witnessed.
Short for 'linux distribution'. Typically used by linux dorks to compare their flavors of linux to one another. Slackware, [[Debian|DebianGnuLinux]], ~RedHat, and [[Ubuntu]] are examples of distros.
[[Cpu]] and I decided to replace our StupidKitchenFloor in our SanFranciscoTIC with a DoItYourselfTileFloor.
If you ever become convinced that it is time to install your own tile floor, I have a few tips for you.
*Get help. Tiling anything takes a lot of steps. You can get it done more quickly if you can ==trick== bribe your co-workers and family into helping you.
*Take vacation time off to do it. Start on a long weekend and take a few more vacation days. Otherwise, the project can drag on forever just like ours did.
*Have a LicensedTherapist ready for the fallout.
[[Cpu]] and I were very proud of our ~DIY-ness, and the floor looked great too. But we scratched our new HardwoodFloor with the refridgerator and oven (which were stored in the hall). The bad planning, MyAnalAttentionToDetail, and the inability to use our home also really stressed our relationship.
Oh internet, what have I done? I screwed it all up. I'm so sorry. Please come back to me. Do you miss me? Why don't you call? I didn't mean to hurt you. You were hurting my bottom line, but I never thought you'd really leave me.
----------
The internet is down. I cut the umbilical. Yes, it was leeching 65 smackers a month from me, but I was leeching sweet, sweet files. Music. Movies. Porn. News. E-mail. Updated FreeSoftware.
I didn't realize what it was like, no internet. I mean, Cpu has this thing where she has to look at her e-mail all the time. But sans-internet, I almost never went to my computer desk.
They say that a modem is in the mail. The alleged service begins April 1. But, what if it is all some cruel April Fools' joke?
[[Dwarf Fortress|http://www.bay12games.com/dwarves/]] was introduced to me by MrFortressCrackMaster.
To the Apple ][ and linux lover in me, DwarfFortress is like TheSims meets LordOfTheRings (just the dwarves). So, I'm pretty much hooked. It took me right off of TeamFortress2.
The funniest part, is that if I were playing [[TF2|TeamFortress2]], I think [[Cpu]] would understand and consent every so often. But DwarfFortress keeps me at the computer late and has so little polish, I think it's earning me NegativeKarma.
Check out this [[web-based muti-resolution favicon generator|http://www.html-kit.com/favicon/]]. I made my favicon image in TheGimp, and uploaded it. Looks pretty good!
*The [[webmonkey favicon reference|http://www.webmonkey.com/templates/print_template.htmlt?meta=/webmonkey/01/18/index1a_meta.html]] is pretty useful.
*TheGimp isn't so good at making or loading multi-resolution windows icon files (.ICO). The documentation for .ICO saving is non-existant, as of Gimp 2.2 win32.
{{{easy_install mercurial
}}}
It just works. Well, it installs ok. We'll see if it works.
Why bother? It turns out [[UcheOgbuji]] has [[sent out a call to arms|http://xml3k.org/Roadmap]] to the open source community. His business partners and he are getting paid to work on [[AmaraXML]], but asked if the open source community wouldn't consider helping port unittests and do some grunt work for a pre-py3k release of Amara 2.0. As a shameless user of Amara, I would certainly appreciate the estimated 300% speedup, which might put it on par with cElementTree. Uche has decided that the new Amara work will be checked into a Mercurial repository. To be fair, it was between my favorite armchair-qb project [[Bazaar]] and [[Mercurial]], both python-implemented SourceControlManagement systems.
Which brings me back to why bother. Yesterday, I fixed up my python install to default its compiles to MinGW. Yes, I had to [[follow the instructions|http://www.mingw.org/MinGWiki/index.php/Python%20extensions]] to build my own version of libpython25.a - by all accounts on the web, this shouldn't really be required anymore (yet it is! Thanks a lot, ActiveState). I did this to get cElementTree at home. And yes, it builds and runs fine using easy_install now, which is rad rad rad! So now that native compiles work, I figured why not just go for trying an easy_install of [[Mercurial]] tonight? If it has binary dependencies (it doesn't seem to), it would be straight-forward to build (it was).
How often does that happen?
I'm trying to fix and debug [[Bugzilla|http://www.bugzilla.org]] bug imports and LDAP functionality at work. I merged an already existing (and already expired!) LDAP patch into the CVS #head revision, but it bombs out. I spent more than 8 hours so far trying to figure out why such a tiny change breaks in such a big way.
It turns out that debugging perl CGI scripts in the inspect-on-the-fly in-an-IDE sense is VeryDifficult. At least, more than 8 hours of fiddling with Eclipse, Apache, Bugzilla says so. I have to say, finally having configured Eclipse to show me the state of the running CGI script on my localhost gives me hope that I can use a fully-featured IDE to debug such a beast. Now if I can just figure out how to pass a POST to the script using the UI ...
Incidentally, a Google search for Bugzilla pops up a quick link to a competing product with the tagline "Think Bugzilla is Free? Think again." Seems like they're intentionally confusing free as in beer and free as in speech. Poor bastards. The fact that I can fix our install ourselves is a real life-saver. I can only imagine waiting for fixes on source I never have the right to modify.
A great free IDE that can debug python, perl, php, lua, c++/c, java, and probably a fuckload more languages. It's a great (but sometimes wonky) swiss-army-knife of programmer-hood for windoze lusers like [[yours truly|Epu]]
This Saturday, we went to get paint samples and primer from a local paint store near Milwaukee and Addison. It was about 11:15 am when we left, but the fam was hungry. Afterwards, we had planned on going to Target and then onwards to HotDougs for some fine encased meats and duck fat fries. Well, we switched up, guessing there was going to be a line at HotDougs.
Good move. There //was// already a line at 11:20 am. Game sausage of the week: Smoked Rattlesnake Sausage with Black Currant Mustard and Vodka Currant Cheese. Too many smackers for a grilled sausage, so [[Cpu]] and I opted for splitting Smoked Shrimp and Pork Sausage with Creamy Creole Mustard and Fontina Cheese, and a duck-bacon-blue-cheese one that is no longer listed on the web site. And duck-fat fries. [[Bpu]] went for a kid's meal of bagel dogs and tater tots. I had a nice GingerBeer and they split an apple juice.
There was a pretty big Cubs pre-game crowd there, and we didn't see any outside dining, but some of our line-mates did disappear somewhere. Good times.
Me? I run this joint. And I spend //at least// as many hours inside my own skull as I do on the [[Compu]]. The Epu-tagged items are all about me me me. This lil tiddle is dedicated to coffee and all you late-nighters out there. Late-nighters, keep it caffinated :]
You can get ahold of me via e-mail. epu AT piratehaven DOT org
Where does the nickname come from? Ages ago, a Cogswell alumni had a video game testing job with me, late nights from like 10:30 PM until 2:00 PM at MyLastJob. During one poorly remembered, ill-fated, MountainDew inspired, slap happy evening, he fused our no-longer-deemed-strange obsession with Pokemon and some dog-poo-on-my-shoe into a nick. He had been calling me 'E'. Then, E-poo. Shortened to Epu, my pokemon monster alter-ego.
Ah, the project that never dies.
* CAT5e wall jacks are run to the living room and kitchen desk areas.
** Makes it easy to hook up the laser printer and the computers.
** Good throughput and file sharing.
** Reliable internet connection.
** All hubs, routers, modems, and a shit-ton of cables are in the walls and basement, not in my living room and kitchen and so-on.
* Homerun to attic needs to be completed.
** Self-augering bit still stuck in the 4x4 between 1st and 2nd floors.
** Finally bought a 12-inch Irwin quick-release drillbit extension to finish this, when I should have bought a 3 or 4 foot flex bit to begin with.
** Have huge holes in my bedroom and the basement stairs wall where the wire needs to be pulled to attic.
* Drops to upstairs rooms need to be completed.
* 16 port switch needs to be bought and installed.
/***
|Name|ExportTiddlersPlugin|
|Source|http://www.TiddlyTools.com/#ExportTiddlersPlugin|
|Version|2.4.1|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|select and extract tiddlers from your ~TiddlyWiki documents and save them to a local file|
When many people edit copies of the same TiddlyWiki document, the ability to easily copy and share these changes so they can then be redistributed to the entire group is very important. This ability is also very useful when moving your own tiddlers from document to document (e.g., when upgrading to the latest version of TiddlyWiki, or 'pre-loading' your favorite stylesheets into a new 'empty' TiddlyWiki document.)
ExportTiddlersPlugin let you ''select and extract tiddlers from your ~TiddlyWiki documents and save them to a local file'' or a remote server (requires installation of compatible server-side scripting, still under development...). An interactive control panel lets you specify a destination, and then select which tiddlers to export. A convenient 'selection filter' helps you pick desired tiddlers by specifying a combination of modification dates, tags, or tiddler text to be matched or excluded. ''Tiddler data can be output as ~TiddlyWiki "storeArea ~DIVs" that can be imported into another ~TiddlyWiki or as ~RSS-compatible XML that can be published for RSS syndication.''
!!!!!Inline interface (live)
<<<
<<exportTiddlers inline>>
<<<
!!!!!Usage
<<<
Optional "special tiddlers" used by this plugin:
* SiteUrl^^
URL for official server-published version of document being viewed (used in XML export)
default: //none//^^
* SiteHost^^
host name/address for remote server (e.g., "www.server.com" or "192.168.1.27")
default: //none//^^
* SitePost^^
remote path/filename for submitting changes (e.g., "/cgi-bin/submit.cgi")
default: //none//^^
* SiteParams^^
arguments (if any) for server-side receiving script
default: //none//^^
* SiteNotify^^
addresses (if any) for sending automatic server-side email notices
default: //none//^^
* SiteID^^
username or other authorization identifier for login-controlled access to remote server
default: current TiddlyWiki username (e.g., "YourName")^^
* SiteDate^^
stored date/time stamp for most recent published version of document
default: current document.modified value (i.e., the 'file date')^^
<<<
!!!!!Example
<<<
<<exportTiddlers>>
<<<
!!!!!Installation
<<<
Import (or copy/paste) the following tiddlers into your document:
''ExportTiddlersPlugin'' (tagged with <<tag systemConfig>>)
create/edit ''SideBarOptions'': (sidebar menu items)
^^Add {{{<<exportTiddlers>>}}} macro^^
<<<
!!!!!Revision History
<<<
''2007.07.16 [2.4.1]'' in exportTWHeader(), reset HTML source 'markup' so installed markup is NOT copied to new file.
''2007.06.30 [2.4.0]'' added "select related tiddlers" feature. Recursively scans the tiddler links[] info to find all tiddlers referenced by any of the currently selected tiddler, and then selects them all (including the original tiddlers). ''//Theoretically//'', selecting all related tiddlers should ensure that the exported file contains all tiddlers needed to properly render all of the originally selected tiddlers.
''2007.04.19 [2.3.0]'' in exportData(), pass SiteURL value as param to saveToRss(). Fixes 'undefined' appearing in tiddler link in XML output. Also, in refreshExportList(), added 'sort by tags'. Also, added 'group select'... selecting a heading (date,author,tag) auto-selects all tiddlers in that group.
''2007.03.02 [2.2.6]'' in onClickExportButton(), when selecting open tiddlers for TW2.2, look for "storyDisplay" instead of "tiddlerDisplay" but keep fallback to "tiddlerDisplay" for TW2.1 or earlier
''2007.03.01 [2.2.5]'' removed hijack of store.saveChanges() (was catching save on http:, but there are other solutions that do a much better job of handling save to server.
|please see [[ExportTiddlersPluginHistory]] for additional revision details|
''2005.10.09 [0.0.0]'' development started
<<<
!!!!!Credits
<<<
This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]
<<<
!!!!!Code
***/
// // version
//{{{
version.extensions.exportTiddlers = {major: 2, minor: 4, revision: 1, date: new Date(2007,7,16)};
//}}}
// // macro handler
//{{{
config.macros.exportTiddlers = {
label: "export tiddlers",
prompt: "Copy selected tiddlers to an export document",
newdefault: "export.html",
datetimefmt: "0MM/0DD/YYYY 0hh:0mm:0ss" // for "filter date/time" edit fields
};
config.macros.exportTiddlers.handler = function(place,macroName,params) {
if (params[0]!="inline")
{ createTiddlyButton(place,this.label,this.prompt,onClickExportMenu); return; }
var panel=createExportPanel(place);
panel.style.position="static";
panel.style.display="block";
}
function createExportPanel(place) {
var panel=document.getElementById("exportPanel");
if (panel) { panel.parentNode.removeChild(panel); }
setStylesheet(config.macros.exportTiddlers.css,"exportTiddlers");
panel=createTiddlyElement(place,"span","exportPanel",null,null)
panel.innerHTML=config.macros.exportTiddlers.html;
exportShowPanel(document.location.protocol);
exportInitFilter();
refreshExportList(0);
return panel;
}
function onClickExportMenu(e)
{
if (!e) var e = window.event;
var parent=resolveTarget(e).parentNode;
var panel = document.getElementById("exportPanel");
if (panel==undefined || panel.parentNode!=parent)
panel=createExportPanel(parent);
var isOpen = panel.style.display=="block";
if(config.options.chkAnimate)
anim.startAnimating(new Slider(panel,!isOpen,e.shiftKey || e.altKey,"none"));
else
panel.style.display = isOpen ? "none" : "block" ;
if (panel.style.display!="none") refreshExportList(0); // update list when panel is made visible
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return(false);
}
//}}}
// // IE needs explicit scoping for functions called by browser events
//{{{
window.onClickExportMenu=onClickExportMenu;
window.onClickExportButton=onClickExportButton;
window.exportShowPanel=exportShowPanel;
window.exportShowFilterFields=exportShowFilterFields;
window.refreshExportList=refreshExportList;
//}}}
// // CSS for floating export control panel
//{{{
config.macros.exportTiddlers.css = '\
#exportPanel {\
display: none; position:absolute; z-index:12; width:35em; right:105%; top:6em;\
background-color: #eee; color:#000; font-size: 8pt; line-height:110%;\
border:1px solid black; border-bottom-width: 3px; border-right-width: 3px;\
padding: 0.5em; margin:0em; -moz-border-radius:1em;\
}\
#exportPanel a, #exportPanel td a { color:#009; display:inline; margin:0px; padding:1px; }\
#exportPanel table { width:100%; border:0px; padding:0px; margin:0px; font-size:8pt; line-height:110%; background:transparent; }\
#exportPanel tr { border:0px;padding:0px;margin:0px; background:transparent; }\
#exportPanel td { color:#000; border:0px;padding:0px;margin:0px; background:transparent; }\
#exportPanel select { width:98%;margin:0px;font-size:8pt;line-height:110%;}\
#exportPanel input { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%; }\
#exportPanel textarea { width:98%;padding:0px;margin:0px;overflow:auto;font-size:8pt; }\
#exportPanel .box { border:1px solid black; padding:3px; margin-bottom:5px; background:#f8f8f8; -moz-border-radius:5px; }\
#exportPanel .topline { border-top:2px solid black; padding-top:3px; margin-bottom:5px; }\
#exportPanel .rad { width:auto;border:0 }\
#exportPanel .chk { width:auto;border:0 }\
#exportPanel .btn { width:auto; }\
#exportPanel .btn1 { width:98%; }\
#exportPanel .btn2 { width:48%; }\
#exportPanel .btn3 { width:32%; }\
#exportPanel .btn4 { width:24%; }\
#exportPanel .btn5 { width:19%; }\
';
//}}}
// // HTML for export control panel interface
//{{{
config.macros.exportTiddlers.html = '\
<!-- output target and format -->\
<table cellpadding="0" cellspacing="0"><tr><td width=50%>\
export to\
<select size=1 id="exportTo" onchange="exportShowPanel(this.value);">\
<option value="file:" SELECTED>this computer</option>\
<option value="http:">web server (http)</option>\
<option value="https:">secure web server (https)</option>\
<option value="ftp:">file server (ftp)</option>\
</select>\
</td><td width=50%>\
output format\
<select id="exportFormat" size=1>\
<option value="DIV">TiddlyWiki export file</option>\
<option value="TW">TiddlyWiki document</option>\
<option value="XML">RSS feed (XML)</option>\
</select>\
</td></tr></table>\
\
<!-- export to local file -->\
<div id="exportLocalPanel" style="margin-top:5px;">\
local path/filename<br>\
<input type="text" id="exportFilename" size=40 style="width:93%"><input \
type="button" id="exportBrowse" value="..." title="select or enter a local folder/file..." style="width:5%" \
onclick="this.previousSibling.value=window.promptForExportFilename(this);">\
<!--<input type="file" id="exportFilename" size=57 style="width:100%"><br>-->\
</div><!--panel-->\
\
<!-- export to http server -->\
<div id="exportHTTPPanel" style="display:none;margin-top:5px;">\
<table><tr><td align=left>\
server location, script, and parameters<br>\
</td><td align=right>\
<input type="checkbox" class="chk" id="exportNotify"\
onClick="document.getElementById(\'exportSetNotifyPanel\').style.display=this.checked?\'block\':\'none\'"> notify\
</td></tr></table>\
<input type="text" id="exportHTTPServerURL" onfocus="this.select()"><br>\
<div id="exportSetNotifyPanel" style="display:none">\
send email notices to<br>\
<input type="text" id="exportNotifyTo" onfocus="this.select()"><br>\
</div>\
</div><!--panel-->\
\
<!-- export to ftp server -->\
<div id="exportFTPPanel" style="display:none;margin-top:5px;">\
<table cellpadding="0" cellspacing="0" width="32%"><tr valign="top"><td>\
host server<br>\
<input type="text" id="exportFTPHost" onfocus="this.select()"><br>\
</td><td width="32%">\
username<br>\
<input type="text" id="exportFTPID" onfocus="this.select()"><br>\
</td><td width="32%">\
password<br>\
<input type="password" id="exportFTPPW" onfocus="this.select()"><br>\
</td></tr></table>\
FTP path/filename<br>\
<input type="text" id="exportFTPFilename" onfocus="this.select()"><br>\
</div><!--panel-->\
\
<!-- notes -->\
notes<br>\
<textarea id="exportNotes" rows=3 cols=40 style="height:4em;margin-bottom:5px;" onfocus="this.select()"></textarea> \
\
<!-- list of tiddlers -->\
<table><tr align="left"><td>\
select:\
<a href="JavaScript:;" id="exportSelectAll"\
onclick="onClickExportButton(this)" title="select all tiddlers">\
all </a>\
<a href="JavaScript:;" id="exportSelectChanges"\
onclick="onClickExportButton(this)" title="select tiddlers changed since last save">\
changes </a> \
<a href="JavaScript:;" id="exportSelectOpened"\
onclick="onClickExportButton(this)" title="select tiddlers currently being displayed">\
opened </a> \
<a href="JavaScript:;" id="exportSelectRelated"\
onclick="onClickExportButton(this)" title="select all tiddlers related (by link or transclusion) to the currently selected tiddlers">\
related </a> \
<a href="JavaScript:;" id="exportToggleFilter"\
onclick="onClickExportButton(this)" title="show/hide selection filter">\
filter </a> \
</td><td align="right">\
<a href="JavaScript:;" id="exportListSmaller"\
onclick="onClickExportButton(this)" title="reduce list size">\
– </a>\
<a href="JavaScript:;" id="exportListLarger"\
onclick="onClickExportButton(this)" title="increase list size">\
+ </a>\
</td></tr></table>\
<select id="exportList" multiple size="10" style="margin-bottom:5px;"\
onchange="refreshExportList(this.selectedIndex)">\
</select><br>\
</div><!--box-->\
\
<!-- selection filter -->\
<div id="exportFilterPanel" style="display:none">\
<table><tr align="left"><td>\
selection filter\
</td><td align="right">\
<a href="JavaScript:;" id="exportHideFilter"\
onclick="onClickExportButton(this)" title="hide selection filter">hide</a>\
</td></tr></table>\
<div class="box">\
<input type="checkbox" class="chk" id="exportFilterStart" value="1"\
onclick="exportShowFilterFields(this)"> starting date/time<br>\
<table cellpadding="0" cellspacing="0"><tr valign="center"><td width="50%">\
<select size=1 id="exportFilterStartBy" onchange="exportShowFilterFields(this);">\
<option value="0">today</option>\
<option value="1">yesterday</option>\
<option value="7">a week ago</option>\
<option value="30">a month ago</option>\
<option value="site">SiteDate</option>\
<option value="file">file date</option>\
<option value="other">other (mm/dd/yyyy hh:mm)</option>\
</select>\
</td><td width="50%">\
<input type="text" id="exportStartDate" onfocus="this.select()"\
onchange="document.getElementById(\'exportFilterStartBy\').value=\'other\';">\
</td></tr></table>\
<input type="checkbox" class="chk" id="exportFilterEnd" value="1"\
onclick="exportShowFilterFields(this)"> ending date/time<br>\
<table cellpadding="0" cellspacing="0"><tr valign="center"><td width="50%">\
<select size=1 id="exportFilterEndBy" onchange="exportShowFilterFields(this);">\
<option value="0">today</option>\
<option value="1">yesterday</option>\
<option value="7">a week ago</option>\
<option value="30">a month ago</option>\
<option value="site">SiteDate</option>\
<option value="file">file date</option>\
<option value="other">other (mm/dd/yyyy hh:mm)</option>\
</select>\
</td><td width="50%">\
<input type="text" id="exportEndDate" onfocus="this.select()"\
onchange="document.getElementById(\'exportFilterEndBy\').value=\'other\';">\
</td></tr></table>\
<input type="checkbox" class="chk" id=exportFilterTags value="1"\
onclick="exportShowFilterFields(this)"> match tags<br>\
<input type="text" id="exportTags" onfocus="this.select()">\
<input type="checkbox" class="chk" id=exportFilterText value="1"\
onclick="exportShowFilterFields(this)"> match titles/tiddler text<br>\
<input type="text" id="exportText" onfocus="this.select()">\
</div> <!--box-->\
</div> <!--panel-->\
\
<!-- action buttons -->\
<div style="text-align:center">\
<input type=button class="btn3" onclick="onClickExportButton(this)"\
id="exportFilter" value="apply filter">\
<input type=button class="btn3" onclick="onClickExportButton(this)"\
id="exportStart" value="export tiddlers">\
<input type=button class="btn3" onclick="onClickExportButton(this)"\
id="exportClose" value="close">\
</div><!--center-->\
';
//}}}
// // initialize interface
// // exportShowPanel(which)
//{{{
function exportShowPanel(which) {
var index=0; var panel='exportLocalPanel';
switch (which) {
case 'file:':
case undefined:
index=0; panel='exportLocalPanel'; break;
case 'http:':
index=1; panel='exportHTTPPanel'; break;
case 'https:':
index=2; panel='exportHTTPPanel'; break;
case 'ftp:':
index=3; panel='exportFTPPanel'; break;
default:
alert("Sorry, export to "+which+" is not yet available");
break;
}
exportInitPanel(which);
document.getElementById('exportTo').selectedIndex=index;
document.getElementById('exportLocalPanel').style.display='none';
document.getElementById('exportHTTPPanel').style.display='none';
document.getElementById('exportFTPPanel').style.display='none';
document.getElementById(panel).style.display='block';
}
//}}}
// // exportInitPanel(which)
//{{{
function exportInitPanel(which) {
switch (which) {
case "file:": // LOCAL EXPORT PANEL: file/path:
// ** no init - security issues in IE **
break;
case "http:": // WEB EXPORT PANEL
case "https:": // SECURE WEB EXPORT PANEL
// url
if (store.tiddlerExists("unawiki_download")) {
var theURL=store.getTiddlerText("unawiki_download");
theURL=theURL.replace(/\[\[download\|/,'').replace(/\]\]/,'');
var title=(store.tiddlerExists("unawiki_host"))?"unawiki_host":"SiteHost";
var theHost=store.getTiddlerText(title);
if (!theHost || !theHost.length) theHost=document.location.host;
if (!theHost || !theHost.length) theHost=title;
}
// server script/params
var title=(store.tiddlerExists("unawiki_host"))?"unawiki_host":"SiteHost";
var theHost=store.getTiddlerText(title);
if (!theHost || !theHost.length) theHost=document.location.host;
if (!theHost || !theHost.length) theHost=title;
// get POST
var title=(store.tiddlerExists("unawiki_post"))?"unawiki_post":"SitePost";
var thePost=store.getTiddlerText(title);
if (!thePost || !thePost.length) thePost="/"+title;
// get PARAMS
var title=(store.tiddlerExists("unawiki_params"))?"unawiki_params":"SiteParams";
var theParams=store.getTiddlerText(title);
if (!theParams|| !theParams.length) theParams=title;
var serverURL = which+"//"+theHost+thePost+"?"+theParams;
document.getElementById("exportHTTPServerURL").value=serverURL;
// get NOTIFY
var theAddresses=store.getTiddlerText("SiteNotify");
if (!theAddresses|| !theAddresses.length) theAddresses="SiteNotify";
document.getElementById("exportNotifyTo").value=theAddresses;
break;
case "ftp:": // FTP EXPORT PANEL
// host
var siteHost=store.getTiddlerText("SiteHost");
if (!siteHost || !siteHost.length) siteHost=document.location.host;
if (!siteHost || !siteHost.length) siteHost="SiteHost";
document.getElementById("exportFTPHost").value=siteHost;
// username
var siteID=store.getTiddlerText("SiteID");
if (!siteID || !siteID.length) siteID=config.options.txtUserName;
document.getElementById("exportFTPID").value=siteID;
// password
document.getElementById("exportFTPPW").value="";
// file/path
document.getElementById("exportFTPFilename").value="";
break;
}
}
//}}}
// // exportInitFilter()
//{{{
function exportInitFilter() {
// start date
document.getElementById("exportFilterStart").checked=false;
document.getElementById("exportStartDate").value="";
// end date
document.getElementById("exportFilterEnd").checked=false;
document.getElementById("exportEndDate").value="";
// tags
document.getElementById("exportFilterTags").checked=false;
document.getElementById("exportTags").value="";
// text
document.getElementById("exportFilterText").checked=false;
document.getElementById("exportText").value="";
// show/hide filter input fields
exportShowFilterFields();
}
//}}}
// // exportShowFilterFields(which)
//{{{
function exportShowFilterFields(which) {
var show;
show=document.getElementById('exportFilterStart').checked;
document.getElementById('exportFilterStartBy').style.display=show?"block":"none";
document.getElementById('exportStartDate').style.display=show?"block":"none";
var val=document.getElementById('exportFilterStartBy').value;
document.getElementById('exportStartDate').value
=getFilterDate(val,'exportStartDate').formatString(config.macros.exportTiddlers.datetimefmt);
if (which && (which.id=='exportFilterStartBy') && (val=='other'))
document.getElementById('exportStartDate').focus();
show=document.getElementById('exportFilterEnd').checked;
document.getElementById('exportFilterEndBy').style.display=show?"block":"none";
document.getElementById('exportEndDate').style.display=show?"block":"none";
var val=document.getElementById('exportFilterEndBy').value;
document.getElementById('exportEndDate').value
=getFilterDate(val,'exportEndDate').formatString(config.macros.exportTiddlers.datetimefmt);
if (which && (which.id=='exportFilterEndBy') && (val=='other'))
document.getElementById('exportEndDate').focus();
show=document.getElementById('exportFilterTags').checked;
document.getElementById('exportTags').style.display=show?"block":"none";
show=document.getElementById('exportFilterText').checked;
document.getElementById('exportText').style.display=show?"block":"none";
}
//}}}
// // onClickExportButton(which): control interactions
//{{{
function onClickExportButton(which)
{
// DEBUG alert(which.id);
var theList=document.getElementById('exportList'); if (!theList) return;
var count = 0;
var total = store.getTiddlers('title').length;
switch (which.id)
{
case 'exportFilter':
count=filterExportList();
var panel=document.getElementById('exportFilterPanel');
if (count==-1) { panel.style.display='block'; break; }
document.getElementById("exportStart").disabled=(count==0);
clearMessage(); displayMessage("filtered "+formatExportMessage(count,total));
if (count==0) { alert("No tiddlers were selected"); panel.style.display='block'; }
break;
case 'exportStart':
exportTiddlers();
break;
case 'exportHideFilter':
case 'exportToggleFilter':
var panel=document.getElementById('exportFilterPanel')
panel.style.display=(panel.style.display=='block')?'none':'block';
break;
case 'exportSelectChanges':
var lastmod=new Date(document.lastModified);
for (var t = 0; t < theList.options.length; t++) {
if (theList.options[t].value=="") continue;
var tiddler=store.getTiddler(theList.options[t].value); if (!tiddler) continue;
theList.options[t].selected=(tiddler.modified>lastmod);
count += (tiddler.modified>lastmod)?1:0;
}
document.getElementById("exportStart").disabled=(count==0);
clearMessage(); displayMessage(formatExportMessage(count,total));
if (count==0) alert("There are no unsaved changes");
break;
case 'exportSelectAll':
for (var t = 0; t < theList.options.length; t++) {
if (theList.options[t].value=="") continue;
theList.options[t].selected=true;
count += 1;
}
document.getElementById("exportStart").disabled=(count==0);
clearMessage(); displayMessage(formatExportMessage(count,count));
break;
case 'exportSelectOpened':
for (var t = 0; t < theList.options.length; t++) theList.options[t].selected=false;
var tiddlerDisplay = document.getElementById("tiddlerDisplay"); // for TW2.1-
if (!tiddlerDisplay) tiddlerDisplay = document.getElementById("storyDisplay"); // for TW2.2+
for (var t=0;t<tiddlerDisplay.childNodes.length;t++) {
var tiddler=tiddlerDisplay.childNodes[t].id.substr(7);
for (var i = 0; i < theList.options.length; i++) {
if (theList.options[i].value!=tiddler) continue;
theList.options[i].selected=true; count++; break;
}
}
document.getElementById("exportStart").disabled=(count==0);
clearMessage(); displayMessage(formatExportMessage(count,total));
if (count==0) alert("There are no tiddlers currently opened");
break;
case 'exportSelectRelated':
// recursively build list of related tiddlers
function getRelatedTiddlers(tid,tids) {
var t=store.getTiddler(tid); if (!t || tids.contains(tid)) return tids;
tids.push(t.title);
if (!t.linksUpdated) t.changed();
for (var i=0; i<t.links.length; i++)
if (t.links[i]!=tid) tids=getRelatedTiddlers(t.links[i],tids);
return tids;
}
// for all currently selected tiddlers, gather up the related tiddlers (including self) and select them as well
var tids=[];
for (var i=0; i<theList.options.length; i++)
if (theList.options[i].selected) tids=getRelatedTiddlers(theList.options[i].value,tids);
// select related tiddlers (includes original selected tiddlers)
for (var i=0; i<theList.options.length; i++)
theList.options[i].selected=tids.contains(theList.options[i].value);
clearMessage(); displayMessage(formatExportMessage(tids.length,total));
break;
case 'exportListSmaller': // decrease current listbox size
var min=5;
theList.size-=(theList.size>min)?1:0;
break;
case 'exportListLarger': // increase current listbox size
var max=(theList.options.length>25)?theList.options.length:25;
theList.size+=(theList.size<max)?1:0;
break;
case 'exportClose':
document.getElementById('exportPanel').style.display='none';
break;
}
}
//}}}
// // list display
//{{{
function formatExportMessage(count,total)
{
var txt=total+' tiddler'+((total!=1)?'s':'')+" - ";
txt += (count==0)?"none":(count==total)?"all":count;
txt += " selected for export";
return txt;
}
function refreshExportList(selectedIndex)
{
var theList = document.getElementById("exportList");
var sort;
if (!theList) return;
// get the sort order
if (!selectedIndex) selectedIndex=0;
if (selectedIndex==0) sort='modified';
if (selectedIndex==1) sort='title';
if (selectedIndex==2) sort='modified';
if (selectedIndex==3) sort='modifier';
if (selectedIndex==4) sort='tags';
// unselect headings and count number of tiddlers actually selected
for (var t=0,count=0; t < theList.options.length; t++) {
if (!theList.options[t].selected) continue;
if (theList.options[t].value!="")
count++;
else { // if heading is selected, deselect it, and then select and count all in section
theList.options[t].selected=false;
for ( t++; t<theList.options.length && theList.options[t].value!=""; t++) {
theList.options[t].selected=true;
count++;
}
}
}
// disable "export" button if no tiddlers selected
document.getElementById("exportStart").disabled=(count==0);
// show selection count
var tiddlers = store.getTiddlers('title');
if (theList.options.length) { clearMessage(); displayMessage(formatExportMessage(count,tiddlers.length)); }
// if a [command] item, reload list... otherwise, no further refresh needed
if (selectedIndex>4) return;
// clear current list contents
while (theList.length > 0) { theList.options[0] = null; }
// add heading and control items to list
var i=0;
var indent=String.fromCharCode(160)+String.fromCharCode(160);
theList.options[i++]=
new Option(tiddlers.length+" tiddlers in document", "",false,false);
theList.options[i++]=
new Option(((sort=="title" )?">":indent)+' [by title]', "",false,false);
theList.options[i++]=
new Option(((sort=="modified")?">":indent)+' [by date]', "",false,false);
theList.options[i++]=
new Option(((sort=="modifier")?">":indent)+' [by author]', "",false,false);
theList.options[i++]=
new Option(((sort=="tags" )?">":indent)+' [by tags]', "",false,false);
// output the tiddler list
switch(sort)
{
case "title":
for(var t = 0; t < tiddlers.length; t++)
theList.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title,false,false);
break;
case "modifier":
case "modified":
var tiddlers = store.getTiddlers(sort);
// sort descending for newest date first
tiddlers.sort(function (a,b) {if(a[sort] == b[sort]) return(0); else return (a[sort] > b[sort]) ? -1 : +1; });
var lastSection = "";
for(var t = 0; t < tiddlers.length; t++)
{
var tiddler = tiddlers[t];
var theSection = "";
if (sort=="modified") theSection=tiddler.modified.toLocaleDateString();
if (sort=="modifier") theSection=tiddler.modifier;
if (theSection != lastSection)
{
theList.options[i++] = new Option(theSection,"",false,false);
lastSection = theSection;
}
theList.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title,false,false);
}
break;
case "tags":
var theTitles = {}; // all tiddler titles, hash indexed by tag value
var theTags = new Array();
for(var t=0; t<tiddlers.length; t++) {
var title=tiddlers[t].title;
var tags=tiddlers[t].tags;
if (!tags || !tags.length) {
if (theTitles["untagged"]==undefined) { theTags.push("untagged"); theTitles["untagged"]=new Array(); }
theTitles["untagged"].push(title);
}
else for(var s=0; s<tags.length; s++) {
if (theTitles[tags[s]]==undefined) { theTags.push(tags[s]); theTitles[tags[s]]=new Array(); }
theTitles[tags[s]].push(title);
}
}
theTags.sort();
for(var tagindex=0; tagindex<theTags.length; tagindex++) {
var theTag=theTags[tagindex];
theList.options[i++]=new Option(theTag,"",false,false);
for(var t=0; t<theTitles[theTag].length; t++)
theList.options[i++]=new Option(indent+indent+theTitles[theTag][t],theTitles[theTag][t],false,false);
}
break;
}
theList.selectedIndex=selectedIndex; // select current control item
}
//}}}
// // list filtering
//{{{
function getFilterDate(val,id)
{
var result=0;
switch (val) {
case 'site':
var timestamp=store.getTiddlerText("SiteDate");
if (!timestamp) timestamp=document.lastModified;
result=new Date(timestamp);
break;
case 'file':
result=new Date(document.lastModified);
break;
case 'other':
result=new Date(document.getElementById(id).value);
break;
default: // today=0, yesterday=1, one week=7, two weeks=14, a month=31
var now=new Date(); var tz=now.getTimezoneOffset()*60000; now-=tz;
var oneday=86400000;
if (id=='exportStartDate')
result=new Date((Math.floor(now/oneday)-val)*oneday+tz);
else
result=new Date((Math.floor(now/oneday)-val+1)*oneday+tz-1);
break;