Compared to [[Siglets]], Alternating color in list views was an easy hack. You can see the results to the left. This makes it much simpler to read the list view, especially when you have Tiddlers that might take up more than one line (as mine tend to do). The corresponding CSS required to manipulate the colors is in StyleSheet .
Momus:
>"About the thing about "status thinking" versus "contract thinking". Discoveries like today's should make you veer towards a "contract" model of Japanese society. You should avoid the conclusion that a contract-based society governed my mutual interests and consensual understandings is a conspiracy."
Momus:
>"I think the biggest problem Marxy and I have is that Marxy is a "status thinker" and I'm a "contract thinker". Marxy, in other words, believes that everything revolves around "the truth of the situation" whereas I believe that everything revolves around a consensual contract between the actors involved. In this I am way more "Japanese" than ~Marxy."
Marxy:
>"A contract is not necessarily a conspiracy, but I think there's much reason to question exclusionary agreements or contracts not formed with equal access to perfect-information - both of which are dominant in Japanese society."
@@bgcolor(#ff4300):Neuroscientific basis for art. [[Ramachandran]].@@ * Aesthetic fundamentals that transcend culture. @@bgcolor(#71ff4f):Network and Complexity Theory@@ * Social Implications * Culture * Meme theory * General Computation [[http://cscs.umich.edu/~crshalizi/notebooks/complex-networks.html|http://cscs.umich.edu/~crshalizi/notebooks/complex-networks.html]] * Self organization, and emergence. @@bgcolor(#9397ff):Improving Evolutionary Search@@ * Long-term evolution problem, lock in because target is not adaptive and/or it becomes too difficult to effect positive phenotypic change. * Neutral network theory. * Evo-devo in biology, but mostly in the context of improving search efficacy (learning a problem). @@bgcolor(#ff6900):Machine Learning@@ * Or at least how to reliably build models of large data sets. * Unsupervised learning * Semi-supervised learning, including clustering and such. * [[Rich Sutton]]'s work on ~TD-learning. @@bgcolor(#9a00ff):Neural Networks@@ * Models of learning from the brain. * Unsupervised, self-organizing vs. supervised training. * How can self-organization be employed to augment Neuro-evolution? Is evolution even the correct time scale to "learn" problems? Or should there be some component of "training" afterwards? @@bgcolor(#00ffa9):Developmental Biology@@ * In general, developmental biology is really cool. At its most fundamental level development is equivalent to a computer program. The "code" is DNA, and the machinery is the cellular components. But unlike traditional computers where the results are displayed through some device, the "results" of a computation in developmental biology is the morphology, kinematics, and machinery associated with the organism itself. Thus development describes computers that can literally grow themselves from a seed. * Developmental programs are structured in a way much different from traditional programming -- the main differences include massive parallelism, shallow execution depth (shallow gene cascades, but exponential proliferation -- i.e. exploiting parallelism) tightly integrated modular reuse, etc.
version.extensions.listOpen = {major: 0, minor: 1, revision: 0};
config.macros.listOpen = { text: "Hello" };
config.macros.listOpen.handler = function(place,macroName,params)
{
var tiddlerDisplay = document.getElementById("tiddlerDisplay");
for(var t=0;t<tiddlerDisplay.childNodes.length;t++)
{
if( tiddlerDisplay.childNodes[t].id )
{
var tiddlerName = tiddlerDisplay.childNodes[t].id.substr(7);
createTiddlyLink(place,tiddlerName,true);
createTiddlyElement(place,"br",null,null,"");
//refreshEditor(tiddlerName);
}
}
}
version.extensions.listTags = {major: 0, minor: 1, revision: 0};
config.macros.listTags = {
text: "Hello"
};
config.macros.listTags.handler = function(place,macroName,params)
{
var tagged = store.getTaggedTiddlers(params[0]);
for(var r=0;r<tagged.length;r++)
{
if( tagged[r].title.toLowerCase() != params[0].toLowerCase() )
{
createTiddlyLink(place,tagged[r].title,true);
createTiddlyElement(place,"br",null,null,"");
}
}
}
@@color(red):''[''@@<<newTiddler>>@@color(red):'']''@@
@@color(blue):[@@<<refreshDynamic>>@@color(blue):]@@
[[Rejoice!]]
[[Features]]
[[VersionHistory]]
[[TODO]]
[[UsageNotes]]
[[日本人のお客様へ]]
@@color(lime):[@@[[Download|http://www.cs.utexas.edu/~joeraii/pytw/pytw.tar.bz2]]@@color(lime):]@@
[img[siglets|images/siglet.jpg]]
@@color(orange):ref: [[siglet|http://www.cs.utexas.edu/~joeraii/siglet]]@@
I love the pytw idea.
I'm seriously considering modding my 2.1.3 tw to use some of pytw ideas. Trouble is I'm a javascript newbie. I'm waiting just a little longer to see if Joe is going to do it with style first otherwise look out for my hackky version :-)
<<tabs txtMainTab
Timeline Timeline TabTimeline
Tags "All tags" TabTags
More "More lists" TabMore>>
Type the text for 'New Tiddler'
http://www.cs.utexas.edu/~joeraii/pytw
<<tabs txtMoreTab
All "All tiddlers" TabMoreAll
Missing "Missing tiddlers" TabMoreMissing
Orphans "Orphaned tiddlers" TabMoreOrphans
>>
<<list all>>
<<list missing>>
<<list orphans>>
<<allTags>>
!!Some kind of Header !Header? ''Bold'' ==Strike== __Underline__ //Italic// 2^^3^^=8 a~~ij~~ = -a~~ji~~ @@highlight@@ @@color(green):green colored@@ @@bgcolor(#ff0000):color(#ffffff):red colored@@ *Legende zum Vorlesungsverzeichnis **@@bgcolor(#a0ffa0):color(black): bedeutet hier@@ **@@bgcolor(#ffdead):color(black): etwas anderes@@ **@@bgcolor(#ffbfff):color(black): Lanthanides@@ **@@bgcolor(#ff99cc):color(black): Actinides@@ **@@bgcolor(#ffc0c0):color(black): Transition metals@@ **@@bgcolor(#cccccc):color(black): Poor metals@@ **@@bgcolor(#cccc99):color(black): Metalloids@@ **@@bgcolor(#a0ffa0):color(black): Nonmetals@@ **@@bgcolor(#ffff99):color(black): Halogens@@ **@@bgcolor(#c0ffff):color(black): Noble gases@@ *** @@color(#a0ffa0):TODO@@ *** @@color(#ffdead):IBM@@ *** @@color(#ffbfff):Research@@ *** @@color(#ff99cc):Japan@@ *** @@color(#ffc0c0):Culture@@
[[Here|http://www.phiffer.org/tiddly]]
//Joseph Reisinger, Kenneth O. Stanley and Risto Miikkulainen (2005). Towards an Empirical Measure of Evolvability, Proceedings of the Genetic and Evolutionary Computation Conference (GECCO-2005) Workshop ~Program.//
Genetic representations that do not employ a one-to-one mapping of genotype to phenotype are known as indirect encodings, and can be much more efficient than direct encodings for complex problems. Increasing a representation's capacity to facilitate effective search, i.e. its evolvability, has long been a goal of Evolutionary ~Computation. However, currently no benchmarks exist to measure evolvability. One reason is that it is difficult to decouple a representation's capacity to evolve under any fitness function, i.e. the latent evolvability, and its performance on a specific benchmark. Towards this goal, a method is proposed in this paper that measures the representation's ability to extract invariant properties from a changing fitness function. The test is applied to three distinct representations and it is able to distinguish all three. Ultimately, this test can serve as the foundation for performing controlled experiments determining what factors contribute to evolvability.
>Each genotype g can be written as a tuple (x, σ), where x is the phenotype and σ is the neutral traits. >The main point is that σ evolves just like x. "σ is basically how good the mutational phenotypic >variability matches the distribution of good organisms." σ is a parameter describing the space around >this x.
Is this a useful separation? Aren't there degrees of neutrality? Can two genotypes have the same neutral traits and phenotypes, but different evolvability structures? -- __Of course__ This occurs when it is the non-neutral traits that create x, then looking at only σ for the evolvability structure is misleading.
From notes pg. 50 7/2/05.
* [[Journal of Civilization]]
* [[SILO2|http://animatic.no-ip.com/cgi-bin/silo-wiki/index.cgi?]]
A revolutionary 3D modeler / sculpting software. the v2 is currently in beta.
I am starting to add video/slideshow macros.
Also interested in Journal of Civilization experience regarding tw2 upgrade...
pytw is fantastic !
'pytw' is pronounced 'Pie-Twuh' as in "Man, I had a hell of a pie twuh last night."
* Load on demand (see [[PerlTiddlyWiki|http://ccm.sherry.jp/tiddly/]]) ** Better than this: *** //Local// cache of tiddlers, maybe using something like this [[http://codinginparadise.org/weblog/2005/08/ajax-tutorial-saving-session-across.html|http://codinginparadise.org/weblog/2005/08/ajax-tutorial-saving-session-across.html]]. *** Sync with the local cache on loading from remote. The first time creates the local cache. * Authentication. (Partly finished, see version 1.0.5). ** Serverside username log-in, user tagAlias, and Options save ** See [[Authentication]] * ==Return status messages from save/delete.== * ==xml->pickle==, pickle->xml, others? * ==Import function for converting from client TiddlyWiki to pytw== ** See [[HTMLTiddlerImporter]] * Remote-local sync c/o server script, without damaging the clientside copy if it is different. Perhaps use tags ('shareNode' on client side?). **This could be accomplished rather painlessly using the new pytw plugin architecture. There is already a plugin "refresh" which pings the server for dynamic tiddler updates. This could be expanded to update the static tiddlers as well. From there its not much of a stretch to design the opposite functionality (offline client updates -> server), which is what I think you are proposing. * Allow upload (and retrieval) of files, according to user permissions set by admin. * Allow arbitrary markup handling, so that, for example, dynamic SVG (from 1.0.6/pending?) can be generated using peculiarly marked-up tiddly nodes tagged with [[CompositeNode|CompositeNodes]] (or similar). * "A great many things, young Skywalker." * Make the "plugins" external page loads, to reduce the cost of a reload? (serversidewiki does this, basically).
so do images work [img[pic|http://www.megatokyo.com/strips/0825.gif]]
Test with konqueror abc
Questa è una prova
Rob: Thanks very much, Joe. Now my programmer friend, TheBadger, helped me I get this solution working locally ·;).
>"Pie-twuh" is easier to say than "Pie tee dub you", but I don't know which I prefer yet.
I still haven't had a chance to say it out loud; I imagine when I start discussing it more I might have to change the name -- Joe
My wife recommends renaming it to "pie-tee wih-kee" -- Mark
Here are some frequently asked questions. If your question isn't listed here, just add it with a blank reply, and I (or even another user :) will get back to you (alternatively, send me email: joeraii _at_ gmail _dot_ com).
!!!''If mod_python is installed, what should be done?''
I'm not 100% sure, but the idea I think is that .py files become executable, so you don't need the first line in index.cgi (the #!/path/to/python line) and you probably should rename it index.py or something. You also need a .htaccess file in the execution directory with contents like this:
{{{
AddHandler mod_python .py
PythonHandler mptest
PythonDebug On
}}}
For mod_python v. 3.1.
For basic CGI mode, you shouldn't have to make any changes other than changing the first line in index.cgi to point to your python installation.
!!!''Are dynamic tiddlers editable by default?''
Yes, dynamic tiddlers are editable. This is to allow you to, for example, save a copy of a specific instance somewhere else for future reference. However if you make a normal tiddler with the same name as a dynamic one, you'll never be able to access it (until you turn off dynamic tiddlers). Eventually, I'll get around to adding notification if you attempt to do something like this. The new (better) modular architecture supports this kind of notification inherently.
!!!''How can sub-wikis be installed in pytw's original directory?''
# Extract the downloaded package to the subdirectory of your choice. I chose template.pytw, to use that as a template to copy to other sub-wikis.
# Add a file '.htaccess' to the subdirectory (this may be excessively accessible, but it worked for me at the time):
{{{
AllowOverride AuthConfig
Order allow,deny
Allow from all
}}}
Alternatively:
# Copy the directory template.pytw to the subdirectory of your choice (e.g. su -c "cp -fR /home/~username/pytw/template.pytw/* /path/to/myserver/pytw/mysubwikiname/").
* In both cases, make sure the permissions are set correctly. In this example (more of "it worked for me), it must be assumed file or directory ''wikiname'' does not exist, and that the use has adequate authority to make directories, write to them, and adjust their ownership:
mkdir wikiname;cp -fr im/* wiki-name/ ;chown -R wwwrun.www /home/local/pytw
* The server may need to be restarted, e.g. su -c "/etc/init.d/apache2 restart".
The next step is to write this into a serverside script that can be called by users, as follows:
{{{
#!/bin/sh
# This script assumes other permissions in the directory will not be messed up if they were not user "www" and group "run.www" before the script was called.
cd pytw-root
mkdir ./wiki-name
cp -fr template.pytw/* wiki-name/
chown -R wwwrun.www .
}}}
!!!''How can I upgrade without wiping my original wiki data?''
Be aware that the following suggestion is by no means perfect:
{{{
cd pytw-root
mkdir ./backupstore-yyyymmdd
cp -r ./store/ ./backup-store-yyyymmdd/*
mv tw.py tw-old.py
mv convert-format.py convert-format-old.py
...
chown wwwrun.www .
}}}
You could also use the following, which may be quicker but may do damage if there are any important files or directories in pytw-root that must not be deleted:
{{{
rm *.py
}}}
Joe: I prefer making a new directory, unpacking pytw there, replacing the default store/ directory with a copy of my own, and then testing in the newdir. Once all the bugs are ironed out, I zip up the old directory and usse it for backups.
!!I've added an encrypted password to auth.py and {{{< <config pasPassword> >}}} to a tiddler, but still don't get asked for a password.
Sorry, it should be {{{< <option pasPassword> >}}}, I think. (without the spaces between the <'s)
Also, you need to enable the password.js plugin by changing {{{tw.py}}} like this:
{{{
# The base html file from http://www.tiddlywiki.com (sans the last few lines)
TWBase = 'tiddlywiki-1.2.32.html'
# Javascript plugins. remote.js is mandatory for pytw to work, but can be
# removed to disable serverside functionality cleanly.
TWPlugins = ['remote.js', 'refresh.js', 'password.js', 'pasword-cookie.js']
}}}
!!I've upgraded as described in [[How to upgrade the TW base]], but the edit cursor is now invisible!
newer versions of TW have an option to disable editor features when viewed over http, which means you can 'edit' in order to snag source, but can't alter such, or save document level options such as "disable editor features when viewed over http". edit your template's value for chkHttpReadOnly.
Here is how it works. First we design a "DynamicContent" handler that generates the output we want formatted as a tiddler div. This one runs the unix command "fortune":
{{{
from tw import tiddler_to_markup, CurrentTime
from os import popen
def load_tiddlers( store_files ):
tiddler = { 'title':'DynamicFortune',
'modified':CurrentTime
'author':'_dynamic',
'tags':'dynamic fortune
}}}
//add in://
{{{excludeLists}}}
//continue original://
{{{
', 'body':popen('/lusr/games/bin/fortune').read()}
return tiddler_to_markup( tiddler )
}}}
and we call it "fortune.py" and put it in the "importers/" directory. Content handlers usually only act on static content (e.g. an xml importer), but in this case the content will be generated from the popen statement. Content handlers must define a "load_tiddlers" function taking one parameter (list of files in store/), which can be ignored. load_tiddlers must return a string in the TW div format.
Next, we make some //slight// additions to tw.py . With a vanilla 1.0.5 distribution, the globals section looks like this:
{{{
###############################################################################
# Global Parameters
###############################################################################
# The base html file from http://www.tiddlywiki.com (sans the last few lines)
TWBase = 'tiddlywiki-1.2.31.html'
# Javascript plugins. remote.js is mandatory for pytw to work, but can be
# removed to disable serverside functionality cleanly.
TWPlugins = ['remote.js']
# Importers for turning other kinds of files into tiddlers. pytw uses pickle
# Static importers are cached on write, while Dynamic importers are not.
StaticContent = ['pickleimporter']
DynamicContent = []
# Handlers for cgi requests. Format is CGIFormAttribute:python module .
Handlers = {'save':'save', 'delete':'delete'}
# Where the html div cache is stored.
CachePath = 'store/tiddler_divs_html.cache'
# Used for timestamping on save. Best not to change this.
CurrentTime = datetime.now().strftime('%Y%m%d%H%M')
}}}
We need to add entries in TWPlugins, DynamicContent, and HandlerPlugins. Like so:
{{{
# Javascript plugins. tw.js is mandatory for pytw to work, but can be removed to
# disable serverside functionality cleanly.
TWPlugins = ['remote.js', 'refresh.js']
# Importers for turning other kinds of files into tiddlers. pytw uses pickle
# files natively, but other things are possible as well. For each entry here
# there must be a file in the current directory with the same name + .py
# TODO: this needs to be expanded such that saving is possible as well.
StaticContent = ['pickleimporter']
DynamicContent = ['fortune']
# Handlers for cgi requests. Format is CGIFormAttribute:python module .
Handlers = {'save':'save', 'delete':'delete', 'refresh':'refresh' }
}}}
Basically, we added the hooks for "refresh" which allows us to refresh dynamic content without a page load (optional, of course, but a nice feature to have), and we also added "fortune" to the DynamicContent list. This will call the fortune.py we made earlier on every page load, and on every refresh. This is as opposed to StaticContent, which is cached on write, so that loads are faster.
Thats it!
Dynamic content!
//A teaser preview of the next pytw version.//
I've finishing modularizing the importers, and I have a big architectural decision to make regarding the future of pytw.... so in order to put that on hold a bit, I mocked up a demo to show off what can be done //right now// thanks to pytw's modularity.
''@@color(red):Behold, dynamic tiddlers@@'': DynamicFortune.
Look at the content there, and when you get bored of looking, hit the <<refreshDynamic>> button (here or on the left). You should get a new fortune straight from the bowels of the UT Computer Sciences Department.
Impressed? Maybe not, it //is// just a silly demo after all. But the idea of being able to access dynamic content of your own design, from anywhere, should make you smile a bit.
[[How Dynamic Tiddlers Work]]
If you've ever yearned to import a client side TiddlyWiki into pytw....
Try this:
python [[convert-client-wiki.py|tools/convert-client-wiki.py]] <yourwikihtml>
@@color(red):''WARNING!:''@@ I've tested this guy out with a couple of html files, and it seems to do ok , but I have by no means been thorough. At the very least, there are two things I can promise:
# It won't eat your original file.
# It won't eat your original file.
That being said, you will want to make backups of the original html, and your original "store/" directory (if you have one).... just in case. It //will// wantonly overwrite tiddlers as it sees fit, within its working directory (provided as a command line option, or the default "new-store/").
Any bugs, comments to: joeraii _at_ g
The default string found in the right-hand options form input box. Its attached to each tiddler you modify.
An arbitrary single-word string that tells the file who owns it (and should be given exclusive rights to change some file properties that are not otherwise publically accessible).
test this frog
{{{
def get_pytw_dirs(path):
pytwList=[]
for filename in os.listdir(path):
if filename.endswith('.pytw') and os.path.isdir(path+filename):
pytwList.append(filename)
return pytwList
}}}
Joe: Made a slight change to this to pretty it up.
Joe: This is a good idea, in theory a single copy of pytw can easily run multiple wikis (the easiest may just be to have multiple index.cgi's in directories above pytw. Then you would only have to add '..' to the import search path. I also like the template idea. I'll think some more about how to allow this kind of functionality cleanly.
Rob: Thanks, Joe. I've had an idea about download options for multiple wikis (DownloadOptions), also.
Rob: It was relatively painless to apply whole instances of pytw (1.0.5) to the base installation and pytw subdirectory instances. I still like the idea though of using a single copy of pytw to run the show, as it makes upgrades a bit simpler. I haven't checked which instances the subdirectory copies use, so it might all be done via the base installation, but it works in whichever is the case.
Jonathan: Running Multiple TiddlyWikis is a bit like having the MultiFinder -- it really opens up a lot of possibilities....
"""
This might be part of a function group to allow the use of more than one wiki, navigable from
index.cgi. Authentication becomes increasingly important, as the intention is to enable users,
with the addition of a few more lines of Python code, to create directories (stores) named after
the wiki and appended with ".pytw" or an arbitrary string.
To do:
* add an option to TiddlyWiki to determine its directory names (the string appended to the wiki name);
* add a function to the Python code to create directory '"someWiki"+appendedString' and drop a version
of index.cgi in it that imports tw.py or runs 'python tw.py', depending whether the Python scripts can
have the right path (may depend on ISP);
* let tw.py use the text files in its own directory if './store/' is not found;
* make a copy of the relevant files and put them somewhere like 'pytw-templates' (not 'templates.d' so wikis
called 'pytw-templates' and 'templates' can be used);
NB: it may be more reasonable to use subdirectories within 'store/' to hold all the wikis. That way there is
no problem if a user wants a wiki called 'pytw-templates.d'.
"""
Rob: Regarding local site links and mirroring (e.g. by saving locally in the browser), it might be useful to provide some options via a Javascript file. The default setting could be the one that consumed the least immediate bandwidth, providing unfollowed absolute (remote) links. In this way files would be standalone on localhost, after a fashion.
... The option of using relative links to local external files would be available, for example for mirroring a partial or entire wikiwebsite. Mirrored websites would arguably decrease overall server bandwidth use (where the local file would be used to access the per-node synchronisation), and increase the need for flexible node/file synchronisation ([[TODO]] ·;).
Rob: Below are the diffs between an older version of TiddlyWiki and the one that allows a composite node feature. It looks for a particular tag string, "CompositeNode" in this example, and displays the content inline. I'm unfortunately unsure how to add it in as a completely separate .js file as there needs to be a hook in the main code to call the function that creates the composite tiddler. The original hack was to TiddlyWiki 1.2.22, not 1.2.31, and the mods are out of alignment. Since this needs to be in an external file anyway, it does not seem easy to implement. Or am I overlooking something rather simple? Let's have a go, anyway: CompositeNodes;
Rob: Actually, it caused a few errors, at least per my first attempt, displaying the 'overlapping' javascript or an "error in Python script" string near the bottom of the browser view.
{{{
--- TiddlyWiki.html 2005-07-04 18:21:22.000000000 +0200
+++ TiddlyWiki.html 2005-07-04 21:02:22.868717328 +0200
@@ -489,7 +489,8 @@
if(!theViewer && !theEditor)
{
createTiddlerToolbar(title,false);
- createTiddlerViewer(title,highlightText,highlightCaseSensitive);
+ //createTiddlerViewer(title,highlightText,highlightCaseSensitive);
+ createTiddlerComposite(title,highlightText,highlightCaseSensitive,"span");
}
break;
case 1: // Viewer
@@ -498,7 +499,8 @@
if(theEditor)
theEditor.parentNode.removeChild(theEditor);
createTiddlerToolbar(title,false);
- createTiddlerViewer(title,highlightText,highlightCaseSensitive);
+ //createTiddlerViewer(title,highlightText,highlightCaseSensitive);
+ createTiddlerComposite(title,highlightText,highlightCaseSensitive,"span");
break;
case 2: // Editor
if(!theEditor)
@@ -519,7 +521,8 @@
if(theViewer)
{
theViewer.parentNode.removeChild(theViewer);
- createTiddlerViewer(title,null,null);
+ //createTiddlerViewer(title,null,null);
+ createTiddlerComposite(title,null,null,"span");
}
}
@@ -665,6 +668,71 @@
}
}
+// Create the body section of a composite tiddler
+function createTiddlerComposite(title,highlightText,highlightCaseSensitive,placeholderType)
+{
+ var theBody = document.getElementById("body" + title);
+ if(theBody)
+ {
+ var tiddlerText = store.getTiddlerText(title);
+ var tiddlerExists = (tiddlerText != null);
+ if(!tiddlerExists)
+ tiddlerText = "This tiddler doesn't yet exist. Double-click to create it";
+ var theViewer = createTiddlyElement(theBody,"div","viewer" + title,"viewer",null);
+ if(!tiddlerExists)
+ theViewer.style.fontStyle = "italic";
+ wikify(tiddlerText,theViewer,highlightText,highlightCaseSensitive);
+ var tiddler = store.tiddlers[title];
+ if(tiddler)
+ {
+ // Go through the tags and find the one specifying a composite view.
+ for (var tagIndex = 0; tagIndex < tiddler.tags.length; tagIndex++)
+ {
+ if (tiddler.tags[tagIndex] == "CompositeNode")
+ {
+ // Get all links in the rendered text.
+ var links = theBody.getElementsByTagName("a");
+
+ // Traverse a static copy of the above live list.
+ var linksToChange = new Array();
+ var i;
+ for (i = 0; i < links.length; i++)
+ {
+ linksToChange.push(links[i]);
+ }
+ for (i = 0; i < linksToChange.length; i++)
+ {
+ // If the link is a genuine link in the Wiki, process it.
+ var linkName = linksToChange[i].getAttribute("tiddlylink");
+ if (linkName != null && linkName != title)
+ {
+ // Get the text for the link.
+ var tiddlerTextNested = store.getTiddlerText(linkName);
+ if (tiddlerTextNested)
+ {
+ // Replace the link with a placeholder to contain the nested text.
+ var placeholder = document.createElement(placeholderType);
+ linksToChange[i].parentNode.replaceChild(placeholder, linksToChange[i]);
+ wikify(tiddlerTextNested,placeholder,highlightText,highlightCaseSensitive);
+ }
+ }
+ }
+ // Stop inspecting tags after processing.
+ break;
+ }
+ }
+ var prompt = tiddler.tags.length == 0 ? "no tags" : "tags:";
+ var theTags = createTiddlyElement(theViewer,"div","viewerTags" + title,"tags",prompt);
+ for(var t=0; t<tiddler.tags.length; t++)
+ {
+ var theTag = createTiddlyButton(theTags,tiddler.tags[t],"Show tiddlers tagged with '" + tiddler.tags[t] + "'",onClickTag);
+ theTag.setAttribute("tag",tiddler.tags[t]);
+ insertSpacer(theTags);
+ }
+ }
+ }
+}
}}}
/*
Rob: This seems to cause a display conflict when enabled serverside as an extra .js file listed in tw.py. This may be because its based on an older version of TiddlyWiki (from late July 2005) or because it overwrites some functions. The intention was to allow displaying inline nested node content inside tiddlers by using the tag CompositeNode. I'll look into possible versioning issues.
{{{
*/
function createTiddler(place,before,title,state,highlightText,highlightCaseSensitive)
{
var theTiddler = createTiddlerSkeleton(place,before,title);
createTiddlerTitle(title,highlightText,highlightCaseSensitive);
var theViewer = document.getElementById("viewer" + title);
var theEditor = document.getElementById("editor" + title);
switch(state)
{
case 0:
if(!theViewer && !theEditor)
{
createTiddlerToolbar(title,false);
//createTiddlerViewer(title,highlightText,highlightCaseSensitive);
createTiddlerComposite(title,highlightText,highlightCaseSensitive,"span");
}
break;
case 1: // Viewer
if(theViewer)
theViewer.parentNode.removeChild(theViewer);
if(theEditor)
theEditor.parentNode.removeChild(theEditor);
createTiddlerToolbar(title,false);
//createTiddlerViewer(title,highlightText,highlightCaseSensitive);
createTiddlerComposite(title,highlightText,highlightCaseSensitive,"span");
break;
case 2: // Editor
if(!theEditor)
{
if(theViewer)
theViewer.parentNode.removeChild(theViewer);
createTiddlerToolbar(title,true);
createTiddlerEditor(title);
}
break;
}
return(theTiddler);
}
function refreshTiddler(title)
{
var theViewer = document.getElementById("viewer" + title);
if(theViewer)
{
theViewer.parentNode.removeChild(theViewer);
//createTiddlerViewer(title,null,null);
createTiddlerComposite(title,null,null,"span");
}
}
// Create the body section of a composite tiddler
function createTiddlerComposite(title,highlightText,highlightCaseSensitive,placeholderType)
{
var theBody = document.getElementById("body" + title);
if(theBody)
{
var tiddlerText = store.getTiddlerText(title);
var tiddlerExists = (tiddlerText != null);
if(!tiddlerExists)
tiddlerText = "This tiddler doesn't yet exist. Double-click to create it";
var theViewer = createTiddlyElement(theBody,"div","viewer" + title,"viewer",null);
if(!tiddlerExists)
theViewer.style.fontStyle = "italic";
wikify(tiddlerText,theViewer,highlightText,highlightCaseSensitive);
var tiddler = store.tiddlers[title];
if(tiddler)
{
// Go through the tags and find the one specifying a composite view.
for (var tagIndex = 0; tagIndex < tiddler.tags.length; tagIndex++)
{
if (tiddler.tags[tagIndex] == "CompositeNode")
{
// Get all links in the rendered text.
var links = theBody.getElementsByTagName("a");
// Traverse a static copy of the above live list.
var linksToChange = new Array();
var i;
for (i = 0; i < links.length; i++)
{
linksToChange.push(links[i]);
}
for (i = 0; i < linksToChange.length; i++)
{
// If the link is a genuine link in the Wiki, process it.
var linkName = linksToChange[i].getAttribute("tiddlylink");
if (linkName != null && linkName != title)
{
// Get the text for the link.
var tiddlerTextNested = store.getTiddlerText(linkName);
if (tiddlerTextNested)
{
// Replace the link with a placeholder to contain the nested text.
var placeholder = document.createElement(placeholderType);
linksToChange[i].parentNode.replaceChild(placeholder, linksToChange[i]);
wikify(tiddlerTextNested,placeholder,highlightText,highlightCaseSensitive);
}
}
}
// Stop inspecting tags after processing.
break;
}
}
var prompt = tiddler.tags.length == 0 ? "no tags" : "tags:";
var theTags = createTiddlyElement(theViewer,"div","viewerTags" + title,"tags",prompt);
for(var t=0; t<tiddler.tags.length; t++)
{
var theTag = createTiddlyButton(theTags,tiddler.tags[t],"Show tiddlers tagged with '" + tiddler.tags[t] + "'",onClickTag);
theTag.setAttribute("tag",tiddler.tags[t]);
insertSpacer(theTags);
}
}
}
}
/*
}}}
*/
<<tiddler VersionHistory>>
Babies hate to lose it all to me
pytw now supports rudimentary encrypted authentication. See the [[1.0.5 README]] for details. The next step will be to add more powerful login capabilities. The final piece of the puzzle is authentication. I'm really at a loss about how to do it elegantly, and still have it scale gracefully from no authentication to save/delete authentication to per-tiddler ownership. I think [[Login Tools|http://www.voidspace.org.uk/python/logintools.html]] will be part of the puzzle. Remember pytw is all about being as simple as possible in the base case, and scaling gracefully through modular plugins. Rob: What is significant about that the password/remote script beginnig after the closing HTML markup? Joe: Nothing at all, save that that was the easiest way to add the functionality without making any major changes to the base tiddlywiki code. Another way to do it would be to read the TWBase until a certain location, say {{{</script>}}} is encountered, and then inserting the code there. This way is slower, and to me it feels just as hackish, so I opted for the former.
* Save tiddlers to the server, and retrieve them from any internet connection... .
*... or save this page for a standard client-side TW!
* Caching on save/delete, making refresh occur at almost native speed.
* Instant notification if something goes amiss!
*Each tiddler has a corresponding revisions directory for keeping track of changes.
* Deleted tiddlers are backed up.
* Simple encrypted authentication.
* Dynamically generated tiddlers!!
{{{#!/usr/bin/env python}}} could be used instead of {{{#!/lusr/bin/python2.4}}}
Rob: Such parameters could be input options included via a serverside script for authorised users.
Joe: Thanks! This will be in 1.0.5
What's the point, really?
Save to server.
----
|Please enter UserName|<<option txtUserName>>|
|Check these boxes:|<<option chkSaveBackups>> SaveBackups <<option chkAutoSave>> AutoSave <<option chkGenerateAnRssFeed>> GenerateAnRssFeed|
|@@color(red):''If you don't, your changes won't be saved.''@@ see TroubleShooting.|c
[[Rejoice!]] [[Features]] [[VersionHistory]] [[TODO]]
<<timeline>>
Okay, I admit it, I had been blissfully ignorant of TW, much less pytw, right up until 4.30 am this morning. And of course now I am thoroughly TiddlerInfected. I intend to host a new C2 SisterSite, [[Journal of Civilization]] over TW2 + pytw and I'm most curious about your release schedule. Is there a trac or something like that you guys use?
{{{
No Points Name Hp [max]
1 9652956 danb-Val-Hum-Mal-Law ascended to demigod-hood. 116 [583]
2 9509818 joeraii-Wiz-Elf-Mal-Cha ascended to demigod-hood. 296 [296]
3 7343426 jstrunk-Sam-Hum-Mal-Law ascended to demigod-hood. 124 [170]
4 6891430 joeraii-Val-Hum-Fem-Law ascended to demigoddess-hood. 281 [281]
5 6479620 joeraii-Wiz-Elf-Mal-Cha ascended to demigod-hood. 186 [186]
6 6232558 jstrunk-Tou-Hum-Mal-Neu ascended to demigod-hood. 117 [117]
7 4100877 joeraii-Wiz-Elf-Mal-Cha died on the Astral Plane.
Killed by Death (with the Amulet). - [159]
8 2916021 joeraii-Wiz-Elf-Mal-Cha died on the Plane of Air.
Killed by an air elemental, while helpless (with the
Amulet). - [252]
9 2863721 dkatz-Val-Hum-Fem-Law died in The Dungeons of Doom on
level 21 [max 48]. Killed by the invisible Wizard of
Yendor. - [298]
10 2775890 jstrunk-Tou-Hum-Mal-Neu died on the Plane of Air.
Killed by a jabberwock, while helpless (with the
Amulet). - [273]
11 2313488 jstrunk-Sam-Hum-Mal-Law died in Gehennom on level 48
[max 49]. Killed by a touch of death (with the
Amulet). 175 [213]
12 2284838 fool-Mon-Hum-Mal-Cha died on the Plane of Earth.
Killed by the invisible Wizard of Yendor. - [255]
13 1580012 IBeBad-Wiz-Hum-Mal-Cha died on the Astral Plane.
Killed by an Angel of Thoth (with the Amulet). - [91]
14 1548507 kat-Val-Hum-Fem-Law died in Gehennom on level 37
[max 44]. Killed by brainlessness. 182 [189]
15 1222210 dkatz-Val-Hum-Fem-Law died in Gehennom on level 39.
Killed by a troll. - [149]
16 1146308 fool-Mon-Hum-Fem-Cha died in Gehennom on level 49.
Killed by a balrog, while helpless. - [153]
17 1140307 danb-Val-Hum-Fem-Law died in The Dungeons of Doom on
level 26 [max 27]. Killed by a rock troll. - [307]
18 1092636 Snopes-Wiz-Hum-Mal-Neu quit in The Dungeons of Doom
on level 14 [max 34]. 183 [183]
19 970248 fool-Val-Dwa-Fem-Law choked on her food in Vlad's
Tower on level 32 [max 35]. Choked on a black
pudding corpse. 223 [224]
20 810084 jstrunk-Tou-Hum-Mal-Neu died in Gehennom on level 28
[max 29]. Killed by a jabberwock. - [158]
}}}
> having a link for formatted printing would be great!
Joe: Hmm.. I'm not sure what you mean. I think if you just hit print (opt-P on mac) TW prints wonderfully by default. The stylesheet adapts the layout to make it legible.
Testing
That thing that happens to wikizens when they finally wake up to what a tiddly is.
so in the [[Features]] it says instant notification if something goes amiss... Just for larks I tried unplugging my network cable, and making a few changes (editing a few tiddlers, new tiddlers etc).. I'm not expecting it to magically update but it does seem to be a situation where an error message or some sort of notification would be useful, however I didn't notice anything
is this by intentional design? or limitation?
thanks (and great work btw)
<div id='header'>
<div id='titleLine'>
<span id='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span id='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='sidebar'>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id="licensePanel">
</div></div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
<div id='footerDisplay'></div>
PeterMerel, KeithBraithwaite, DougMerritt & DaveVoorhis are setting up a C2 sister using pytw at http://www.aldwyn.com/joctw/ . Very half baked but if you folk have any time for questions ...
* Dave tried to get the latest [[TiddlyWiki2]] going, but reports failure. "It appears to be because the empty.html code has changed. In particular, the instructions in Step 6 appear to be no longer applicable; I couldn't locate the lines in question. The result was an upper half of the display that appeared to work - but only as a local Wiki - and a lower half that appeared to be raw data from the repository."
{{{
"The society which scorns excellence in plumbing as a humble activity
and tolerates shoddiness in philosophy because it is an exalted
activity will have neither good plumbing nor good philosophy ...
neither its pipes nor its theories will hold water."
}}}
Hit <<refreshDynamic>> for a new fortune.
* Save tiddlers to the server, and retrieve them from any internet connection... .
*... or save this page for a standard client-side TW!
* Caching on save/delete, making refresh occur at almost native speed.
* Instant notification if something goes amiss!
*Each tiddler has a corresponding revisions directory for keeping track of changes.
* Deleted tiddlers are backed up.
* Simple encrypted authentication.
* Dynamically generated tiddlers!!
Testing
Will you publish a plugin with the siglet code for TW2?
geil.
I really like the TiddlyWiki user experience but I am disappointed that the unstructured Wiki content model hasn't been extended to include structured data in microcontent formats. Someone needs to fix that!
From scott [underscore] wiener [at] hotmail [dot] com
<<option chkOpenInNewWindow>> OpenLinksInNewWindow
<<option chkSaveEmptyTemplate>> SaveEmptyTemplate
<<option chkToggleLinks>> Clicking on links to tiddlers that are already open causes them to close but that's not very nice
^^(override with Control or other modifier key)^^
This stuff has potential. Keep it up!
After setting up directories, paths, permissions etc, what next? It's not quite clear how you actually invoke and use the wiki. Can anyone please explain?
i.e. what do you run and how, what web page do you access? What are the differences between local save, and remote (server) save? Can they be interleaved?
to expand on my reasons for asking:
Although I do have a background in programming (including some Python), I do not know much about CGI and its usage. The UsageNotes and [[1.1 README]] appear to be aimed at people who do, which will not be true for much of the end-user population - so maybe more detail would be useful.
And - this looks very useful! I think TW is the way to go for wikis, and am looking for a suitable server-side form of it too. Having one written in Python would very attractive.
Thanks for the good work (even if I don't yet understand it). -- GL
* Save tiddlers to the server, and retrieve them from any internet connection... .
*... or save this page for a standard client-side TW!
* Caching on save/delete, making refresh occur at almost native speed.
* Instant notification if something goes amiss!
*Each tiddler has a corresponding revisions directory for keeping track of changes.
* Deleted tiddlers are backed up.
* Simple encrypted authentication.
* Dynamically generated tiddlers!!
This looks really neat, but I wll have to ask my geek brother to set this up for me. I guess everybody needs to improve their digital literacy,
So, will my changes be saved to the server?
That is what I'm looking for.
Awesome! Exactly what I need... I think. I need for multiple people to be able to edit, but what about conflict resolution?
Alas, there is no confilct resolution. Dang it!
Oh, yeah. One more little test. I wonder if the 'save changes' even needs to be clicked, or if just clicking 'done' does the magic?
No need for clicking 'save changes'. that's cool. I wonder why it's even in the menu?
Going to the server.......... Seems to be workin'
Using pytw the universe can be saved from Paris Hilton.
As she bids her time in jail we can busily use our tiddler to recompile the DNA that went so horribly wrong in the Hilton family.
So how good is this puppy?
Turns out it's pretty dang awesome. I'm sitting here, editing a tiddler, without
having logged in anywhere, or created any accounts... I'm simply ADDING CONTENT to pytw
and it's taking it, swallowing it, accepting it, and sharing it with the rest of the world...
Without any cops, politicians, sysadmins, managers, or other "officials" saying if I can or can't.
That's PRETTY DANG AWESOME. So, there IS a reason to rejoice!
This is TiddlyWiki <<version>>
blah
I love the simplicity and power of pytw. Very exciting!
* Save tiddlers to the server, and retrieve them from any internet connection... .
*... or save this page for a standard client-side TW!
* Caching on save/delete, making refresh occur at almost native speed.
* Instant notification if something goes amiss!
*Each tiddler has a corresponding revisions directory for keeping track of changes.
* Deleted tiddlers are backed up.
* Simple encrypted authentication.
* Dynamically generated tiddlers!!
I want to comment on this section
No, don't want to.
No?
We're not joking... ''you'' - YEAH YOU - anyone - can edit and add new tiddlers. Awesome, Huh? You can add new tiddlers, and edit them to your heart's content, and they will be saved to the server, but most of the "original" tiddlers are locked to prevent this site from eroding away. Edited. Another change! does this persist This is so darned neat. What is the version? <<version>> Here are the currently open tiddlers: <<listOpen>>
Still working?
A TW with a python backend? Rejoice!
Using pytw, changes made to tiddlers are saved on the server, so you don't have to download the html file and carry it with you. Compared to other server side packages for Tiddly Wiki, I maintain that pytw is one of the simplest (about 200 lines of code, gratuitously commented).
The package is available [[here|http://www.cs.utexas.edu/~joeraii/pytw/pytw.tar.bz2]]. Its ==hideous== ==alpha== ==beta== cool, and it works very well. Currently just load/save and keep track of revisions are supported, but extension modules can be written for more functionality (for example, the refresh module paired with dynamic fortune). Everyone understands why modularity is good, so I won't go into the lecture here. Suffice to say pytw will eventually support loading/saving from/to many kinds of backends (pickles, xml, plaintext, latex, pdf, etc) by just enabling certain modules. Also this architecture will allow for dynamically generated content.
Some UsageNotes. See the included [[1.1 README]] file for more detailed info.
Please play around with it, break it, hack on it. Make it better!!
''This demo site is set up currently so that anyone can add new tiddlers and edit them, but the "default" tiddlers are all locked.''
Post your general questions here and I (or some other savvy pytw user) will contribute an answer.
!!!Why does <<refreshDynamic>> take so much longer in general than simple reloading a permaview? (I've got about six little Python test importers, but surely it should be faster anyhow.)
The newest release (1.1) should be significantly faster in this respect, but will most likely still be slower than reload. The culprit is the refreshStory stuff that has to be done (i.e. check to see if the dynamic content generators made any new tiddlers, and if so refresh the sidebars). I'm honestly not sure why this is so slow. Might be a good question to ask the TW developers list.
!!!Will you add (serverside) the excludeLists tag to the DynamicNethackScores and DynamicFortune so they don't display always at the top of the timeline?
I would, but then how would people find out about them?
>too many dynamic tiddlers would crowd the top of the timeline. Perhaps a seperate tab on the sidebar for dynamic, this would allow them to be found? :)
!!!Is there a possibility for an auto-install script?
In what sense? All you do now is put the directory in your web root and edit the permissions. Auto install would require detecting what kind of webserver is running and I think thats a bit beyond my programming skills.
!!!Any suggestions how detection of concurrent modifications might be added?
I've been grappling with this problem for a while -- on one hand I don't want to add this because its necessarily complex and not part of the original TW -- however I think its important and needs to be addressed sooner rather than later (there are already several collaborative projects based on pytw). There is a very deep issue here, which is that at any one point in time, your //view// of the wiki could be stale. That is, if another user makes and commits a change, you will never get feedback unless you refresh. So this problem is actually more than just concurrent editing. The simplest way of addressing it is to add another field to the tiddler that contains its version number, and comparing version numbers on save -- if they match, then go ahead and perform the save -- if they don't, then save the tiddler with the two conflicting bodies and flag it somewhere as "NEEDS MERGING." Then the user who made the second edit could perform the merge. Of course adding a good UI to this would be important, which is why I have been so hesistant to solve it.
Could you refresh the tiddler content whenever someone clicks edit on a tiddler? This gets rid of the stale view of the wiki problem.
!!!What does tha auth.py password do? Does it allow me to turn off anonymous editing? How do I prevent wikispam?
How good should this be
aaa
how to get pytw working:
# unzip it, for example to /home/bob/public_html/
# set the first line in index.cgi to the path of the python interpreter
# if you have mod_python installed, do whatever needs to be done in that case (?)
# make /home/bob/public_html/store/ web-writable (which likely means world-writable). It contains .tiddler files (which also need to be web-writable), and directories for holding tiddler revisions. As a bit of a bonus, you can put .pdf files in there as well, and they will appear as tiddlers.
# optional: make a web-writable directory "tmp". pytw will dump any errors there; if you manage to create an error, please let the author know! joeraii, at, cs, dot, utexas, dot, edu If you want password-protection on the entire wiki:
# create /home/bob/public_html/.htaccess: AddCharset UTF-8 .html AuthUserFile /home/bob/.htpasswd AuthGroupFile /dev/null AuthName EnterPassword AuthType Basic require user joe bob lucy etc
# create /home/bob/.htpasswd: htpasswd -c /home/bob/.htpasswd joe (then type Joe's new password at the prompt) htpasswd -c /home/bob/.htpasswd bob (then Bob's new password) etc
I just put pytw on my server, really sweet stuff.
However, I noticed that the username/password mentioned in the setup is for blanket .htaccess restriction, no?
I see there is (in options) a place for a user name, but no password. However http://geekdom.net/tiddly/ (powered by pytw) has username & password, as well as it seems write blocking. How is that so? Is there a plugin I can get?
for node in storedirectory:
nodetext = getnodetext(node)
def nodegriditem(nodetext):
subdivs = nodetext.split("\sn")
subspans = nodetext.split(" ")
for ment in nodetext.split("\sn"):
output = output+<div>
for ele in ment: output = output + "<span>" + ele + "</span>"
output - output + </div>
Rob: This adaptation combines the use of SPAN elements in place of DIV sub-elements in tiddler nodes, combined with the functionality seen in DefaultTiddlers. This idea can be implemented in Python (serverside) or in the TiddlyWiki code (clientside). Apologies for not using the correct variable names and probably not getting the code right either, but I hope I'm successful in getting the idea across. Node width, height and other display properties might be set using tags and CSS. Is there a better way of implementing this in Python?
/* see also [[spanOption.comments]]. */
version.extensions.spanOption = {major: 0, minor: 1, revision: 0, date: new Date(2005,9,3)};
config.macros.spanOption = {
noTags: "The intended grid including columns of nodes could be not displayed for no particluar reason."
};
config.macros.spanOption.handler = function(place,macroName,params)
{
var spanOptionWrapper = createTiddlyElement(place,"span",null,"spanOption",null);
store.notifyAll();
var grid = store.getTiddlerText(this.TiddlerName);
if(window.location.hash)
displayTiddlers(null,convertUTF8ToUnicode(decodeURI(window.location.hash.substr(1))),1,null,null);
else if(grid)
displayTiddlers(null,grid,1,null,null);
createTiddlyElement(spanOptionWrapper,"span",null,null,this.noTags);
for (t=0; t<grid.length; t++) {
var spanOptionElement =createTiddlyElement(spanOptionWrapper,"span",null,null,null);
var theTag = createTiddlyButton(spanOptionElement,tags[t][0],this.tooltip);
theTag.setAttribute("tag",tags[t][0]);
}
createTiddlyElement(place,"p",null,"clearer",null);
};
Rob: perhaps displaying tiddlers in a grid can be done by tiddly macro. This would be according to whether the tiddler names are separated by inline space or line breaks. As of 03.09.2005, [[spanOption]] doesn't work. The code was adapted from another's macro, and I'm about as far forward with it as I can get. Can anybody give any coding tips, or continue where I left off?
For example, a Tiddly node listing other nodes contains something (shorter, but) like "[girl start end regular definite article]". This is parsed serverside and deliver the following content to the client:
{{{
<span class="sentence">
<span class="instance"
type="regular definite article"
language="french">girl
</span>
</span>
}}}
Output is rendered according to these CSS rules:
{{{
.RegularSentence-French {text:capitalize;
content-before:" ";
content-after:"."
}}}
They would be delivered in the same document. Only those rules found found in the source are served - though more than one language may be served - according to the client's request. There is little use in serving a page with unused styles.
This means changes to nodes and their CSS rules must be sent to the server and updated as necessary. The user sees:
{{{
La fille.
}}}
In this case, copy and paste becomes unuseful (you would usually just get "girl", or a relatively unhelpful source fragment), so these options must exist: -
* deliver the content as rendered by CSS rules
* deliver the content WYSIWYP ("//What You See is What You Paste//")
It may be better to use DIV rather than SPAN, but I am unsure if the extent to which this will make a positive difference.
--''Any thoughts?''
This is a very impressive achievement, Joe- I just wish I could find how to make the default TiddlyWiki 2 columns? I know it's basic CSS, but I can't track down exactly where it's adding the MainMenu layout- I just want to get rid of it. Don't mind me, just the ravings of a frustrated web designer Googling for the answer. (This is isn't for an assignment, btw!)
Could some evil hacker write nasty scripts, tag them with systemConfig and, say, insert in DefaultTiddlers?
I don't know how much harm JavaScript can do though. It's just that people may blame you for something evil hacker has edited on your site, no?
Joe: Yes, thats certainly possible, and a good caveat for why you should limit posting privileges to your wiki. ==It might be wise to devise a way to disable systemConfig for public wikis.== I wrote a version of the save handler that supports this. Go ahead and try tagging things with systemConfig :) Thanks for the heads up. If you're interested in the code, let me know, otherwise I'll release it with the rest of 1.0.6.
Text is so incredibly great, its hard to imagine why anyone would ever use tools that make it hard to get wonderful text like this.
pytw - A Python-based backend for TiddlyWiki. ver 1.1 ---- Copyright 2005 Joseph Reisinger This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --------- Contributors: Andrew Nelis (andrew.nelis@gmail.com), Devon Jones (soulcatcher@evilsoft.com), Rodney Gomes (rodneygomes@gmail.com) The AJAX code is based in part on the implementation by Dan Phiffer in TiddlyWikiRemote. http://www.phiffer.org/tiddly Thanks to Jeremy Ruston for birthing the original TiddlyWiki. --------- Version 1.1: - Architecture change: added a type to each tiddler to track what importer handles it. (Joe) - Cleaned up/optimized refresh.js. (Joe) - Bugfix: Fixed a small newline bug (Joe) and a similar bug with \ (Devon) - Bugfix: disabled "save changes" (Devon) - Added a mysql database backend (Devon) - Added a set of plugins for revisions (Rodney) Version 1.0.5: - Cleaned up the way error messages are generated on save/delete. (Joe) - Completely modularized importers/handlers. (Joe) - Only cache Static tiddlers, not dynamic ones. (Joe) - Added "plugins" and "importers" directory. (Joe) - Refresh tiddler module for dynamic tiddlers. (Joe) - Half-assed authentication module using crypt. (Joe) Version 1.0.4: - Added messageArea feedback if save/delete encounter errors. (Joe) Version 1.0.3: - Added caching of rendered divs (Andrew) - Optimize import cgi (Andrew) - Decrease the visual feedback lag of saving/deleting (javascript) (Joe) Version 1.0.2: - Cleaned up utf-8 handling. Should be faster. (Joe) Version 1.0.1: - Incorporated some changes by Andrew Nelis. - Should now work correctly under windows. - Code cleanups and optimizations. Version 1.0.0 - Initial release. --------- Design notes: - Clean modularity. Currently importers are responsible for their own save/delete code, and save/delete messages will be routed accordingly. In other words, if a pdfimporter creates a tiddler, and you try to delete it, the delete request will be forwarded to the pdfimporter (as expected). KNOWN BUGS: - There are some rather insideous timing bugs. Since the engine is stateless, a user can, for example, delete a tiddler, and then refresh and have the page reload before the delete finishes. This is compounded with the addition of the cache. --------- Some notes on running pytw: Setting Up: First things first, in order to get this software to run, you need to have your permissions and paths set up correctly. The first line of index.cgi points to where I think your python installation is. This is probably incorrect. Change it. Note that if you are using mod_python, or something like that, this line should not be necessary. Next, the directory store needs to be writable by the webserver. This is where /all/ the tiddler content will be saved. No exceptions. Finally, for debugging purposes it is possible to enable cgitb (see index.cgi). You will need to create a web-writable directory tmp, to contain the error logs. The pytw structure: The pytw code is extremely modularized in order to facilitate rapid development of new functionality, and also to optimize the critical code path (load). Functionality is imported as needed, on the fly. Go ahead and look at the first block of code in tw.py (the main codebase). The Globals section there defines what modules are being used. Currently there are three kinds of extenstions that work together (mostly) in harmony. They are divided among three types: Javascript Plugins to TW (TWPlugins, found in plugins/) Static and Dynamic Content generators (StaticContent, DynamicContent, found in importers/) Handlers (Handlers, found in handlers/) Javascript Plugins: These are plugins that extend the client-side functionality. They are appended as-is to the tiddlywiki.html as it is sent to the browser. remote.js -- This contains the basic AJAX code that hijacks save and delete and sends the information back to the server. This is necessary in all cases except where you want pytw to function as a normal tiddlywiki. refresh.js -- This contains the client side handler for dynamic tiddler refresh. It allows for the "refresh" button as well as handles the xml that comes back from the server after that button is pressed. Necessary if you want the "refresh" button functionality. password.js -- Adds support for password fields. can now be used in tiddlers. password-cookie.js -- Adds support for saving the user's password in the cookie (in plain text). Content Generators: Content generators handle reading and writing (and sometimes dynamically generating) tiddler data. Currently pytw uses pickles to store each of the tiddlers individually, but eventually I'd like to have content generators for many kinds of backends. For example, plain text tiddlers, xml formatted tiddlers, even sql database tiddlers. This will allow pytw uses to "pick their poison" depending on their tastes. pickleimporter.py -- This is the main workhorse for loading and saving to the pickle tiddler store. This should be the template for people wishing to make their own importers. pdfimporter.py -- This importer reads the directory list store/ and makes any pdf file present into a tiddler containing a link to that file. This is an example of a DynamicContent generator. Notice how it returns false on save/delete attemps. Eventually these could be used to faciliate, e.g. rename and delete. Handlers: Handles dispatch POSTS from the server. For example, save, delete, and refresh. Also provided are authsave and authdelete, which check to see if the users password is correct. Authentication: Authentication is currently provided for save and delete through the authsave and authdelete Handlers. They rely on the auth.py functionality, which checks the users's password against a hashed copy stored locally. This is a step up above storing the password in plain text, but is by no means extremely secure. I plan on revamping this significantly in the future. Currently only a single user is supported, though it would be trivial to add multi-user support. To change the password, run this at the python prompt >>> import crypt >>> crypt.crypt( 'banana', 'g2' ) 'g21AQ08qaSuoU' Where 'banana' is the plain text of the password you want, 'g2' is any two character string (alphanumeric). Copy the resulting hashed password into the password field in auth.py.
The following was the update step for 1.2.32, but it is still valid.
>As of this writing the current TiddlyWiki version is [[1.2.32|http://www.tiddlywiki.com/#%5B%5BRevision%201.2.32%5D%5D]]
>Patience? Look what pytw can do already!
Sorry. I'm driving from New York to Texas at the moment, so updating is hard. Luckily this one is trivial :) All you need to do (I think) is just download the new version, remove //everything// after the opening <div> for storeArea (including the tiddler divs, close div, close html and close body tags), and then point TWBase to the new file. If you think this is too much work, look at the function {{{render_page}}} in {{{tw.py}}} and make it better :) Anyway, I'll try to get a minor update tonight fixing this. -- Joe
The "minor update" is done. Basically did just what I said above. Everything seems to work (auth, save/delete/refresh, dynamic tiddlers), but there may still be bugs. Re-download, or just follow the above procedure. -- Joe
This being the sandbox. Add questions and answers here:
* Any suggestions how detection of concurrent modifications might be added?
**Joe: I added a "[[General FAQ]]" tiddler for questions like this.
*More detailed installation instructions would be much appresiated...
*testing mmmhhhhhhh hallo hi
''Example of tables'' <html> <table> <tr> <td> Top left </td> <td> Top right </td> </tr> <tr> <td> Bottom left </td> <td> Bottom right </td> </tr> </table> </html>
all is well, though we aren't certain woohab
hey, what version of tiddlywiki is this based on?
so. much. fun. fun. simultaneous edits anyone?
I dig it.
Editing test. Это русский текст -- Russian text.
Yet another Russian language test. Ещё один тест русского языка.
It's more pronounceable, like 'twippee' (or for us older folks, kind of like we frequently uttered way back when, 'Trippy!', with a slight speech impediment).
Nice tool. Thinking about a bzr backend, and my standard hack to create a new tiddler (on the file system) from any text I can select anywhere...
How about preserving taggedlistopts metadata?
Craig
Type the text for 'New Tiddler'
"""bzr is a revision control system, written in Python, that is similar to CVS, but less developed. Find it at http://www.bazaar-ng.org/
bzr version 0.6 is required.
You have to have created a bzr repository already, and you probably want to add all your existing tiddlers to it.
Before you do that, you might want to move all your old tiddler versions (which are in subdirectories under the store directory) into another location, or they too will be added into the bzr repository. Then, for example (from the top level twpy directory):
{{{
bzr init
bzr add store
bzr commit --message="initial checkin"
}}}
To install:
# put bzrimporter.py in the importers subdirectory
# in tw.py, replace 'pickleimporter' with 'bzrimporter'
Should save lots of space as compared to keeping entire tiddlers around for each revision.
Think of it as a proof of concept...
This is the work of a contributor, not the good and sharp folks responsible for pytw (or twpy, as I know it).
"""
{{{
"""bzrimporter.py version 0.3
requires bzr version 0.6
Craig Allen knodalyte at gmail dot com
saves all iterations to a document to a bzr branch
bzr: bzr: http://www.bazaar-ng.org/
"""
from tw import tiddler_to_markup, escape_html
import os, pickle
from bzrlib import add
from bzrlib.commit import Commit
from bzrlib.branch import Branch
def load_tiddlers( store_files ):
"""
Import .tiddlers which are pickles.
"""
# Cache the reference as optimization.
pload = pickle.load
# Load each .tiddler file that appears in the store/ directory.
return ''.join( [tiddler_to_markup( pload( open('store/%s' % tiddler) ), 'bzrimporter' ) \
for tiddler in store_files if tiddler.endswith('.tiddler')] )
def save_tiddler( content ):
"""
Write the tiddler contents to the store as separate pickle file.
"""
revision_path = 'store/%s' % content['title']
#revision_file = '%s/%s.tiddler' % (revision_path, content['modified'])
tiddler_file = '%s.tiddler' % revision_path
try:
# Write the revision file.
#pickle.dump(content, open(revision_file, 'w'))
# Write the actual tiddler file; if we're running on a sane OS, use fcntl.
f = open(tiddler_file, 'w')
try:
import fcntl
fcntl.flock(f, fcntl.LOCK_EX)
except ImportError:
pass
pickle.dump(content, f)
f.close()
except:
print 'Error writing "%s" to server.' % tiddler_file
# Handle rename correctly.
if content['title'] != content['oldtitle']:
delete_tiddler( content['oldtitle'] )
# add to bzr repository and commit
try:
add.smart_add([tiddler_file], recurse=False)
#print 'file %s added' % tiddler_file
commit = Commit()
commit.commit(Branch.open('.'), 'no msg', timestamp=None, timezone=None, committer=None, verbose=True, specific_files=tiddler_file, rev_id=None)
#print 'file %s committed' % tiddler_file
return True
except Exception, e:
print 'error with bzr', e
return False
def delete_tiddler( title ):
"""
Deprecate tiddlers and their archives on delete.
"""
from shutil import rmtree
# Clear out any previous backups.
old_revision_path = 'store/%s~' % title
old_deprecated_tiddler = 'store/%s.deprecated' % title
try:
if os.path.exists( old_revision_path ):
rmtree( old_revision_path )
if os.path.exists( old_deprecated_tiddler ):
os.remove( old_deprecated_tiddler )
except Exception:
print 'Error removing previous deprecated tiddler or archive.'
# Move the tiddler and revision archive into a backup position.
current_tiddler = 'store/%s.tiddler' % title
current_revision_path = 'store/%s' % title
try:
if os.path.exists( current_tiddler ):
os.rename( current_tiddler, 'store/%s.deprecated' % title)
if os.path.exists( current_revision_path ):
os.rename( current_revision_path, '%s~' % current_revision_path )
except:
print 'Error deprecating tiddler "%s".' % title
return True
}}}
Type the text for 'New Tiddler' ...
Can I install the reminders plugin with pytw? [[My New Tiddler]]
[[This is an important feature in tiddlywiki?]] should link.
Æ·‣€ åäö ÅÄÖØæ&&ˇ`÷× æ”¢ðeđŋħ→jĸłµnøþ@¶ßŧ↓“ł»←« Æ'©ÐEªŊĦıJ&ŁºNØÞΩ®§Ŧ↑`Ł>¥ <¦|\˙^¸˛.¿· What you see might depend on the encoding your browser is set to display (e.g. utf-8, etc). But that's relatively old news, isn't it?
very simple.
>I downloaded and installed pytw. The download files contain Dynamic tiddlers which cannot be deleted. I don't get the Fortune content this tiddler is supposed to display, it just stays blank. Apparently, DynamicFortune is -attempting- to run on it's own, but is producing no content, so it's tiddler is appearing on each day's timeline. How do I get rid of these dynamic tiddlers? I don't see anything in Store to delete. I'm not familiar with python either and don't know how to login to it to see what's going on. (I know, I'm hopeless here. LOL) >Also, there are revision/diffto buttons on each of my tiddlers, which I don't see here on your site, but which were included in the download. I'm getting date errors on those and don't know how to get rid of them. >Currently, my server is having problems storing passwords. I've sent in Trouble Tickets to my hosts about this, but for two months now, the problem has existed and not been fixed. Because of this server problem, pytw never asks for a password or stores one either. (I know, this is nothing you can do anything about). As such, my installation is wide open to the public, apparently. >I'm on the Google Groups general discussion mailing list, as of last night and trying to follow along and figure this all out. Any help you could offer would be appreciated. >- Aine >aine |.| macdermot |at| gmail |.| com Edit your tw.py file to read: {{{DynamicContent = []}}} in place of: {{{DynamicContent = ['fortune']}}} The part you'll want to look at is around line 40 in ''tw.py''. The directory ''Store'' does not contain dynamic nodes like //fortune//, which is usually a program on *nix OSes that pytw calls if ''fortune'' is included in the DynamicContent list. The password issue is harder though, sorry. Easy does it, Rob --- Thank you, Rob. That did the trick, got rid of the DynamicFortune. :) - Aine
>Are you going to support Internet Explorer 6? When I open you site in IE, I get an error in custom >config and when editing this tiddler, the textarea is extended under the menu on the right! It happens for every key I enter and is corrected when I move the mouse into the textarea.
I added Devon's fix for one of the IE newline bugs in the most recent version 1.1.0.1 (just download again). Let me know if this fixes the problem -- Joe
> Could be possible to store even imgs ??
Yes. To the extent that [[TiddlyWiki|http://www.tiddlywiki.com/]] can generate images (http://www.tiddlywiki.com/#SparkLines), or include those to which it links (see http://www.tiddlywiki.com/#EmbeddedImages)
.
Disclaimers I am a python programmer by trade, however I am not a javascript programmer. I'm no the author of any of the systems involved, just a user who wanted things to be just so. Hopefully I've laid out the steps simply enough that a non-programmer can follow them, however I am not a tech writer by trade :).
Hopefully this will help those like be who wanted the backend but also wanted to use the most recent tiddlywiki codebase and didn't want to reinvent the wheel for no good reason.
# Backup all files before changing them.
# Get pytw working as normal with its default tiddler
#Get empty.html from original tiddler site put it in the pytw directory. (Same directory as tiddlywiki-1.2.38.html file)
#@@bgcolor(white):Edit tw.py chage the line:
>@@bgcolor(lightgray):{{{TWBase = 'tiddlywiki-1.2.38.html'}}}@@
to:
>@@bgcolor(lightgray):{{{TWBase = 'empty.html'}}}@@
Save the file.
At this point reloading the file will produce a somthing looking like tiddler 2.0 until the end of the GettingStarted tiddler then gobblygook.@@
#Remove the last several lines from the empty.html file. Find the last </div>. Should be 6 lines from th end of the file. Place '<!--' if front of that tag. Add '-->' to the very end of the file. (don't include the quote marks(') in either of those places. At this point it reads from the backend storage, but attempting to create a new tiddler results in no action when pressing the done button/link.
#@@bgcolor(white):Replace the line:
>@@bgcolor(lightgray):{{{'&type= 'encodeURIComponent(store.tiddlers[title].type);}}}@@
with this:
>@@bgcolor(lightgray):{{{'&type=' + encodeURIComponent(this.getTiddler(newTitle).type);}}}@@
This line appears in two places, replace them both. The one in the removeTiddler function seems to work fine with either version but might as well change it to use the proper acccessor method.@@
In my test platform I've disabled refresh.js and revisions.js in tw.py and I now have what seems to be a working tiddlywiki using the 2.0 code. If there are problems in refresh.js or revisions.js they can be disable by changing this line:
@@bgcolor(lightgray):{{{TWPlugins = ['remote.js', 'refresh.js', 'revisions.js']}}}@@
to this:
@@bgcolor(lightgray):{{{TWPlugins = ['remote.js']}}}@@
in tw.py.
Hopefully this is of some assitance. I'll see if I can get to testing refresh.js and revisions.js in the next couple of days.
* Okay, so how did that go? --[[PeterMerel]]
* We all want to know. Hey Joe? can we expect your genius to be applied to this one? --[[SimonRyan]]
//This rearranges the sidebars
var contentWrapper = document.getElementById('contentWrapper');
var sidebar = document.getElementById('sidebar');
sidebar.insertBefore(document.getElementById('mainMenu'),document.getElementById('sidebarOptions'))
My CSS ain't so good, but the new GTD stylesheet isnt being rendered properly by my Firefox (1.0.7). The opened tiddlers have floated all the way down to the bottom of the sidebar.
And the default tiddlers are rendering incorrectly...
[
Download
]
[
Refresh
]
etc
Clint's Answer:
The errors are because the HtmlStructure tiddler is tagged as 'SystemConfig' rather than 'systemConfig' (that tag is blocked on this site). The HTML needs just a touch of re-arranging. I wouldn't recommend using the HtmlStructure yet though, because TW version 1.2.39 (currently in beta) has a bettwe mechanism for re-aranging the layout.
In fact, Joe, you will want to limit with the Safe Save for the tiddler titled 'PageTemplate' as anyone could really screw up the TW layout by changing that tiddler (in .39 that is)
/* Style created by Nathan Bowers http://shared.snapgrid.com/gtd_tiddlywiki.html
Imported and improved upon by Clint Checketts
checketts [at] gmail -dot- com
{{{
*/
*{
margin: 0;
padding: 0;
}
body {
background: #464646 url('http://shared.snapgrid.com/images/tiddlywiki/bodygradient.png') repeat-x top fixed;
color: #000;
font: 13px/125% "Lucida Grande", "Trebuchet MS", "Bitstream Vera Sans", Verdana, Helvetica, sans-serif;
_text-align: center;
}
#contentWrapper {
position: relative;
margin: 0 auto;
padding: 0;
border: 1px black;
width: 775px;
_width: 770px; /* CSS UNDERSCORE HACK FOR PROPER WIN/IE DISPLAY */
_text-align: left; /* CSS UNDERSCORE HACK FOR PROPER WIN/IE DISPLAY */
}
#header{
color: #fff;
padding: 20px 20px 10px 0;
}
#mainMenu {
position: static;
line-height: 166%;
background: #600;
border-right: 3px solid #500;
width: 215px;
padding: 0;
text-align: left;
}
* html #mainMenu{
width: 218px;
}
#sidebar {
position: static;
margin: 2em 0 0 0;
float: left;
clear: left;
color: #000000;
width: 218px;
}
#displayArea {
float: right;
margin: 0 2em 0 0;
_margin: 0;
width: 520px;
_width: 545px; /* CSS UNDERSCORE HACK FOR PROPER WIN/IE DISPLAY */
}
#messageArea
{
position: fixed;
top: 5px;
right: 10px;
font-size: 13px;
font-weight: bold;
padding: 5px;
margin: 5px 0px;
background: #ffe72f;
border-right: 3px solid #da1;
border-bottom: 3px solid #a80;
text-align: center;
display: none;
}
a:link, a:visited, a:hover, a:active {
text-decoration: none;
}
/* HEADER ========================================================== */
#titleLine{
background: transparent;
margin: 0;
padding: 0;
}
#siteTitle {
font-size: 30px;
}
#siteSubtitle {
font-size: 13px;
padding-left: 10px;
}
#titleLine a {
color: #cf6;
}
/* SIDEBARS ========================================================== */
#mainMenu a {
color: #fff !important;
background: #700;
display: block;
padding: 0 5px 0 10px;
height: 22px;
line-height: 22px;
border-bottom: 1px solid #500;
border-top: 1px solid #900;
text-transform: capitalize;
}
#mainMenu a.tiddlyLink:hover, #mainMenu a.button:hover{
background: #b00 !important;
}
#sidebarTabs {
background: transparent;
padding: 8px 0 0 10px;
}
#sidebarTabs a {
color: #fff;
padding: 2px 8px 1px 8px;
height: 22px;
}
#sidebarTabs a:hover {
background: #000;
color: #fff;
}
#sidebarTabs a:active {
color: #000000;
}
#sidebarContent{
padding: 0 10px 10px 10px;
font-size: 11px;
clear: both;
}
#sidebarContent br{
display: none;
}
.sidebarSubHeading {
padding: 8px 0 0 0;
display: block;
width: 100%;
color: #000;
}
#sidebarContent a {
color: #fff;
display: block;
margin: 1px 0 1px 5px;
padding: 0;
width: 100%;
}
#sidebarContent a:hover {
color: #fff;
background: #000;
}
#sidebarOptions {
background: #eeb !important;
border-right: 3px solid #bb8;
color: #b4c675 !important;
padding: 5px 0;
}
#sidebarOptions a {
color: #700 !important;
display: block;
padding: 0 !important;
margin: 3px 10px;
}
#sidebarOptions a:hover, #sidebarOptions a:active {
color: #fff !important;
background: #700 !important;
}
#sidebarOptions input {
margin: 2px 10px;
border: 1px inset #333;
}
#sidebarOptions .sliderPanel {
display: none;
background: #fff;
color: #000;
padding: 5px 10px;
font-size: 11px;
}
.sliderPanel div{
margin: 5px 0;
}
#sidebarOptions .sliderPanel a:link, #sidebarOptions .sliderPanel a:visited {
color: #17b !important;
font-weight: normal;
margin: 0;
display: inline;
}
#sidebarOptions .sliderPanel a:hover, #sidebarOptions .sliderPanel a:active {
color: #fff !important;
background: #000;
}
.optionsText {
margin: 2px 0;
}
#tabTimeline {
font-weight: bold;
display: inline;
background: #960;
border-right: 1px solid #740;
}
#popup{
background-color: #cf6;
color: #000;
}
.tabset{
border-right: 3px solid #bb8;
background-color: #eeb;
}
#contentWrapper a.tab {
font-weight: bold;
display: inline;
margin: 0px 2px;
border-right:1px solid #aaa;
font-size: 12px;
color: #fff !important;
text-decoration: none;
}
#contentWrapper a.tab:hover {
background: #000 !important;
}
#contentWrapper a.tabSelected {
background-color: #960 !important;
border-right: 1px solid #740;
padding: 4px 4px 2px 4px;
}
#contentWrapper a.tabUnselected {
background-color: #660 !important;
border-right: 1px solid #440;
padding: 4px 4px 0px 4px;
color: #fff !important;
}
/*===================================================================*/
/*=====================================================================*/
#sidebarTabs{
margin: 0;
padding: 0;
}
#contentWrapper .tabContents {
background-color: #960;
border-bottom: solid #520 2px;
border-right: 3px #740 solid;
width: 204px;
}
* html #contentWrapper .tabContents {
width: 218px;
}
#contentWrapper .tabContents a.tiddlyLink, #contentWrapper .tabContents a.button{
height: auto;
margin: 0 0 0 1em !important;
padding: 0 !important;
background-color: transparent;
color: #fff !important;
font-weight: normal;
text-decoration: none;
}
#contentWrapper .tabContents a.tiddlyLink:hover,#contentWrapper .tabContents a.button:hover{
background-color: #000;
}
#contentWrapper .txtMoreTab .tabset{
border: 0;
background-color: transparent;
}
#contentWrapper .txtMoreTab a.tabUnselected {
background-color: #b00 !important;
padding: 2px 4px 0px 4px;
color: #fff !important;
border-right: 1px solid #900;
}
#contentWrapper .txtMoreTab a.tabSelected {
background-color: #700 !important;
padding: 2px 4px 2px 4px;
color: #fff !important;
border-right: 1px solid #500;
}
#contentWrapper .txtMoreTab a.tab:hover {
background-color: #000 !important;
border-right: 1px solid #500;
}
.txtMoreTab .tabContents {
background-color: #700 !important;
border-right: 3px solid #500 !important;
border-bottom: 3px solid #500 !important;
color: #fff;
font-weight: bold;
}
.txtMoreTab .tabContents a{
font-weight: normal;
background-color: transparent !important;
}
.txtMoreTab .tabContents a:hover{
background-color: #000 !important;
}
#sidebar popup{
padding: 0;
}
#contentWrapper .viewer #popup *{
color: #000 !important;
}
#contentWrapper #popup a{
color: #000 !important;
margin: 0 !important;
padding: 0;
}
#contentWrapper #popup hr{
border-top: solid 1px #000;
border-left: 0;
border-right: 0;
border-bottom: none;
height: 1px;
color: #000;
margin: 5px 0 !important;
}
#contentWrapper #popup a:hover{
background-color: #ef9 !important;
}
/* TIDDLER DISPLAY/EDIT SPACE ============================================= */
.tiddler {
margin: 0 0 10px 0;
padding: 0 15px;
width: 99%;
border-right: 3px solid #aaa;
border-bottom: 3px solid #555;
background: #fff;
}
#displayArea .tiddlyLinkExisting {
font-weight: bold;
text-decoration: none;
}
#displayArea .tiddlyLinkNonExisting {
font-style: italic;
text-decoration: none;
}
#displayArea .externalLink {
text-decoration: underline;
}
.title {
font-size: 1.5em;
padding: 0 0 0 0;
font-weight: bold;
display: block;
color: #900;
}
.toolbar {
font-weight: normal;
font-size: 11px;
visibility: hidden;
text-align: right;
padding: 5px 0;
}
.toolbar a {
padding: 1px 5px;
color: #000 !important;
text-decoration: none;
border: 1px outset #cf6;
background: #cf6;
}
.toolbar a:hover {
background: #ef9 !important;
}
.toolbar a:active {
background: #ff0 !important;
}
.viewer .tabset{
background: transparent;
border: 0;
}
.viewer a.button{
background-color: transparent !important;
color: #700 !important;
}
.viewer {
line-height: 140%;
}
.viewer a:link, .body a:visited {
color: #15b;
text-decoration: underline;
}
.viewer a:hover {
color: #fff;
background: #000;
}
.viewer pre {
overflow: auto;
width: 480px;
padding-bottom: 1em;
}
.viewer blockquote {
border-left: 3px solid #777;
margin: 5px;
padding: 5px;
}
.viewer ul {
padding-left: 30px;
}
.viewer ol {
padding-left: 30px;
}
ol
{
list-style-type: decimal;
}
ol ol
{
list-style-type: lower-alpha;
}
ol ol ol
{
list-style-type: lower-roman;
}
.viewer ul, .viewer ol, .viewer p {
margin: 5px 0 12px 0;
}
.viewer li {
margin: 3px 0;
}
.viewer h2,h3,h4,h5,h6 {
font-weight: bold;
background: #eee;
padding: 2px 10px;
margin: 5px 0;
}
.viewer h2 {
font-size: 1.3em;
}
.viewer h3 {
font-size: 1.2em;
}
.viewer h4 {
font-size: 1.1em;
}
.viewer h5 {
font-size: 1em;
}
.viewer h6 {
font-size: .9em;
}
.viewer table {
border-collapse: collapse;
border: 2px solid #303030;
font-size: 11px;
margin: 10px 0;
}
.viewer th {
background: #eee;
border: 1px solid #aaa;
padding: 3px;
}
.viewer td {
border: 1px solid #aaa;
padding: 3px;
}
.viewer caption {
padding: 3px;
}
.viewer hr {
border: none;
border-top: dotted 1px #777;
height: 1px;
color: #777;
margin: 7px 0;
}
.body
{
margin: 5px 0 15px 0;
padding: 5px 0;
border-top: 1px solid #ccc;
}
.highlight {
color: #000;
background: #ffe72f;
}
.editor {
font-size: 8pt;
color: #402C74;
font-weight: normal;
padding: 10px 0;
}
.editor input, .editor textarea {
display: block;
font: 10px/130% "Andale Mono", "Monaco", "Lucida Console", "Courier New", monospace;
margin: 0 0 10px 0;
border: 1px inset #333;
padding: 2px 0;
}
.editor textarea {
height: 500px;
}
input:focus, textarea:focus
{
background: #ffe;
border: 1px solid #000 !important;
}
.editorFooter, .footer{
font-size: 10px;
}
.editorFooter a.button:hover, .footer a.button:hover{
color: #fff;
}
#storeArea, #copyright, .site_description {
display: none;
}
#floater {
background: #df9;
border: 3px solid #999;
color: #df9;
}
@media print{
*
{
margin: 0;
padding: 0;
}
body {
background: #fff;
color: #000;
width: 2.5in;
height: 4.7in;
font-size: 6.2pt;
font-family: "Lucida Grande", "Bitstream Vera Sans", Helvetica, Verdana, Arial, sans-serif;
}
img {
max-width: 2.2in;
max-height: 4.3in;
}
#header, #side_container, #storeArea, #copyright, .toolbar, #floater, #messageArea, .save_accesskey, .site_description
{
display: none;
}
#tiddlerDisplay, #displayArea
{
display: inline;
}
.tiddler {
margin: 0 0 2em 0;
border-top: 1px solid #000;
page-break-before: always;
}
.tiddler:first-child {
page-break-before: avoid;
}
.title {
font-size: 1.6em;
font-weight: bold;
margin-bottom: .3em;
padding: .2em 0;
border-bottom: 1px dotted #000;
}
p, blockquote, ul, li, ol, dt, dd, dl, table
{
margin: 0 0 .3em 0;
}
h1, h2, h3, h4, h5, h6
{
margin: .2em 0;
}
h1
{
font-size: 1.5em;
}
h2
{
font-size: 1.3em;
}
h3
{
font-size: 1.25em;
}
h4
{
font-size: 1.15em;
}
h5
{
font-size: 1.1em;
}
blockquote
{
margin: .6em;
padding-left: .6em;
border-left: 1px solid #ccc;
}
ul
{
list-style-type: circle;
}
li
{
margin: .1em 0 .1em 2em;
line-height: 1.4em;
}
table
{
border-collapse: collapse;
font-size: 1em;
}
td, th
{
border: 1px solid #999;
padding: .2em;
}
hr {
border: none;
border-top: dotted 1px #777;
height: 1px;
color: #777;
margin: .6em 0;
}}
/*
}}}
*/
/* Style created by Nathan Bowers http://shared.snapgrid.com/gtd_tiddlywiki.html
Imported and improved upon by Clint Checketts
checketts [at] gmail -dot- com */
*{
margin: 0;
padding: 0;
}
body {
background: #464646 url('http://shared.snapgrid.com/images/tiddlywiki/bodygradient.png') repeat-x top fixed;
color: #000;
font: 13px/125% "Lucida Grande", "Trebuchet MS", "Bitstream Vera Sans", Verdana, Helvetica, sans-serif;
_text-align: center;
}
#contentWrapper {
position: relative;
margin: 0 auto;
padding: 0;
border: 1px black;
width: 775px;
_width: 770px; /* CSS UNDERSCORE HACK FOR PROPER WIN/IE DISPLAY */
_text-align: left; /* CSS UNDERSCORE HACK FOR PROPER WIN/IE DISPLAY */
}
#header{
color: #fff;
padding: 20px 20px 10px 0;
}
#mainMenu {
position: static;
line-height: 166%;
background: #600;
border-right: 3px solid #500;
margin: 1em 0 0 0;
width: 215px;
padding: 0;
text-align: left;
}
#sidebar {
position: static;
margin: 2em 0 0 0;
float: left;
clear: left;
color: #000000;
width: 218px;
}
#displayArea {
float: right;
margin: 0 2em 0 0;
_margin: 0;
width: 520px;
_width: 545px; /* CSS UNDERSCORE HACK FOR PROPER WIN/IE DISPLAY */
}
#messageArea
{
font-size: 13px;
font-weight: bold;
padding: 5px;
width: 41em;
margin: 5px 0px;
background: #ffe72f;
border-right: 3px solid #da1;
border-bottom: 3px solid #a80;
text-align: center;
display: none;
}
a:link, a:visited, a:hover, a:active {
text-decoration: none;
}
/* HEADER ========================================================== */
#titleLine{
background: transparent;
margin: 0;
padding: 0;
}
#siteTitle {
font-size: 30px;
}
#siteSubtitle {
font-size: 13px;
padding-left: 10px;
}
#titleLine a {
color: #cf6;
}
/* SIDEBARS ========================================================== */
#mainMenu a {
color: #fff !important;
background: #700;
display: block;
padding: 0 5px 0 10px;
height: 22px;
line-height: 22px;
border-bottom: 1px solid #500;
border-top: 1px solid #900;
text-transform: capitalize;
}
#mainMenu a.tiddlyLink:hover, #mainMenu a.button:hover{
background: #b00 !important;
}
#sidebarTabs {
background: transparent;
padding: 8px 0 0 10px;
}
#sidebarTabs a {
color: #fff;
padding: 2px 8px 1px 8px;
height: 22px;
}
#sidebarTabs a:hover {
background: #000;
color: #fff;
}
#sidebarTabs a:active {
color: #000000;
}
#sidebarContent{
padding: 0 10px 10px 10px;
font-size: 11px;
clear: both;
}
#sidebarContent br{
display: none;
}
.sidebarSubHeading {
padding: 8px 0 0 0;
display: block;
width: 100%;
color: #000;
}
#sidebarContent a {
color: #fff;
display: block;
margin: 1px 0 1px 5px;
padding: 0;
width: 100%;
}
#sidebarContent a:hover {
color: #fff;
background: #000;
}
#licensePanel {
padding: 0px 10px;
font-size: 11px;
}
#licensePanel a {
color: #960;
display: block;
margin-top: 10px;
}
#licensePanel a:hover {
color: #fff;
}
#licensePanel a:active {
color: #fff;
}
#sidebarOptions {
background: #eeb !important;
border-right: 3px solid #bb8;
color: #b4c675 !important;
padding: 5px 0;
}
#sidebarOptions a {
color: #700 !important;
display: block;
padding: 0 !important;
margin: 3px 10px;
}
#sidebarOptions a:hover, #sidebarOptions a:active {
color: #fff !important;
background: #700 !important;
}
#sidebarOptions input {
margin: 2px 10px;
border: 1px inset #333;
}
#sidebarOptions .sliderPanel {
display: none;
background: #fff;
color: #000;
padding: 5px 10px;
font-size: 11px;
}
.sliderPanel div{
margin: 5px 0;
}
#sidebarOptions .sliderPanel a:link, #sidebarOptions .sliderPanel a:visited {
color: #17b !important;
font-weight: normal;
margin: 0;
display: inline;
}
#sidebarOptions .sliderPanel a:hover, #sidebarOptions .sliderPanel a:active {
color: #fff !important;
background: #000;
}
.optionsText {
margin: 2px 0;
}
#tabTimeline {
font-weight: bold;
display: inline;
background: #960;
border-right: 1px solid #740;
}
#popup{
background-color: #cf6;
color: #000;
}
.tabset{
border-right: 3px solid #bb8;
background-color: #eeb;
}
#contentWrapper a.tab {
font-weight: bold;
display: inline;
margin: 0px 2px;
border-right:1px solid #aaa;
font-size: 12px;
color: #fff !important;
text-decoration: none;
}
#contentWrapper a.tab:hover {
background: #000 !important;
}
#contentWrapper a.tabSelected {
background-color: #960 !important;
border-right: 1px solid #740;
padding: 4px 4px 2px 4px;
}
#contentWrapper a.tabUnselected {
background-color: #660 !important;
border-right: 1px solid #440;
padding: 4px 4px 0px 4px;
color: #fff !important;
}
/*===================================================================*/
/*=====================================================================*/
#sidebarTabs{
margin: 0;
padding: 0;
}
#contentWrapper .tabContents {
background-color: #960;
border-bottom: solid #520 2px;
border-right: 3px #740 solid;
}
#contentWrapper .tabContents a.tiddlyLink, #contentWrapper .tabContents a.button{
height: auto;
margin: 0 0 0 1em !important;
padding: 0 !important;
background-color: transparent;
color: #fff !important;
font-weight: normal;
text-decoration: none;
}
#contentWrapper .tabContents a.tiddlyLink:hover,#contentWrapper .tabContents a.button:hover{
background-color: #000;
}
#contentWrapper .txtMoreTab .tabset{
border: 0;
background-color: transparent;
}
#contentWrapper .txtMoreTab a.tabUnselected {
background-color: #b00 !important;
padding: 2px 4px 0px 4px;
color: #fff !important;
border-right: 1px solid #900;
}
#contentWrapper .txtMoreTab a.tabSelected {
background-color: #700 !important;
padding: 2px 4px 2px 4px;
color: #fff !important;
border-right: 1px solid #500;
}
#contentWrapper .txtMoreTab a.tab:hover {
background-color: #000 !important;
border-right: 1px solid #500;
}
.txtMoreTab .tabContents {
background-color: #700 !important;
border-right: 3px solid #500 !important;
border-bottom: 3px solid #500 !important;
color: #fff;
font-weight: bold;
}
.txtMoreTab .tabContents a{
font-weight: normal;
background-color: transparent !important;
}
.txtMoreTab .tabContents a:hover{
background-color: #000 !important;
}
#sidebar popup{
padding: 0;
}
#contentWrapper .viewer #popup *{
color: #000 !important;
}
#contentWrapper #popup a{
color: #000 !important;
margin: 0 !important;
padding: 0;
}
#contentWrapper #popup hr{
border-top: solid 1px #000;
border-left: 0;
border-right: 0;
border-bottom: none;
height: 1px;
color: #000;
margin: 5px 0 !important;
}
#contentWrapper #popup a:hover{
background-color: #ef9 !important;
}
/* TIDDLER DISPLAY/EDIT SPACE ============================================= */
.tiddler {
margin: 0 0 10px 0;
padding: 0 15px;
width: 99%;
border-right: 3px solid #aaa;
border-bottom: 3px solid #555;
background: #fff;
}
#displayArea .tiddlyLinkExisting {
font-weight: bold;
text-decoration: none;
}
#displayArea .tiddlyLinkNonExisting {
font-style: italic;
text-decoration: none;
}
#displayArea .externalLink {
text-decoration: underline;
}
.title {
font-size: 1.5em;
padding: 0 0 0 0;
font-weight: bold;
display: block;
color: #900;
}
.toolbar {
font-weight: normal;
font-size: 11px;
visibility: hidden;
text-align: right;
padding: 5px 0;
}
.toolbar a {
padding: 1px 5px;
color: #000 !important;
text-decoration: none;
border: 1px outset #cf6;
background: #cf6;
}
.toolbar a:hover {
background: #ef9 !important;
}
.toolbar a:active {
background: #ff0 !important;
}
.viewer .tabset{
background: transparent;
border: 0;
}
.viewer a.button{
background-color: transparent !important;
color: #700 !important;
}
.viewer {
line-height: 140%;
}
.viewer a:link, .body a:visited {
color: #15b;
text-decoration: underline;
}
.viewer a:hover {
color: #fff;
background: #000;
}
.viewer blockquote {
border-left: 3px solid #777;
margin: 5px;
padding: 5px;
}
.viewer ul {
padding-left: 30px;
}
.viewer ol {
padding-left: 30px;
}
ol
{
list-style-type: decimal;
}
ol ol
{
list-style-type: lower-alpha;
}
ol ol ol
{
list-style-type: lower-roman;
}
.viewer ul, .viewer ol, .viewer p {
margin: 5px 0 12px 0;
}
.viewer li {
margin: 3px 0;
}
.viewer h2,h3,h4,h5,h6 {
font-weight: bold;
background: #eee;
padding: 2px 10px;
margin: 5px 0;
}
.viewer h2 {
font-size: 1.3em;
}
.viewer h3 {
font-size: 1.2em;
}
.viewer h4 {
font-size: 1.1em;
}
.viewer h5 {
font-size: 1em;
}
.viewer h6 {
font-size: .9em;
}
.viewer table {
border-collapse: collapse;
border: 2px solid #303030;
font-size: 11px;
margin: 10px 0;
}
.viewer th {
background: #eee;
border: 1px solid #aaa;
padding: 3px;
}
.viewer td {
border: 1px solid #aaa;
padding: 3px;
}
.viewer caption {
padding: 3px;
}
.viewer hr {
border: none;
border-top: dotted 1px #777;
height: 1px;
color: #777;
margin: 7px 0;
}
.body
{
margin: 5px 0 15px 0;
padding: 5px 0;
border-top: 1px solid #ccc;
}
.highlight {
color: #000;
background: #ffe72f;
}
.editor {
font-size: 8pt;
color: #402C74;
font-weight: normal;
padding: 10px 0;
}
.editor input, .editor textarea {
display: block;
font: 10px/130% "Andale Mono", "Monaco", "Lucida Console", "Courier New", monospace;
margin: 0 0 10px 0;
border: 1px inset #333;
padding: 2px 0;
}
.editor textarea {
height: 500px;
}
input:focus, textarea:focus
{
background: #ffe;
border: 1px solid #000 !important;
}
.editorFooter, .footer{
font-size: 10px;
}
.editorFooter a.button:hover, .footer a.button:hover{
color: #fff;
}
#storeArea, #copyright, .site_description {
display: none;
}
#floater {
background: #df9;
border: 3px solid #999;
color: #df9;
position: absolute;
left: -99999999px;
top: -99999999px;
width: 1px;
display: none;
}
@media print{
*
{
margin: 0;
padding: 0;
}
body {
background: #fff;
color: #000;
width: 2.5in;
height: 4.7in;
font-size: 6.2pt;
font-family: "Lucida Grande", "Bitstream Vera Sans", Helvetica, Verdana, Arial, sans-serif;
}
img {
max-width: 2.2in;
max-height: 4.3in;
}
#header, #side_container, #storeArea, #copyright, .toolbar, #floater, #messageArea, .save_accesskey, .site_description
{
display: none;
}
#tiddlerDisplay, #displayArea
{
display: inline;
}
.tiddler {
margin: 0 0 2em 0;
border-top: 1px solid #000;
page-break-before: always;
}
.tiddler:first-child {
page-break-before: avoid;
}
.title {
font-size: 1.6em;
font-weight: bold;
margin-bottom: .3em;
padding: .2em 0;
border-bottom: 1px dotted #000;
}
p, blockquote, ul, li, ol, dt, dd, dl, table
{
margin: 0 0 .3em 0;
}
h1, h2, h3, h4, h5, h6
{
margin: .2em 0;
}
h1
{
font-size: 1.5em;
}
h2
{
font-size: 1.3em;
}
h3
{
font-size: 1.25em;
}
h4
{
font-size: 1.15em;
}
h5
{
font-size: 1.1em;
}
blockquote
{
margin: .6em;
padding-left: .6em;
border-left: 1px solid #ccc;
}
ul
{
list-style-type: circle;
}
li
{
margin: .1em 0 .1em 2em;
line-height: 1.4em;
}
table
{
border-collapse: collapse;
font-size: 1em;
}
td, th
{
border: 1px solid #999;
padding: .2em;
}
hr {
border: none;
border-top: dotted 1px #777;
height: 1px;
color: #777;
margin: .6em 0;
}}
Text is so incredibly great, its hard to imagine why anyone would ever use tools that make it hard to get wonderful text like this. Cool.
pytwafasfdsdf
I loved the auto pdf import feature, so I have created a similar jpg importer- here is the code:
{{{
from tw import tiddler_to_markup, CurrentTime
def load_tiddlers( store_files ):
"""
Load each .jpg file that appears in the store/ directory, and make a
tiddler out of it.
"""
divs = []
addDiv = divs.append
jpgs = [k for k in store_files if k.endswith('.jpg')]
for jpg in jpgs:
content = { 'title': jpg, 'modified': CurrentTime, 'author': '_dynamic',
'tags': 'dynamic jpg', 'body': '<html><img src="http://www.jtcomms.co.uk/tiddly/store/%s" width=600></html>' % jpg
}
addDiv( tiddler_to_markup( content, 'jpgimporter' ) )
return ''.join( divs )
def save_tiddler( arg ):
pass
def delete_tiddler( arg ):
"""
Delete the jpg file.
"""
import os
os.remove( 'store/%s' % arg )
print 'Removed %s from server.' % arg
}}}
I also have a nice file manager in my password protected directory to upload and manage these kinds of files - I used webadmin - a php file manager from http://cker.name/webadmin/
This is now a highly useful web photo gallery
Cheers
J
These interface options are saved in your browser
Username:
<<option txtUserName>>
Password:
<<option pasPassword>>
<<option chkSaveBackups>> Save Backups
<<option chkAutoSave>> Auto Save
<<option chkGenerateAnRssFeed>> Generate an RSS Feed
<<option chkRegExpSearch>> Reg Exp Search
<<option chkCaseSensitiveSearch>> Case-sensitive Search
<<option chkAnimate>> Enable Animations
See AdvancedOptions
[img[http://www.tiddlywiki.com/fractalveg.jpg]]
Yes, that is a picture of broccoli.
This is TW <<version>>.
Well, saving works with Safari 2.0.
<<listTags culture>>
gogogog
Hi, I'm Tom and am interested in pytw. This is my "sandbox" page on this site. Thanks for the cool software!
----
<<version>>
<<tag dynamic>>
Did anybody succeed in integrating [[d3 | http://www.dcubed.ca/ ]] (GTD) into pytw? Is it difficult to integrate pytw synchronization code into a more recent release of TiddlyWiki?
//Yes, just tried it but it doesn't work out of the box. Especially d3's extra tiddler attributes gtd.project, gtd.context etc. are ignored by pytw and are not saved to the store yet. Seems like it should be easy to incorporate them though.//
que hay
yo, what's up
then again, it won't
Type the text for 'New Tiddler'asdasd
> trying to see if the editing works huh?
This is a colin testfafa
Yup, that's me. My name is Mike Smith, but it doesn't become a link until I put it in double brackets: [[Mike Smith]].
This is a test by MikeSmith (or would it be [Mike Smith] or [[Mike Smith]]?).
This is a test
oh look at that
A TW with a python backend? Rejoice!
Using pytw, changes made to tiddlers are saved on the server, so you don't have to download the html file and carry it with you. Compared to other server side packages for Tiddly Wiki, I maintain that pytw is one of the simplest (about 200 lines of code, gratuitously commented).
The package is available [[here|http://www.cs.utexas.edu/~joeraii/pytw/pytw.tar.bz2]]. Its ==hideous== ==alpha== ==beta== cool, and it works very well. Currently just load/save and keep track of revisions are supported, but extension modules can be written for more functionality (for example, the refresh module paired with dynamic fortune). Everyone understands why modularity is good, so I won't go into the lecture here. Suffice to say pytw will eventually support loading/saving from/to many kinds of backends (pickles, xml, plaintext, latex, pdf, etc) by just enabling certain modules. Also this architecture will allow for dynamically generated content.
Some UsageNotes. See the included [[1.1 README]] file for more detailed info.
Please play around with it, break it, hack on it. Make it better!!
''This demo site is set up currently so that anyone can add new tiddlers and edit them, but the "default" tiddlers are all locked.''
I want to create a website of my institution using pytw. Could anyone please provide me a link to a tute on this?
Actually what i specifically want is:
1.. 'new tiddler' and 'edit' links should not be displayed to a user over http. They should display only by using a password access.
2. I should be able to change shadow tiddlers(i cant find them anywhere)
3. I should be able to add plugins from main tw stream
4. i should be able to have access to the backstage menu which main tw has
Thanks in advance.
I really want to use this. Its great.
How do i do page formatting like changing colors. and changing what links appear where.
Also why is there no 'close other' link on top left of the tiddly?
<<version>>
[[letsrock]]
[[killerbumbuller]]
why doesnt this work at my wiki
Que tal funciona esto
Checking to see how it works, currently using ccTiddly, which is great, but not yet support load-on-demand.
Cheers,
Yossi A.
Check what TWAESF version:
<<version>>
!Head 1
!!Head 2
{{{
Test
}}}
Skriver en massa 'text'
I like that you have done this in Python.
This was added so that [[Just a Test|Just a Test]] would have something to refer to.
I'm testing this wiki. I want to see if it really is pure plain text. For example, if I type in camel case will it treat it differently? HowAboutThis? Does it try to do tables? Here's one:
| !first col | !second col | !third col | !fourth col |
| 1 | 2 | 3 | Test complete (for now). |
How about some modifications to this tiddler...
Sorry. Not very familiar with this.
I am getting an importerror for module tw.
I am trying to install, locally, pytw in Ubuntu 8.04. I have a Lampp config.
I have copied the index.cgi of pytw to /opt/lampp/cgi-bin and renamed it to pytw.cgi. The rest of the pytw code is in /opt/lampp/htdocs/pytw.
I have two wikis in vhosted in apache2. The first is pmwiki; it is working. The second is the pytw which I am having problems installing.
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot /opt/lampp/htdocs/pmwiki
Alias /pmwiki "/opt/lampp/htdocs/pmwiki"
ServerName localhost
ErrorLog logs/pmwiki-error_log
CustomLog logs/pmwiki-access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.notcom
DocumentRoot /opt/lampp/htdocs/pytw
Alias /pytw "/opt/lampp/cgi-bin/pytw.cgi"
ServerName localhost
ErrorLog /opt/lampp/htdocs/pytw/tmp/error_log
CustomLog /opt/lampp/htdocs/pytw/tmp/access_log common
</VirtualHost>
What do I need to specify to get python to import the tw module and the rest of the pytw code? In my setup, python is in /usr/bin; version 2.5.2.
TIA
<<version>>
Nueva impresora HP
Here's a quicstart for OS X (tested on 10.4.11). I tried the original TiddlyWiki for hours with no joy whatsoever, then got pytw running in about 15 minutes.
Move the pytw folder to your localhost cgi-bin, open Terminal, cd to pytw/store, su (or sudo), then for all files type:
* chown www *
* chmod 755 *
Provided Apache is running, open a browser and go to:
localhost/~yourusernamehere/cgi-bin/pytw/index.cgi
and all should be well!
How many TiddlyWiki files can this support? Just one? Or can several files be configured to work in the same directory?
Trying that promising backend
申し訳ありませんが、日本語の説明書やそういうものをまだ書いてないんです(ということは、非常に日本語下手なんです)。けれど、もしpythonでの「超シンプル」なtiddly wikiバックエンドに興味がありましたら、是非ご体験ください。質問やコメントはこちらへ:joeraii@gmail.com .
!!!This is just a test.
* AnotherTest
Well loook at this!
* bonk
* bonktastic!
A TW with a python backend? Rejoice!
Using pytw, changes made to tiddlers are saved on the server, so you don't have to download the html file and carry it with you. Compared to other server side packages for Tiddly Wiki, I maintain that pytw is one of the simplest (about 200 lines of code, gratuitously commented).
The package is available [[here|http://www.cs.utexas.edu/~joeraii/pytw/pytw.tar.bz2]]. It's ==hideous== ==alpha== ==beta== cool, and it works very well. Currently just load/save and keep track of revisions are supported, but extension modules can be written for more functionality (for example, the refresh module paired with dynamic fortune). Everyone understands why modularity is good, so I won't go into the lecture here. Suffice to say pytw will eventually support loading/saving from/to many kinds of backends (pickles, xml, plaintext, latex, pdf, etc) by just enabling certain modules. Also this architecture will allow for dynamically generated content.
Some UsageNotes. See the included [[1.1 README]] file for more detailed info.
Please play around with it, break it, hack on it. Make it better!!
''This demo site is set up currently so that anyone can add new tiddlers and edit them, but the "default" tiddlers are all locked.''
!!!Version 1.1:
*Architecture change: added a type to each tiddler to track what importer handles it. (Joe)
*Cleaned up/optimized refresh.js. (Joe)
*Bugfix: Fixed a small newline bug (Joe) and a similar bug with \ s (Devon)
*Bugfix: disabled "save changes" (Devon)
*Added a mysql database backend (Devon)
*Added a set of plugins for revisions (Rodney)
*Added a locked tiddler importer plugin for public wikis (Joe)
*Added safesave for disabling the posting of systemConfig tiddlers (Joe)
!!!Version 1.0.5
* Cleaned up the way error messages are generated on save/delete. (Joe)
* Completely modularized importers/handlers. (Joe)
* Only cache Static tiddlers, not dynamic ones. (Joe)
* Added "plugins" and "importers" directory. (Joe)
* Refresh tiddler module for dynamic tiddlers. (Joe)
* Authentication module using crypt. (Joe)
!!!Version 1.0.4
* pytw now returns status messages if there was an error during save/delete. (Joe)
!!!Version 1.0.3
* Added a caching mechanism to speed up page loads. (Andrew)
* Decreased display lag. (Joe)
* More optimizations. (Andrew)
!!!1.0.2 and older:
* @@color(red):Fixed the way unicode is handled.@@ To upgrade from version 1.0.0 or 1.0.1, run the script "convert-format.py" on all the tiddlers in store. e.g.:
{{{
python convert-format.py store/*.tiddler
}}}
* Incorporated some cleanups/changes by Andrew Nelis (thanks!). Should now run properly in Windows, and run slightly faster.
Type the text for 'New Tiddler'dddddddddddddda awefawefkj
server naaaaaaaame!
A TW with a python backend? Rejoice!
Using pytw, changes made to tiddlers are saved on the server, so you don't have to download the html file and carry it with you. Compared to other server side packages for Tiddly Wiki, I maintain that pytw is one of the simplest (about 200 lines of code, gratuitously commented).
The package is available [[here|http://www.cs.utexas.edu/~joeraii/pytw/pytw.tar.bz2]]. Its ==hideous== ==alpha== ==beta== cool, and it works very well. Currently just load/save and keep track of revisions are supported, but extension modules can be written for more functionality (for example, the refresh module paired with dynamic fortune). Everyone understands why modularity is good, so I won't go into the lecture here. Suffice to say pytw will eventually support loading/saving from/to many kinds of backends (pickles, xml, plaintext, latex, pdf, etc) by just enabling certain modules. Also this architecture will allow for dynamically generated content.
Some UsageNotes. See the included [[1.1 README]] file for more detailed info.
Please play around with it, break it, hack on it. Make it better!!
''This demo site is set up currently so that anyone can add new tiddlers and edit them, but the "default" tiddlers are all locked.''
Type the text for 'New Tiddler'
AWEJTWETJWER
1
2
3
4
45
This is only a test
just testing
....
[[Rejoice!]] [[Features]] [[VersionHistory]] [[TODO]]
<<option chkOpenInNewWindow>> OpenLinksInNewWindow
<<option chkSaveEmptyTemplate>> SaveEmptyTemplate
<<option chkToggleLinks>> Clicking on links to tiddlers that are already open causes them to close but that's not very nice
^^(override with Control or other modifier key)^^
These interface options are saved in your browser
Username:
<<option txtUserName>>
Password:
<<option pasPassword>>
<<option chkSaveBackups>> Save Backups
<<option chkAutoSave>> Auto Save
<<option chkGenerateAnRssFeed>> Generate an RSS Feed
<<option chkRegExpSearch>> Reg Exp Search
<<option chkCaseSensitiveSearch>> Case-sensitive Search
<<option chkAnimate>> Enable Animations
See AdvancedOptions
very simple.
pytw
A TW with a python backend? Rejoice!
Using pytw, changes made to tiddlers are saved on the server, so you don't have to download the html file and carry it with you. Compared to other server side packages for Tiddly Wiki, I maintain that pytw is one of the simplest (about 200 lines of code, gratuitously commented).
The package is available [[here|http://www.cs.utexas.edu/~joeraii/pytw/pytw.tar.bz2]]. Its ==hideous== ==alpha== ==beta== cool, and it works very well. Currently just load/save and keep track of revisions are supported, but extension modules can be written for more functionality (for example, the refresh module paired with dynamic fortune). Everyone understands why modularity is good, so I won't go into the lecture here. Suffice to say pytw will eventually support loading/saving from/to many kinds of backends (pickles, xml, plaintext, latex, pdf, etc) by just enabling certain modules. Also this architecture will allow for dynamically generated content.
Some UsageNotes. See the included [[1.1 README]] file for more detailed info.
Please play around with it, break it, hack on it. Make it better!!
''This demo site is set up currently so that anyone can add new tiddlers and edit them, but the "default" tiddlers are all locked.''
* Load on demand (see [[PerlTiddlyWiki|http://ccm.sherry.jp/tiddly/]])
** Better than this:
*** //Local// cache of tiddlers, maybe using something like this [[http://codinginparadise.org/weblog/2005/08/ajax-tutorial-saving-session-across.html|http://codinginparadise.org/weblog/2005/08/ajax-tutorial-saving-session-across.html]].
*** Sync with the local cache on loading from remote. The first time creates the local cache.
* Authentication. (Partly finished, see version 1.0.5).
** Serverside username log-in, user tagAlias, and Options save
** See [[Authentication]]
* ==Return status messages from save/delete.==
* ==xml->pickle==, pickle->xml, others?
* ==Import function for converting from client TiddlyWiki to pytw==
** See [[HTMLTiddlerImporter]]
* Remote-local sync c/o server script, without damaging the clientside copy if it is different. Perhaps use tags ('shareNode' on client side?).
**This could be accomplished rather painlessly using the new pytw plugin architecture. There is already a plugin "refresh" which pings the server for dynamic tiddler updates. This could be expanded to update the static tiddlers as well. From there its not much of a stretch to design the opposite functionality (offline client updates -> server), which is what I think you are proposing.
* Allow upload (and retrieval) of files, according to user permissions set by admin.
* Allow arbitrary markup handling, so that, for example, dynamic SVG (from 1.0.6/pending?) can be generated using peculiarly marked-up tiddly nodes tagged with [[CompositeNode|CompositeNodes]] (or similar).
* "A great many things, young Skywalker."
* Make the "plugins" external page loads, to reduce the cost of a reload? (serversidewiki does this, basically).
!!!Version 1.1:
*Architecture change: added a type to each tiddler to track what importer handles it. (Joe)
*Cleaned up/optimized refresh.js. (Joe)
*Bugfix: Fixed a small newline bug (Joe) and a similar bug with \ s (Devon)
*Bugfix: disabled "save changes" (Devon)
*Added a mysql database backend (Devon)
*Added a set of plugins for revisions (Rodney)
*Added a locked tiddler importer plugin for public wikis (Joe)
*Added safesave for disabling the posting of systemConfig tiddlers (Joe)
!!!Version 1.0.5
* Cleaned up the way error messages are generated on save/delete. (Joe)
* Completely modularized importers/handlers. (Joe)
* Only cache Static tiddlers, not dynamic ones. (Joe)
* Added "plugins" and "importers" directory. (Joe)
* Refresh tiddler module for dynamic tiddlers. (Joe)
* Authentication module using crypt. (Joe)
!!!Version 1.0.4
* pytw now returns status messages if there was an error during save/delete. (Joe)
!!!Version 1.0.3
* Added a caching mechanism to speed up page loads. (Andrew)
* Decreased display lag. (Joe)
* More optimizations. (Andrew)
!!!1.0.2 and older:
* @@color(red):Fixed the way unicode is handled.@@ To upgrade from version 1.0.0 or 1.0.1, run the script "convert-format.py" on all the tiddlers in store. e.g.:
{{{
python convert-format.py store/*.tiddler
}}}
* Incorporated some cleanups/changes by Andrew Nelis (thanks!). Should now run properly in Windows, and run slightly faster.
* Save tiddlers to the server, and retrieve them from any internet connection... .
*... or save this page for a standard client-side TW!
* Caching on save/delete, making refresh occur at almost native speed.
* Instant notification if something goes amiss!
*Each tiddler has a corresponding revisions directory for keeping track of changes.
* Deleted tiddlers are backed up.
* Simple encrypted authentication.
* Dynamically generated tiddlers!!
申し訳ありませんが、日本語の説明書やそういうものをまだ書いてないんです(ということは、非常に日本語下手なんです)。けれど、もしpythonでの「超シンプル」なtiddly wikiバックエンドに興味がありましたら、是非ご体験ください。質問やコメントはこちらへ:joeraii@gmail.com .
@@color(red):''[''@@<<newTiddler>>@@color(red):'']''@@
@@color(blue):[@@<<refreshDynamic>>@@color(blue):]@@
[[Rejoice!]]
[[Features]]
[[VersionHistory]]
[[TODO]]
[[UsageNotes]]
[[日本人のお客様へ]]
@@color(lime):[@@[[Download|http://www.cs.utexas.edu/~joeraii/pytw/pytw.tar.bz2]]@@color(lime):]@@
[img[siglets|images/siglet.jpg]]
@@color(orange):ref: [[siglet|http://www.cs.utexas.edu/~joeraii/siglet]]@@
how to get pytw working:
# unzip it, for example to /home/bob/public_html/
# set the first line in index.cgi to the path of the python interpreter
# if you have mod_python installed, do whatever needs to be done in that case (?)
# make /home/bob/public_html/store/ web-writable (which likely means world-writable). It contains .tiddler files (which also need to be web-writable), and directories for holding tiddler revisions. As a bit of a bonus, you can put .pdf files in there as well, and they will appear as tiddlers.
# optional: make a web-writable directory "tmp". pytw will dump any errors there; if you manage to create an error, please let the author know! joeraii, at, cs, dot, utexas, dot, edu If you want password-protection on the entire wiki:
# create /home/bob/public_html/.htaccess: AddCharset UTF-8 .html AuthUserFile /home/bob/.htpasswd AuthGroupFile /dev/null AuthName EnterPassword AuthType Basic require user joe bob lucy etc
# create /home/bob/.htpasswd: htpasswd -c /home/bob/.htpasswd joe (then type Joe's new password at the prompt) htpasswd -c /home/bob/.htpasswd bob (then Bob's new password) etc
{{{
I don't care for the Sugar Smacks commercial. I don't like the idea of
a frog jumping on my Breakfast.
-- Lowell, Chicago Reader 10/15/82
}}}
Click <<refreshDynamic>> to refresh this tiddler.
{{{
No Points Name Hp [max]
1 16691160 danb-Val-Hum-Fem-Law ascended to demigoddess-hood. 536 [536]
2 12465514 joeraii-Wiz-Elf-Mal-Cha ascended to demigod-hood. 338 [401]
3 9652956 danb-Val-Hum-Mal-Law ascended to demigod-hood. 116 [583]
4 9509818 joeraii-Wiz-Elf-Mal-Cha ascended to demigod-hood. 296 [296]
5 7343426 jstrunk-Sam-Hum-Mal-Law ascended to demigod-hood. 124 [170]
6 6891430 joeraii-Val-Hum-Fem-Law ascended to demigoddess-hood. 281 [281]
7 6479620 joeraii-Wiz-Elf-Mal-Cha ascended to demigod-hood. 186 [186]
8 6232558 jstrunk-Tou-Hum-Mal-Neu ascended to demigod-hood. 117 [117]
9 5309030 jharg-Val-Hum-Fem-Neu ascended to demigoddess-hood. 165 [165]
10 2916021 joeraii-Wiz-Elf-Mal-Cha died on the Plane of Air.
Killed by an air elemental, while helpless (with the
Amulet). - [252]
11 2775890 jstrunk-Tou-Hum-Mal-Neu died on the Plane of Air.
Killed by a jabberwock, while helpless (with the
Amulet). - [273]
12 2313488 jstrunk-Sam-Hum-Mal-Law died in Gehennom on level 48
[max 49]. Killed by a touch of death (with the
Amulet). 175 [213]
13 2284838 fool-Mon-Hum-Mal-Cha died on the Plane of Earth.
Killed by the invisible Wizard of Yendor. - [255]
14 1548507 kat-Val-Hum-Fem-Law died in Gehennom on level 37
[max 44]. Killed by brainlessness. 182 [189]
15 1222210 dkatz-Val-Hum-Fem-Law died in Gehennom on level 39.
Killed by a troll. - [149]
16 1146308 fool-Mon-Hum-Fem-Cha died in Gehennom on level 49.
Killed by a balrog, while helpless. - [153]
17 1140307 danb-Val-Hum-Fem-Law died in The Dungeons of Doom on
level 26 [max 27]. Killed by a rock troll. - [307]
18 1092636 Snopes-Wiz-Hum-Mal-Neu quit in The Dungeons of Doom
on level 14 [max 34]. 183 [183]
19 982382 sarvela-Val-Hum-Fem-Law turned to stone in Gehennom
on level 27. Petrified by a hallucinogen-distorted
cockatrice. 142 [142]
20 970248 fool-Val-Dwa-Fem-Law choked on her food in Vlad's
Tower on level 32 [max 35]. Choked on a black
pudding corpse. 223 [224]
}}}