Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
To make quoted bits of text stand out, you can use BlockQuotes within your tiddlers, like this:
JeremyRuston said:
<<<
A TiddlyWiki is like a blog because it's divided up into neat little chunks, but it encourages you to read it by hyperlinking rather than sequentially: if you like, a non-linear blog analogue that binds the individual microcontent items into a cohesive whole.
<<<
Like BulletPoints and NumberedBulletPoints, you can have multiple levels of BlockQuotes. Just edit this tiddler to see how it's done.
>level 1
>level 1
>>level 2
>>level 2
>>>level 3
>>>level 3
>>level 2
>level 1
Creating BulletPoints is simple.
* Just add an asterisk
* at the beginning of a line.
** If you want to create sub-bullets
** start the line with two asterisks
*** And if you want yet another level
*** use three asterisks
* Edit this tiddler to see how it's done
* You can also do NumberedBulletPoints
The Tao that can be spoken is not the eternal Tao
The name that can be named is not the eternal name
The nameless is the origin of Heaven and Earth
The named is the mother of myriad things
Thus, constantly without desire, one observes its essence
Constantly with desire, one observes its manifestations
These two emerge together but differ in name
The unity is said to be the mystery
Mystery of mysteries, the door to all wonders
When the world knows beauty as beauty, ugliness arises
When it knows good as good, evil arises
Thus being and non-being produce each other
Difficult and easy bring about each other
Long and short reveal each other
High and low support each other
Music and voice harmonize each other
Front and back follow each other
Therefore the sages:
Manage the work of detached actions
Conduct the teaching of no words
They work with myriad things but do not control
They create but do not possess
They act but do not presume
They succeed but do not dwell on success
It is because they do not dwell on success
That it never goes away
[[Chapter 02 Notes]]
Do not glorify the achievers
So the people will not squabble
Do not treasure goods that are hard to obtain
So the people will not become thieves
Do not show the desired things
So their hearts will not be confused
Thus the governance of the sage:
Empties their hearts
Fills their bellies
Weakens their ambitions
Strengthens their bones
Let the people have no cunning and no greed
So those who scheme will not dare to meddle
Act without contrivance
And nothing will be beyond control
[[Chapter 03 Notes]]
The Tao is empty
When utilized, it is not filled up
So deep! It seems to be the source of all things
It blunts the sharpness
Unravels the knots
Dims the glare
Mixes the dusts
So indistinct! It seems to exist
I do not know whose offspring it is
Its image is the predecessor of the Emperor
[[Chapter 04 Notes]]
Heaven and Earth are impartial
They regard myriad things as straw dogs
The sages are impartial
They regard people as straw dogs
The space between Heaven and Earth
Is it not like a bellows?
Empty, and yet never exhausted
It moves, and produces more
Too many words hasten failure
Cannot compare to keeping to the void
[[Chapter 05 Notes]]
The valley spirit, undying
Is called the Mystic Female
The gate of the Mystic Female
Is called the root of Heaven and Earth
It flows continuously, barely perceptible
Utilize it; it is never exhausted
[[Chapter 06 Notes]]
Heaven and Earth are everlasting
The reason Heaven and Earth can last forever
Is that they do not exist for themselves
Thus they can last forever
Therefore the sages:
Place themselves last but end up in front
Are outside of themselves and yet survive
Is it not due to their selflessness?
That is how they can achieve their own goals
[[Chapter 07 Notes]]
The highest goodness resembles water
Water greatly benefits myriad things without contention
It stays in places that people dislike
Therefore it is similar to the Tao
Dwelling with the right location
Feeling with great depth
Giving with great kindness
Speaking with great integrity
Governing with great administration
Handling with great capability
Moving with great timing
Because it does not contend
It is therefore beyond reproach
[[Chapter 08 Notes]]
Holding a cup and overfilling it
Cannot be as good as stopping short
Pounding a blade and sharpening it
Cannot be kept for long
Gold and jade fill up the room
No one is able to protect them
Wealth and position bring arrogance
And leave disasters upon oneself
When achievement is completed, fame is attained
Withdraw oneself
This is the Tao of Heaven
[[Chapter 09 Notes]]
In holding the soul and embracing oneness
Can one be steadfast, without straying?
In concentrating the energy and reaching relaxation
Can one be like an infant?
In cleaning away the worldly view
Can one be without imperfections?
In loving the people and ruling the nation
Can one be without manipulation?
In the heavenly gate's opening and closing
Can one hold to the feminine principle?
In understanding clearly all directions
Can one be without intellectuality?
Bearing it, rearing it
Bearing without possession
Achieving without arrogance
Raising without domination
This is called the Mystic Virtue
[[Chapter 10 Notes]]
Thirty spokes join in one hub
In its emptiness, there is the function of a vehicle
Mix clay to create a container
In its emptiness, there is the function of a container
Cut open doors and windows to create a room
In its emptiness, there is the function of a room
Therefore, that which exists is used to create benefit
That which is empty is used to create functionality
[[Chapter 11 Notes]]
The five colors make one blind in the eyes
The five sounds make one deaf in the ears
The five flavors make one tasteless in the mouth
Racing and hunting make one wild in the heart
Goods that are difficult to acquire make one cause damage
Therefore the sages care for the stomach and not the eyes
That is why they discard the other and take this
[[Chapter 12 Notes]]
Favor and disgrace make one fearful
The greatest misfortune is the self
What does "favor and disgrace make one fearful" mean?
Favor is high; disgrace is low
Having it makes one fearful
Losing it makes one fearful
This is "favor and disgrace make one fearful"
What does "the greatest misfortune is the self" mean?
The reason I have great misfortune
Is that I have the self
If I have no self
What misfortune do I have?
So one who values the self as the world
Can be given the world
One who loves the self as the world
Can be entrusted with the world
[[Chapter 13 Notes]]
Look at it, it cannot be seen
It is called colorless
Listen to it, it cannot be heard
It is called noiseless
Reach for it, it cannot be held
It is called formless
These three cannot be completely unraveled
So they are combined into one
Above it, not bright
Below it, not dark
Continuing endlessly, cannot be named
It returns back into nothingness
Thus it is called the form of the formless
The image of the imageless
This is called enigmatic
Confront it, its front cannot be seen
Follow it, its back cannot be seen
Wield the Tao of the ancients
To manage the existence of today
One can know the ancient beginning
It is called the Tao Axiom
[[Chapter 14 Notes]]
The Tao masters of antiquity
Subtle wonders through mystery
Depths that cannot be discerned
Because one cannot discern them
Therefore one is forced to describe the appearance
Hesitant, like crossing a wintry river
Cautious, like fearing four neighbors
Solemn, like a guest
Loose, like ice about to melt
Genuine, like plain wood
Open, like a valley
Opaque, like muddy water
Who can be muddled yet desist
In stillness gradually become clear?
Who can be serene yet persist
In motion gradually come alive?
One who holds this Tao does not wish to be overfilled
Because one is not overfilled
Therefore one can preserve and not create anew
[[Chapter 15 Notes]]
Attain the ultimate emptiness
Hold on to the truest tranquility
The myriad things are all active
I therefore watch their return
Everything flourishes; each returns to its root
Returning to the root is called tranquility
Tranquility is called returning to one's nature
Returning to one's nature is called constancy
Knowing constancy is called clarity
Not knowing constancy, one recklessly causes trouble
Knowing constancy is acceptance
Acceptance is impartiality
Impartiality is sovereign
Sovereign is Heaven
Heaven is Tao
Tao is eternal
The self is no more, without danger
[[Chapter 16 Notes]]
The highest rulers, people do not know they have them
The next level, people love them and praise them
The next level, people fear them
The next level, people despise them
If the rulers' trust is insufficient
Have no trust in them
Proceeding calmly, valuing their words
Task accomplished, matter settled
The people all say, "We did it naturally"
[[Chapter 17 Notes]]
The great Tao fades away
There is benevolence and justice
Intelligence comes forth
There is great deception
The six relations are not harmonious
There is filial piety and kind affection
The country is in confused chaos
There are loyal ministers
[[Chapter 18 Notes]]
End sagacity; abandon knowledge
The people benefit a hundred times
End benevolence; abandon righteousness
The people return to piety and charity
End cunning; discard profit
Bandits and thieves no longer exist
These three things are superficial and insufficient
Thus this teaching has its place:
Show plainness; hold simplicity
Reduce selfishness; decrease desires
[[Chapter 19 Notes]]
Cease learning, no more worries
Respectful response and scornful response
How much is the difference?
Goodness and evil
How much do they differ?
What the people fear, I cannot be unafraid
So desolate! How limitless it is!
The people are excited
As if enjoying a great feast
As if climbing up to the terrace in spring
I alone am quiet and uninvolved
Like an infant not yet smiling
So weary, like having no place to return
The people all have surplus
While I alone seem lacking
I have the heart of a fool indeed – so ignorant!
Ordinary people are bright
I alone am muddled
Ordinary people are scrutinizing
I alone am obtuse
Such tranquility, like the ocean
Such high wind, as if without limits
The people all have goals
And I alone am stubborn and lowly
I alone am different from them
And value the nourishing mother
[[Chapter 20 Notes]]
The appearance of great virtue
Follows only the Tao
The Tao, as a thing
Seems indistinct, seems unclear
So unclear, so indistinct
Within it there is image
So indistinct, so unclear
Within it there is substance
So deep, so profound
Within it there is essence
Its essence is supremely real
Within it there is faith
From ancient times to the present
Its name never departs
To observe the source of all things
How do I know the nature of the source?
With this
[[Chapter 21 Notes]]
Yield and remain whole
Bend and remain straight
Be low and become filled
Be worn out and become renewed
Have little and receive
Have much and be confused
Therefore the sages hold to the one as an example for the world
Without flaunting themselves – and so are seen clearly
Without presuming themselves – and so are distinguished
Without praising themselves – and so have merit
Without boasting about themselves – and so are lasting
Because they do not contend, the world cannot contend with them
What the ancients called "the one who yields and remains whole"
Were they speaking empty words?
Sincerity becoming whole, and returning to oneself
[[Chapter 22 Notes]]
Sparse speech is natural
Thus strong wind does not last all morning
Sudden rain does not last all day
What makes this so? Heaven and Earth
Even Heaven and Earth cannot make it last
How can humans?
Thus those who follow the Tao are with the Tao
Those who follow virtue are with virtue
Those who follow loss are with loss
Those who are with the Tao, the Tao is also pleased to have them
Those who are with virtue, virtue is also pleased to have them
Those who are with loss, loss is also please to have them
Those who do not trust sufficiently, others have no trust in them
[[Chapter 23 Notes]]
Those who are on tiptoes cannot stand
Those who straddle cannot walk
Those who flaunt themselves are not clear
Those who presume themselves are not distinguished
Those who praise themselves have no merit
Those who boast about themselves do not last
Those with the Tao call such things leftover food or tumors
They despise them
Thus, those who possesses the Tao do not engage in them
[[Chapter 24 Notes]]
There is something formlessly created
Born before Heaven and Earth
So silent! So ethereal!
Independent and changeless
Circulating and ceaseless
It can be regarded as the mother of the world
I do not know its name
Identifying it, I call it "Tao"
Forced to describe it, I call it great
Great means passing
Passing means receding
Receding means returning
Therefore the Tao is great
Heaven is great
Earth is great
The sovereign is also great
There are four greats in the universe
And the sovereign occupies one of them
Humans follow the laws of Earth
Earth follows the laws of Heaven
Heaven follows the laws of Tao
Tao follows the laws of nature
[[Chapter 25 Notes]]
Heaviness is the root of lightness.
Quietness is the master of restlessness
Therefore the sages travel the entire day
Without leaving the heavy supplies
Even though there are luxurious sights
They are composed and transcend beyond
How can the lords of ten thousand chariots
Applies themselves lightly to the world?
To be light is to lose one's root
To be restless is to lose one's mastery
[[Chapter 26 Notes]]
Good traveling does not leave tracks
Good speech does not seek faults
Good reckoning does not use counters
Good closure needs no bar and yet cannot be opened
Good knot needs no rope and yet cannot be untied
Therefore sages often save others
And so do not abandon anyone
They often save things
And so do not abandon anything
This is called following enlightenment
Therefore the good person is the teacher of the bad person
The bad person is the resource of the good person
Those who do not value their teachers
And do not love their resources
Although intelligent, they are greatly confused
This is called the essential wonder
[[Chapter 27 Notes]]
Know the masculine, hold to the feminine
Be the watercourse of the world
Being the watercourse of the world
The eternal virtue does not depart
Return to the state of the infant
Know the white, hold to the black
Be the standard of the world
Being the standard of the world
The eternal virtue does not deviate
Return to the state of the boundless
Know the honor, hold to the humility
Be the valley of the world
Being the valley of the world
The eternal virtue shall be sufficient
Return to the state of plain wood
Plain wood splits, then becomes tools
The sages utilize them
And then become leaders
Thus the greater whole is undivided
[[Chapter 28 Notes]]
Those who wish to take the world and control it
I see that they cannot succeed
The world is a sacred instrument
One cannot control it
The one who controls it will fail
The one who grasps it will lose
Because all things:
Either lead or follow
Either blow hot or cold
Either have strength or weakness
Either have ownership or take by force
Therefore the sage:
Eliminates extremes
Eliminates excess
Eliminates arrogance
[[Chapter 29 Notes]]
The one who uses the Tao to advise the ruler
Does not dominate the world with soldiers
Such methods tend to be returned
The place where the troops camp
Thistles and thorns grow
Following the great army
There must be an inauspicious year
A good commander achieves result, then stops
And does not dare to reach for domination
Achieves result but does not brag
Achieves result but does not flaunt
Achieves result but is not arrogant
Achieves result but only out of necessity
Achieves result but does not dominate
Things become strong and then get old
This is called contrary to the Tao
That which is contrary to the Tao soon ends
[[Chapter 30 Notes]]
A strong military, a tool of misfortune
All things detest it
Therefore, those who possess the Tao avoid it
Honorable gentlemen, while at home, value the left
When deploying the military, value the right
The military is a tool of misfortune
Not the tool of honorable gentlemen
When using it out of necessity
Calm detachment should be above all
Victorious but without glory
Those who glorify
Are delighting in the killing
Those who delight in killing
Cannot achieve their ambitions upon the world
Auspicious events favor the left
Inauspicious events favor the right
The lieutenant general is positioned to the left
The major general is positioned to the right
We say that they are treated as if in a funeral
Those who have been killed
Should be mourned with sadness
Victory in war should be treated as a funeral
[[Chapter 31 Notes]]
The Tao, eternally nameless
Its simplicity, although imperceptible
Cannot be treated by the world as subservient
If the sovereign can hold on to it
All will follow by themselves
Heaven and Earth, together in harmony
Will rain sweet dew
People will not need to force it; it will adjust by itself
In the beginning, there were names
Names came to exist everywhere
One should know when to stop
Knowing when to stop, thus avoiding danger
The existence of the Tao in the world
Is like streams in the valley into rivers and the ocean
[[Chapter 32 Notes]]
Those who understand others are intelligent
Those who understand themselves are enlightened
Those who overcome others have strength
Those who overcome themselves are powerful
Those who know contentment are wealthy
Those who proceed vigorously have willpower
Those who do not lose their base endure
Those who die but do not perish have longevity
[[Chapter 33 Notes]]
The great Tao is like a flood
It can flow to the left or to the right
The myriad things depend on it for life, but it never stops
It achieves its work, but does not take credit
It clothes and feeds myriad things, but does not rule over them
Ever desiring nothing
It can be named insignificant
Myriad things return to it but it does not rule over them
It can be named great
Even in the end, it does not regard itself as great
That is how it can achieve its greatness
[[Chapter 34 Notes]]
Hold the great image
All under heaven will come
They come without harm, in harmonious peace
Music and food, passing travelers stop
The Tao that is spoken out of the mouth
Is bland and without flavor
Look at it, it cannot be seen
Listen to it, it cannot be heard
Use it, it cannot be exhausted
[[Chapter 35 Notes]]
If one wishes to shrink it
One must first expand it
If one wishes to weaken it
One must first strengthen it
If one wishes to discard it
One must first promote it
If one wishes to seize it
One must first give it
This is called subtle clarity
The soft and weak overcomes the tough and strong
Fish cannot leave the depths
The sharp instruments of the state
Cannot be shown to the people
[[Chapter 36 Notes]]
The Tao is constant in non-action
Yet there is nothing it does not do
If the sovereign can hold on to this
All things shall transform themselves
Transformed, yet wishing to achieve
I shall restrain them with the simplicity of the nameless
The simplicity of the nameless
They shall be without desire
Without desire, using stillness
The world shall steady itself
[[Chapter 37 Notes]]
High virtue is not virtuous
Therefore it has virtue
Low virtue never loses virtue
Therefore it has no virtue
High virtue takes no contrived action
And acts without agenda
Low virtue takes contrived action
And acts with agenda
High benevolence takes contrived action
And acts without agenda
High righteousness takes contrived action
And acts with agenda
High etiquette takes contrived action
And upon encountering no response
Uses arms to pull others
Therefore, the Tao is lost, and then virtue
Virtue is lost, and then benevolence
Benevolence is lost, and then righteousness
Righteousness is lost, and then etiquette
Those who have etiquette
are a thin shell of loyalty and sincerity
And the beginning of chaos
Those with foreknowledge
Are the flowers of the Tao
And the beginning of ignorance
Therefore the great person:
Abides in substance, and does not dwell on the thin shell
Abides in the real, and does not dwell on the flower
Thus they discard that and take this
[[Chapter 38 Notes]]
Those that attained oneness since ancient times:
The sky attained oneness and thus clarity
The earth attained oneness and thus tranquility
The gods attained oneness and thus divinity
The valley attained oneness and thus abundance
The myriad things attained oneness and thus life
The rulers attained oneness and became the standard for the world
These all emerged from oneness
The sky, lacking clarity, would break apart
The earth, lacking tranquility, would erupt
The gods, lacking divinity, would vanish
The valley, lacking abundance, would wither
Myriad things, lacking life, would be extinct
The rulers, lacking standard, would be toppled
Therefore, the honored uses the lowly as basis
The higher uses the lower as foundation
Thus the rulers call themselves alone, bereft, and unworthy
Is this not using the lowly as basis? Is it not so?
Therefore, the ultimate honor is no honor
Do not wish to be shiny like jade
Be dull like rocks
[[Chapter 39 Notes]]
The returning is the movement of the Tao
The weak is the utilization of the Tao
The myriad things of the world are born of being
Being is born of non-being
[[Chapter 40 Notes]]
Higher people hear of the Tao
They diligently practice it
Average people hear of the Tao
They sometimes keep it and sometimes lose it
Lower people hear of the Tao
They laugh loudly at it
If they do not laugh, it would not be the Tao
Therefore a proverb has the following:
The clear Tao appears unclear
The advancing Tao appears to retreat
The smooth Tao appears uneven
High virtue appears like a valley
Great integrity appears like disgrace
Encompassing virtue appears insufficient
Building virtue appears inactive
True substance appears inconstant
The great square has no corners
The great vessel is late in completion
The great music is imperceptible in sound
The great image has no form
The Tao is hidden and nameless
Yet it is only the Tao
That excels in giving and completing everything
Tao produces one
One produces two
Two produce three
Three produce myriad things
Myriad things, backed by yin and embracing yang
Achieve harmony by integrating their energy
What the people dislike
Are alone, bereft, and unworthy
But the rulers call themselves with these terms
So with all things
Appear to take loss but benefit
Or receive benefit but lose
What the ancients taught
I will also teach
The violent one cannot have a natural death
I will use this as the principal of all teachings
The softest things of the world
Override the hardest things of the world
That which has no substance
Enters into that which has no openings
From this I know the benefits of unattached actions
The teaching without words
The benefits of actions without attachment
Are rarely matched in the world
Fame or the self, which is dearer?
The self or wealth, which is greater?
Gain or loss, which is more painful?
Thus excessive love must lead to great spending
Excessive hoarding must lead to heavy loss
Knowing contentment avoids disgrace
Knowing when to stop avoids danger
Thus one can endure indefinitely
Great perfection seems flawed
Its function is without failure
Great fullness seems empty
Its function is without exhaustion
Great straightness seems bent
Great skill seems unrefined
Great eloquence seems inarticulate
Movement overcomes cold
Stillness overcomes heat
Clear quietness is the standard of the world
When the world has the Tao
Fast horses are retired to till the soil
When the world lacks the Tao
Warhorses give birth on the battlefield
There is no crime greater than greed
No disaster greater than discontentment
No fault greater than avarice
Thus the satisfaction of contentment
is the lasting satisfaction
Without going out the door, know the world
Without peering out the window, see the Heavenly Tao
The further one goes
The less one knows
Therefore the sage
Knows without going
Names without seeing
Achieves without striving
Pursue knowledge, daily gain
Pursue Tao, daily loss
Loss and more loss
Until one reaches unattached action
With unattached action, there is nothing one cannot do
Take the world by constantly applying non-interference
The one who interferes is not qualified to take the world
The sages have no constant mind
They take the mind of the people as their mind
Those who are good, I am good to them
Those who are not good, I am also good to them
Thus the virtue of goodness
Those who believe, I believe them
Those who do not believe, I also believe them
Thus the virtue of belief
The sages live in the world
They cautiously merge their mind for the world
The people all pay attention with their ears and eyes
The sages care for them as children
Coming into life, entering death
The followers of life, three in ten
The followers of death, three in ten
Those whose lives are moved toward death
Also three in ten
Why? Because they live lives of excess
I've heard of those who are good at cultivating life
Traveling on the road, they do not encounter rhinos or tigers
Entering into an army, they are not harmed by weapons
Rhinos have nowhere to thrust their horns
Tigers have nowhere to clasp their claws
Soldiers have nowhere to lodge their blades
Why? Because they have no place for death
Tao produces them
Virtue raises them
Things shape them
Forces perfect them
Therefore all things respect the Tao and value virtue
The respect for Tao, the value of virtue
Not due to command but to constant nature
Thus Tao produces them
Virtue raises them
Grows them, educates them
Perfects them, matures them
Nurtures them, protects them
Produces but does not possess
Acts but does not flaunt
Nurtures but does not dominate
This is called Mystic Virtue
The world has a beginning
We regard it as the mother of the world
Having its mother
We can know her children
Knowing her children
Still holding on to the mother
Live without danger all through life
Close the mouth
Shut the doors
Live without toil all through life
Open the mouth
Meddle in the affairs
Live without salvation all through life
Seeing details is called clarity
Holding on to the soft is called strength
Utilize the light
Return to the clarity
Leaving no disasters for the self
This is called practicing constancy
If I have a little knowledge
Walking on the great Tao
I fear only to deviate from it
The great Tao is broad and plain
But people like the side paths
The courts are corrupt
The fields are barren
The warehouses are empty
Officials wear fineries
Carry sharp swords
Fill up on drinks and food
Acquire excessive wealth
This is called robbery
It is not the Tao!
That which is well established cannot be uprooted
That which is strongly held cannot be taken
The descendants will commemorate it forever
Cultivate it in yourself; its virtue shall be true
Cultivate it in the family; its virtue shall be abundant
Cultivate it in the community; its virtue shall be lasting
Cultivate it in the country; its virtue shall be prosperous
Cultivate it in the world; its virtue shall be widespread
Therefore observe others with yourself
Observe other families with your family
Observe other communities with your community
Observe other countries with your country
Observe the world with the world
With what do I know the world?
With this
Those who hold an abundance of virtue
Are similar to newborn infants
Poisonous insects do not sting them
Wild beasts do not claw them
Birds of prey do not attack them
Their bones are weak, tendons are soft
But their grasp is firm
They do not know of sexual union but can manifest arousal
Due to the optimum of essence
They can cry the whole day and yet not be hoarse
Due to the optimum of harmony
Knowing harmony is said to be constancy
Knowing constancy is said to be clarity
Excessive vitality is said to be inauspicious
Mind overusing energy is said to be aggressive
Things become strong and then grow old
This is called contrary to the Tao
That which is contrary to the Tao will soon perish
Those who know do not talk
Those who talk do not know
Close the mouth
Shut the doors
Blunt the sharpness
Unravel the knots
Dim the glare
Mix the dust
This is called Mystic Oneness
They cannot obtain this and be closer
They cannot obtain this and be distant
They cannot obtain this and be benefited
They cannot obtain this and be harmed
They cannot obtain this and be valued
They cannot obtain this and be degraded
Therefore, they become honored by the world
Govern a country with upright integrity
Deploy the military with surprise tactics
Take the world with non-interference
How do I know this is so?
With the following:
When there are many restrictions in the world
The people become more impoverished
When people have many sharp weapons
The country becomes more chaotic
When people have many clever tricks
More strange things occur
The more laws are posted
The more robbers and thieves there are
Therefore the sage says:
I take unattached action, and the people transform themselves
I prefer quiet, and the people right themselves
I do not interfere, and the people enrich themselves
I have no desires, and the people simplify themselves
When governing is lackluster
The people are simple and honest
When governing is scrutinizing
The people are shrewd and crafty
Misfortune is what fortune depends upon
Fortune is where misfortune hides beneath
Who knows their ultimate end?
They have no determined outcome
Rightness reverts to become strange
Goodness reverts to become wicked
The confusion of people
has lasted many long days
Therefore the sages are:
Righteous without being scathing
Incorruptible without being piercing
Straightforward without being ruthless
Illuminated without being flashy
In governing people and serving Heaven
There is nothing like conservation
Only with conservation is it called submitting early
Submitting early is called emphasis on accumulating virtues
Accumulating virtues means there is nothing one cannot overcome
When there is nothing that one cannot overcome
One's limits are unknown
The limitations being unknown, one can possess sovereignty
With this mother principle of power, one can be everlasting
This is called deep roots and firm foundation
The Tao of longevity and lasting vision
Ruling a large country is like cooking a small fish
Using the Tao to manage the world
Its demons have no power
Not only do its demons have no power
Its gods do not harm people
Not only do its gods not harm people
The sages also do not harm people
They both do no harm to one another
So virtue merges and returns
The large country is like the lowest river
The converging point of the world
The receptive female of the world
The female always overcomes the male with serenity
Using serenity as the lower position
Thus if the large country is lower than the small country
Then it can take the small country
If the small country is lower than the large country
Then it can be taken by the large country
Thus one uses the lower position to take
The other uses the lower position to be taken
The large country only wishes to gather and protect people
The small country only wishes to join and serve people
So that both obtain what they wish
The larger one should assume the lower position
The Tao is the wonder of all things
The treasure of the kind person
The protection of the unkind person
Admirable words can win the public's respect
Admirable actions can improve people
Those who are unkind
How can they be abandoned?
Therefore, when crowning the Emperor
And installing the three ministers
Although there is the offering of jade before four horses
None of it can compare to being seated in this Tao
Why did the ancients value this Tao so much?
Is it not said that those who seek will find,
And those with guilt will not be faulted?
Therefore, it is the greatest value in the world
Act without action
Manage without meddling
Taste without tasting
Great, small, many, few
Respond to hatred with virtue
Plan difficult tasks through the simplest tasks
Achieve large tasks through the smallest tasks
The difficult tasks of the world
Must be handled through the simple tasks
The large tasks of the world
Must be handled through the small tasks
Therefore, sages never attempt great deeds all through life
Thus they can achieve greatness
One who makes promises lightly must deserve little trust
One who sees many easy tasks must encounter much difficulty
Therefore, sages regard things as difficult
So they never encounter difficulties all through life
When it is peaceful, it is easy to maintain
When it shows no signs, it is easy to plan
When it is fragile, it is easy to break
When it is small, it is easy to scatter
Act on it when it has not yet begun
Treat it when it is not yet chaotic
A tree thick enough to embrace
Grows from the tiny sapling
A tower of nine levels
Starts from the dirt heap
A journey of a thousand miles
Begins beneath the feet
The one who meddles will fail
The one who grasps will lose
Therefore, sages do not meddle and thus do not fail
They do not grasp and thus do not lose
People, in handling affairs
Often come close to completion and fail
If they are as careful in the end as the beginning
Then they would have no failure
Therefore, sages desire not to desire
They do not value goods that are hard to acquire
They learn to unlearn
To redeem the fault of the people
To assist the nature of all things
Without daring to meddle
Those of ancient times who were adept at the Tao
Used it not to make people brighter
But to keep them simple
The difficulty in governing people
Is due their excessive cleverness
Therefore, using cleverness to govern the state
Is being a thief of the state
Not using cleverness to govern the state
Is being a blessing of the state
Know that these two are both standards
Always knowing these standards
Is called Mystic Virtue
Mystic Virtue: Profound! Far-reaching!
It goes opposite to material things
Then it reaches great congruence
Rivers and oceans can be the kings of a hundred valleys
Because of their goodness in staying low
So they can be the kings of a hundred valleys
Thus if sages wish to be over people
They must speak humbly to them
If they wish to be in front of people
They must place themselves behind them
Thus the sages are positioned above
But the people do not feel burdened
They are positioned in front
But the people do not feel harmed
Thus the world is glad to push them forward without resentment
Because they do not contend
So the world cannot contend with them
Everyone in the world calls my Tao great
As if it is beyond compare
It is only because of its greatness
That it seems beyond compare
If it can be compared
It would already be insignificant long ago!
I have three treasures
I hold on to them and protect them
The first is called compassion
The second is called conservation
The third is called not daring to be ahead in the world
Compassionate, thus able to have courage
Conserving, thus able to reach widely
Not daring to be ahead in the world
Thus able to assume leadership
Now if one has courage but discards compassion
Reaches widely but discards conservation
Goes ahead but discards being behind
Then death!
If one fights with compassion, then victory
With defense, then security
Heaven shall save them
And with compassion guard them
The great generals are not warlike
The great warriors do not get angry
Those who are good at defeating enemies do not engage them
Those who are good at managing people lower themselves
It is called the virtue of non-contention
It is called the power of managing people
It is called being harmonious with Heaven
The ultimate principle of the ancients
In using the military, there is a saying:
I dare not be the host, but prefer to be the guest
I dare not advance an inch, but prefer to withdraw a foot
This is called marching in formation without formation
Raising arms without arms
Grappling enemies without enemies
Holding weapons without weapons
There is no greater disaster than to underestimate the enemy
Underestimating the enemy almost made me lose my treasures
So when evenly matched armies meet
The side that is compassionate shall win
My words are easy to understand, easy to practice
The world cannot understand, cannot practice
My words have basis
My actions have principle
People do not understand this
Therefore they do not understand me
Those who understand me are few
Thus I am highly valued
Therefore the sage wears plain clothes but holds jade
To know that you do not know is highest
To not know but think you know is flawed
Only when one recognizes the fault as a fault
can one be without fault
The sages are without fault
Because they recognize the fault as a fault
That is why they are without fault
When people no longer fear force
They bring about greater force
Do not limit their place
Do not reject their livelihood
Because the ruler does not reject them
Therefore they do not reject the ruler
Therefore the sages:
Know themselves but do not glorify themselves
Respect themselves but do not praise themselves
Thus they discard that and take this
The bold in daring will be killed
The bold in not daring will survive
Of these two, one may benefit, the other may harm
The one hated by Heaven – who knows the reason?
Even the sages still find this difficult
The Tao of Heaven:
Does not contend and yet excels in winning
Does not speak and yet excels in responding
Is not summoned and yet comes on its own
Is unhurried and yet excels in planning
The heavenly net is vast
Loose, and yet does not let anything slip through
People do not fear death
How can they be threatened with death?
If people are made to constantly fear death
Then those who act unlawfully
I can capture and kill them
Who would dare?
There exists a master executioner that kills
If we substitute for the master executioner to kill
It is like substituting for the great carpenter to cut
Those who substitute for the great carpenter to cut
It is rare that they do not hurt their own hands
The people's hunger
Is due to the excess of their ruler's taxation
So they starve
The people's difficulty in being governed
Is due to the meddling of their ruler
So they are difficult to govern
The people's disregard for death
Is due to the glut in their ruler's pursuit of life
So they disregard death
Therefore those who do not strive for living
Are better than those who value living
While alive, the body is soft and pliant
When dead, it is hard and rigid
All living things, grass and trees,
While alive, are soft and supple
When dead, become dry and brittle
Thus that which is hard and stiff
is the follower of death
That which is soft and yielding
is the follower of life
Therefore, an inflexible army will not win
A strong tree will be cut down
The big and forceful occupy a lowly position
While the soft and pliant occupy a higher place
The Tao of Heaven
Is like drawing a bow
Lower that which is high
Raise that which is low
Reduce that which has excess
Add to that which is lacking
The Tao of heaven
Reduces the excessive
And adds to the lacking
The Tao of people is not so
It reduces the lacking
In order to offer to the excessive
Who can offer their excess to the world?
Only those who have the Tao
Therefore sages act without conceit
Achieve without claiming credit
They do not wish to display their virtue!
Nothing in the world is softer or weaker than water
Yet nothing is better at overcoming the hard and strong
This is because nothing can replace it
That the weak overcomes the strong
And the soft overcomes the hard
Everybody in the world knows
But cannot put into practice
Therefore sages say:
The one who accepts the humiliation of the state
Is called its master
The one who accepts the misfortune of the state
Becomes king of the world
The truth seems like the opposite
After settling a great dispute
There must be remaining resentments
How can this be considered good?
Therefore the sage holds the left part of the contract
But does not demand payment from the other person
Those who have virtue hold the contract
Those without virtue hold the collections
The Heavenly Tao has no favorites
It constantly gives to the kind people
Small country, few people
Let them have many weapons but not use them
Let the people regard death seriously
And not migrate far away
Although they have boats and chariots
They have no need to take them
Although they have armors and weapons
They have no need to display them
Let the people return to tying knots and using them
Savor their food, admire their clothes
Content in their homes, happy in their customs
Neighboring countries see one another
Hear the sounds of roosters and dogs from one another
The people, until they grow old and die
Do not go back and forth with one another
True words are not beautiful
Beautiful words are not true
Those who are good do not debate
Those who debate are not good
Those who know are not broad of knowledge
Those who are broad of knowledge do not know
Sages do not accumulate
The more they assist others, the more they possess
The more they give to others, the more they gain
The Tao of heaven
Benefits and does not harm
The Tao of sages
Assists and does not contend
[[Welcome]]
[[Tao Te Ching]]
{{{
[img[title|filename]]
[img[filename]]
[img[title|filename][link]]
[img[filename][link]]
}}}
Images can be included by their filename or full URL. It's good practice to include a title to be shown as a tooltip, and when the image isn't available. An image can also link to another tiddler or or a URL
[img[Romanesque broccoli|img/fractalveg.jpg][http://www.flickr.com/photos/jermy/10134618/]]
{{{
[img[Fractal vegetable|fractalveg.jpg]]
[img[This is shown as a tooltip|http://example.com/image.jpg]]
[img[http://example.com/image.jpg]]
[img[http://example.com/image.jpg][ExampleDotCom]]
}}}
The tooltip is optional.
[<img[Forest|img/forest.jpg][http://www.flickr.com/photos/jermy/8749660/]][>img[Field|img/field.jpg][http://www.flickr.com/photos/jermy/8749285/]]You can also float images to the left or right: the forest is left aligned with {{{[<img[}}}, and the field is right aligned with {{{[>img[}}}.
@@clear(left):clear(right):display(block):You can use CSS to clear the floats@@
{{{
[<img[A woody bit of Hampstead Heath|forest.jpg]]
[>img[A field near Milton Keynes|field.jpg]]
}}}
*Links
**[[Links]]
**[[PrettyLinks]]
**[[WikiWordEscape]]
*Layout
**[[TextStyle]]
**[[SubHeadings]]
**[[BulletPoints]]
**[[NumberedBulletPoints]]
**[[EmbeddedImages]]
**[[HorizontalRules]]
**[[Tables]]
**[[PeriodicTable]]
**[[BlockQuotes]]
**[[MonospacedText]]
**[[PlainTextBlock]]
*Advanced
**[[HtmlEntities]]
**[[TiddlerComments]]
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
You can divide a tiddler into
----
sections by typing four dashes on a line by themselves
Entities in HTML documents allow characters to be entered that can't easily be typed on an ordinary keyboard. They take the form of an ampersand (&), an identifying string, and a terminating semi-colon (;). There's a complete reference [[here|http://www.htmlhelp.com/reference/html40/entities/]]; some of the more common and useful ones are shown below. Also see [[Paul's Notepad|http://thepettersons.org/PaulsNotepad.html#GreekHtmlEntities%20HtmlEntitiesList%20LatinHtmlEntities%20MathHtmlEntities]] for a more complete list.
|>|>|>|>|>|>| !HTML Entities |
| &nbsp; | | no-break space | | &apos; | ' | single quote, apostrophe |
| &ndash; | – | en dash |~| &quot; | " | quotation mark |
| &mdash; | — | em dash |~| &prime; | ′ | prime; minutes; feet |
| &hellip; | … | horizontal ellipsis |~| &Prime; | ″ | double prime; seconds; inches |
| &copy; | © | Copyright symbol |~| &lsquo; | ‘ | left single quote |
| &reg; | ® | Registered symbol |~| &rsquo; | ’ | right single quote |
| &trade; | ™ | Trademark symbol |~| &ldquo; | “ | left double quote |
| &dagger; | † | dagger |~| &rdquo; | ” | right double quote |
| &Dagger; | ‡ | double dagger |~| &laquo; | « | left angle quote |
| &para; | ¶ | paragraph sign |~| &raquo; | » | right angle quote |
| &sect; | § | section sign |~| &times; | × | multiplication symbol |
| &uarr; | ↑ | up arrow |~| &darr; | ↓ | down arrow |
| &larr; | ← | left arrow |~| &rarr; | → | right arrow |
| &lArr; | ⇐ | double left arrow |~| &rArr; | ⇒ | double right arrow |
| &harr; | ↔ | left right arrow |~| &hArr; | ⇔ | double left right arrow |
The table below shows how accented characters can be built up by subsituting a base character into the various accent entities in place of the underscore ('_'):
|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>| !Accented Characters |
| grave accent | &_grave; | À | à | È | è | Ì | ì | Ò | ò | Ù | ù | | | | | | |
| acute accent | &_acute; | Á | á | É | é | Í | í | Ó | ó | Ú | ú | | | Ý | ý | | |
| circumflex accent | &_circ; | Â | â | Ê | ê | Î | î | Ô | ô | Û | û | | | | | | |
| umlaut mark | &_uml; | Ä | ä | Ë | ë | Ï | ï | Ö | ö | Ü | ü | | | Ÿ | ÿ | | |
| tilde | &_tilde; | Ã | ã | | | | | Õ | õ | | | Ñ | ñ | | | | |
| ring | &_ring; | Å | å | | | | | | | | | | | | | |
| slash | &_slash; | | | | | | | Ø | ø | | | | | | | |
| cedilla | &_cedil; | | | | | | | | | | | | | | | Ç | ç |
Links can be made by using a WikiWord as its name or you can enclose the name in [[double square brackets]] - like this: {{{[[double square brackets]]}}}. After saving the tiddler you can then click on the link to create the new tiddler. Non-WikiWord links permits tiddlers to be created with names that are made from character sets that don't have upper and lower case.
/***
|''Name:''|LoadRemoteFileThroughProxy (previous LoadRemoteFileHijack)|
|''Description:''|When the TiddlyWiki file is located on the web (view over http) the content of [[SiteProxy]] tiddler is added in front of the file url. If [[SiteProxy]] does not exist "/proxy/" is added. |
|''Version:''|1.1.0|
|''Date:''|mar 17, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#LoadRemoteFileHijack|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
***/
//{{{
version.extensions.LoadRemoteFileThroughProxy = {
major: 1, minor: 1, revision: 0,
date: new Date("mar 17, 2007"),
source: "http://tiddlywiki.bidix.info/#LoadRemoteFileThroughProxy"};
if (!window.bidix) window.bidix = {}; // bidix namespace
if (!bidix.core) bidix.core = {};
bidix.core.loadRemoteFile = loadRemoteFile;
loadRemoteFile = function(url,callback,params)
{
if ((document.location.toString().substr(0,4) == "http") && (url.substr(0,4) == "http")){
url = store.getTiddlerText("SiteProxy", "/proxy/") + url;
}
return bidix.core.loadRemoteFile(url,callback,params);
}
//}}}
[[Welcome]]
[[Tao Te Ching]]
[[Searching]]
[[Formatting]]
[[Meta]]
[[WelcomeToTiddlyspot]]
[[GettingStarted]]
[[TaoSearchPlugin]]
[[TaoSearchOptions]]
[[StyleSheet]]
{{{Monospaced text}}} is supported - edit this tiddler to see the syntax.
You can also have monospaced blocks (useful for source code):
{{{
var posTop = findPosY(e);
var posBot = posTop + e.offsetHeight;
var winTop = findScrollY();
var winHeight = findWindowHeight();
var winBot = winTop + winHeight;
if(posTop < winTop)
return(posTop);
else if(posBot > winBot)
{
if(e.offsetHeight < winHeight)
return(posTop - (winHeight - e.offsetHeight));
else
return(posTop);
}
else
return(winTop);
}}}
It's easy to create NumberedBulletPoints.
# Use a single '#' at the start of each line
# and the tiddler will automatically
# start numbering your list.
## If you want a sub-list
## within any bullets
## add two '#'s at the start of the lines.
# When you go back to a single '#'
# the main numbered list will start up
# where it left off.
It's just as simple to do normal BulletPoints.
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
major: 1, minor: 0, revision: 2,
date: new Date("Apr 19, 2007"),
source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
coreVersion: '2.2.0 (Beta 5)'
};
config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");
merge(config.macros.option.types, {
'pas': {
elementType: "input",
valueField: "value",
eventName: "onkeyup",
className: "pasOptionInput",
typeValue: config.macros.option.passwordInputType,
create: function(place,type,opt,className,desc) {
// password field
config.macros.option.genericCreate(place,'pas',opt,className,desc);
// checkbox linked with this password "save this password on this computer"
config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);
// text savePasswordCheckboxLabel
place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
},
onChange: config.macros.option.genericOnChange
}
});
merge(config.optionHandlers['chk'], {
get: function(name) {
// is there an option linked with this chk ?
var opt = name.substr(3);
if (config.options[opt])
saveOptionCookie(opt);
return config.options[name] ? "true" : "false";
}
});
merge(config.optionHandlers, {
'pas': {
get: function(name) {
if (config.options["chk"+name]) {
return encodeCookie(config.options[name].toString());
} else {
return "";
}
},
set: function(name,value) {config.options[name] = decodeCookie(value);}
}
});
// need to reload options to load passwordOptions
loadOptionsCookie();
/*
if (!config.options['pasPassword'])
config.options['pasPassword'] = '';
merge(config.optionsDesc,{
pasPassword: "Test password"
});
*/
//}}}
|Standard Periodic Table (ref. Wikipedia)|c
|| !1 | !2 |!| !3 | !4 | !5 | !6 | !7 | !8 | !9 | !10 | !11 | !12 | !13 | !14 | !15 | !16 | !17 | !18 |
|!1|bgcolor(#a0ffa0): @@color(red):H@@ |>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>||bgcolor(#c0ffff): @@color(red):He@@ |
|!2|bgcolor(#ff6666): Li |bgcolor(#ffdead): Be |>|>|>|>|>|>|>|>|>|>||bgcolor(#cccc99): B |bgcolor(#a0ffa0): C |bgcolor(#a0ffa0): @@color(red):N@@ |bgcolor(#a0ffa0): @@color(red):O@@ |bgcolor(#ffff99): @@color(red):F@@ |bgcolor(#c0ffff): @@color(red):Ne@@ |
|!3|bgcolor(#ff6666): Na |bgcolor(#ffdead): Mg |>|>|>|>|>|>|>|>|>|>||bgcolor(#cccccc): Al |bgcolor(#cccc99): Si |bgcolor(#a0ffa0): P |bgcolor(#a0ffa0): S |bgcolor(#ffff99): @@color(red):Cl@@ |bgcolor(#c0ffff): @@color(red):Ar@@ |
|!4|bgcolor(#ff6666): K |bgcolor(#ffdead): Ca ||bgcolor(#ffc0c0): Sc |bgcolor(#ffc0c0): Ti |bgcolor(#ffc0c0): V |bgcolor(#ffc0c0): Cr |bgcolor(#ffc0c0): Mn |bgcolor(#ffc0c0): Fe |bgcolor(#ffc0c0): Co |bgcolor(#ffc0c0): Ni |bgcolor(#ffc0c0): Cu |bgcolor(#ffc0c0): Zn |bgcolor(#cccccc): Ga |bgcolor(#cccc99): Ge |bgcolor(#cccc99): As |bgcolor(#a0ffa0): Se |bgcolor(#ffff99): @@color(green):Br@@ |bgcolor(#c0ffff): @@color(red):Kr@@ |
|!5|bgcolor(#ff6666): Rb |bgcolor(#ffdead): Sr ||bgcolor(#ffc0c0): Y |bgcolor(#ffc0c0): Zr |bgcolor(#ffc0c0): Nb |bgcolor(#ffc0c0): Mo |bgcolor(#ffc0c0): Tc |bgcolor(#ffc0c0): Ru |bgcolor(#ffc0c0): Rh |bgcolor(#ffc0c0): Pd |bgcolor(#ffc0c0): Ag |bgcolor(#ffc0c0): Cd |bgcolor(#cccccc): In |bgcolor(#cccccc): Sn |bgcolor(#cccc99): Sb |bgcolor(#cccc99): Te |bgcolor(#ffff99): I |bgcolor(#c0ffff): @@color(red):Xe@@ |
|!6|bgcolor(#ff6666): Cs |bgcolor(#ffdead): Ba |bgcolor(#ffbfff):^^*1^^|bgcolor(#ffc0c0): Lu |bgcolor(#ffc0c0): Hf |bgcolor(#ffc0c0): Ta |bgcolor(#ffc0c0): W |bgcolor(#ffc0c0): Re |bgcolor(#ffc0c0): Os |bgcolor(#ffc0c0): Ir |bgcolor(#ffc0c0): Pt |bgcolor(#ffc0c0): Au |bgcolor(#ffc0c0): @@color(green):Hg@@ |bgcolor(#cccccc): Tl |bgcolor(#cccccc): Pb |bgcolor(#cccccc): Bi |bgcolor(#cccc99): Po |bgcolor(#ffff99): At |bgcolor(#c0ffff): @@color(red):Rn@@ |
|!7|bgcolor(#ff6666): Fr |bgcolor(#ffdead): Ra |bgcolor(#ff99cc):^^*2^^|bgcolor(#ffc0c0): Lr |bgcolor(#ffc0c0): Rf |bgcolor(#ffc0c0): Db |bgcolor(#ffc0c0): Sq |bgcolor(#ffc0c0): Bh |bgcolor(#ffc0c0): Hs |bgcolor(#ffc0c0): Mt |bgcolor(#ffc0c0): Ds |bgcolor(#ffc0c0): Rg |bgcolor(#ffc0c0): @@color(green):Uub@@ |bgcolor(#cccccc): Uut |bgcolor(#cccccc): Uuq |bgcolor(#cccccc): Uup |bgcolor(#cccccc): Uuh |bgcolor(#fcfecc): @@color(#cccccc):Uus@@ |bgcolor(#ecfefc): @@color(#cccccc):Uuo@@ |
| !Lanthanides^^*1^^|bgcolor(#ffbfff): La |bgcolor(#ffbfff): Ce |bgcolor(#ffbfff): Pr |bgcolor(#ffbfff): Nd |bgcolor(#ffbfff): Pm |bgcolor(#ffbfff): Sm |bgcolor(#ffbfff): Eu |bgcolor(#ffbfff): Gd |bgcolor(#ffbfff): Tb |bgcolor(#ffbfff): Dy |bgcolor(#ffbfff): Ho |bgcolor(#ffbfff): Er |bgcolor(#ffbfff): Tm |bgcolor(#ffbfff): Yb |
| !Actinides^^*2^^|bgcolor(#ff99cc): Ac |bgcolor(#ff99cc): Th |bgcolor(#ff99cc): Pa |bgcolor(#ff99cc): U |bgcolor(#ff99cc): Np |bgcolor(#ff99cc): Pu |bgcolor(#ff99cc): Am |bgcolor(#ff99cc): Cm |bgcolor(#ff99cc): Bk |bgcolor(#ff99cc): Cf |bgcolor(#ff99cc): Es |bgcolor(#ff99cc): Fm |bgcolor(#ff99cc): Md |bgcolor(#ff99cc): No |
*Chemical Series of the Periodic Table
**@@bgcolor(#ff6666): Alkali metals@@
**@@bgcolor(#ffdead): Alkaline earth metals@@
**@@bgcolor(#ffbfff): Lanthanides@@
**@@bgcolor(#ff99cc): Actinides@@
**@@bgcolor(#ffc0c0): Transition metals@@
**@@bgcolor(#cccccc): Poor metals@@
**@@bgcolor(#cccc99): Metalloids@@
**@@bgcolor(#a0ffa0): Nonmetals@@
**@@bgcolor(#ffff99): Halogens@@
**@@bgcolor(#c0ffff): Noble gases@@
*State at standard temperature and pressure
**those in @@color(red):red@@ are gases
**those in @@color(green):green@@ are liquids
**those in black are solids
Sometimes text can inadvertently match TiddlyWiki formatting instructions - particularly program code, or text pasted from elsewhere. In these situations you can either use MonospacedText or you can accomplish the same thing without the monospaced effect like this:
{{{
This is AnotherLink, this is a copyright symbol © and this site is called <<tiddler SiteTitle>>
<nowiki>This is AnotherLink, this is a copyright symbol © and this site is called <<tiddler SiteTitle>></nowiki>
"""This is AnotherLink, this is a copyright symbol © and this site is called <<tiddler SiteTitle>>"""
}}}
Which would normaly display as:
This is AnotherLink, this is a copyright symbol © and this site is called <<tiddler SiteTitle>>
<nowiki>This is AnotherLink, this is a copyright symbol © and this site is called <<tiddler SiteTitle>></nowiki>
"""This is AnotherLink, this is a copyright symbol © and this site is called <<tiddler SiteTitle>>"""
You can now link to [[external sites|http://www.osmosoft.com]] or [[ordinary tiddlers|TiddlyWiki]] with ordinary words, without the messiness of the full URL appearing. Edit this tiddler to see how.
The format for PrettyLinks allows for links that open local or network folders. Depending on your browser and operating system, the folders are opened in Windows Explorer, the OS X Finder, or the browser itself.
Edit this tiddler to see [[this link to a Windows network share|file://///server/share/folder/path/name]], [[this link to a Windows drive-mapped folder|file:///c:/folder/path/name]] and [[this link to a Unix-style folder|file:///folder/path/name]].
!Basic Searching
The search function provided on this site has been specially modified to best suit searching the Tao Te Ching. This guide provides essential information needed to gain the maximum benefit from these optimizations.
!!Incremental Search
As you enter characters into the search box, matches will begin to appear. Only one character is required to begin the search. This allows you to gradually refine.
For example, lets say that we are currious to see what the Tao Te Ching has to say about war.
returns all chapters containing the words war, warhorses, warehouses, warlike, warriors, toward, straightforward, forward.
Translatied by Derek Lin. Searchable and Annotated.
.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:1em 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:1em 0 1em 1em; left:0px; top:0px;}
!Header 1
!!Header 2
!!!Header 3
!!!!Header 4
!!!!!Header 5
*sample:
|!th1111111111|!th2222222222|
|>| colspan |
| rowspan |left|
|~| right|
|bgcolor(#a0ffa0):colored| center |
|caption|c
*another sample: see PeriodicTable.
For advanced effects, you can control the CSS style of a table by adding a row like this:
{{{
|cssClass|k
}}}
| [[Chapter 01]] | [[Chapter 02]] | [[Chapter 03]] | [[Chapter 04]] | [[Chapter 05]] | [[Chapter 06]] | [[Chapter 07]] | [[Chapter 08]] | [[Chapter 09]] |
| [[Chapter 10]] | [[Chapter 11]] | [[Chapter 12]] | [[Chapter 13]] | [[Chapter 14]] | [[Chapter 15]] | [[Chapter 16]] | [[Chapter 17]] | [[Chapter 18]] |
| [[Chapter 19]] | [[Chapter 20]] | [[Chapter 21]] | [[Chapter 22]] | [[Chapter 23]] | [[Chapter 24]] | [[Chapter 25]] | [[Chapter 26]] | [[Chapter 27]] |
| [[Chapter 28]] | [[Chapter 29]] | [[Chapter 30]] | [[Chapter 31]] | [[Chapter 32]] | [[Chapter 33]] | [[Chapter 34]] | [[Chapter 35]] | [[Chapter 36]] |
| [[Chapter 37]] | [[Chapter 38]] | [[Chapter 39]] | [[Chapter 40]] | [[Chapter 41]] | [[Chapter 42]] | [[Chapter 43]] | [[Chapter 44]] | [[Chapter 45]] |
| [[Chapter 46]] | [[Chapter 47]] | [[Chapter 48]] | [[Chapter 49]] | [[Chapter 50]] | [[Chapter 51]] | [[Chapter 52]] | [[Chapter 53]] | [[Chapter 54]] |
| [[Chapter 55]] | [[Chapter 56]] | [[Chapter 57]] | [[Chapter 58]] | [[Chapter 59]] | [[Chapter 60]] | [[Chapter 61]] | [[Chapter 62]] | [[Chapter 63]] |
| [[Chapter 64]] | [[Chapter 65]] | [[Chapter 66]] | [[Chapter 67]] | [[Chapter 68]] | [[Chapter 69]] | [[Chapter 70]] | [[Chapter 71]] | [[Chapter 72]] |
| [[Chapter 73]] | [[Chapter 74]] | [[Chapter 75]] | [[Chapter 76]] | [[Chapter 77]] | [[Chapter 78]] | [[Chapter 79]] | [[Chapter 80]] | [[Chapter 81]] |
<<option chkSearchText>> Search Text
<<option chkSearchTag>> Search Tags
<<option chkSearchTitle>> Search Titles
<<option chkIncrementalSearch>> Incremental key-by-key search: {{twochar{<<option txtIncrementalSearchMin>>}}} or more characters
/***
|''Name''|TaoSearchPlugin|
|''Description''|Expanded search options.|
|''Authors''|Charles Nodell|
|''Version''|0.2.0|
|''Status''|beta|
|''Source''||
|''CodeRepository''||
|''License''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Keywords''|search|
!Revision History
!!v0.1.0 (2009-07-23)
* Initial release
!!v0.2.0 (2009-07-28)
* Added Advanced Search Options slider under SearchBox
* Incremental search now starts with first character
* allowed users to specify min characters for incremental search.
* added search options to TaoSearchPlugin
!To Do
* Maintain compatibility with future versions of TiddlyWiki
!Advanced Search Options
<<option chkSearchText>> Search Text
<<option chkSearchTag>> Search Tags
<<option chkSearchTitle>> Search Titles
<<option chkIncrementalSearch>> Incremental key-by-key search: {{twochar{<<option txtIncrementalSearchMin>>}}} or more characters
!Code
***/
//{{{
if(!version.extensions.TaoSearchPlugin) { //# ensure that the plugin is only installed once
version.extensions.TaoSearchPlugin = { installed: true };
if (config.options.chkSearchText===undefined)
config.options.chkSearchText=true;
if (config.options.chkSearchTag===undefined)
config.options.chkSearchTag=true;
if (config.options.chkSearchTitle===undefined)
config.options.chkSearchTitle=false;
if (config.options.txtIncrementalSearchMin===undefined)
config.options.txtIncrementalSearchMin=1;
//override search macro
config.macros.search.onClickSlider = function(ev)
{
var e = ev || window.event;
var n = this.nextSibling;
var cookie = n.getAttribute("cookie");
var isOpen = n.style.display != "none";
if(config.options.chkAnimate && anim && typeof Slider == "function")
anim.startAnimating(new Slider(n,!isOpen,null,"none"));
else
n.style.display = isOpen ? "none" : "block";
config.options[cookie] = !isOpen;
saveOptionCookie(cookie);
return false;
};
config.macros.search.createSlider = function(place,cookie,title,tooltip)
{
var c = cookie || "";
var btn = createTiddlyButton(place,title,tooltip,this.onClickSlider);
var panel = createTiddlyElement(null,"div",null,"sliderPanel");
panel.setAttribute("cookie",c);
panel.style.display = config.options[c] ? "block" : "none";
place.appendChild(panel);
return panel;
};
merge(config.macros.search,{
label: "search",
prompt: "Search this TiddlyWiki",
accessKey: "F",
successMsg: "%0 tiddlers found matching %1",
failureMsg: "No tiddlers found matching %0"})
config.macros.search.handler = function(place,macroName,params)
{
var searchTimeout = null;
var btn = createTiddlyButton(place,this.label,this.prompt,this.onClick,"searchButton");
var txt = createTiddlyElement(null,"input",null,"txtOptionInput searchField");
place.appendChild(txt);
txt.onkeyup = this.onKeyPress;
txt.onfocus = this.onFocus;
txt.setAttribute("size",this.sizeTextbox);
txt.setAttribute("accessKey",params[1] || this.accessKey);
txt.setAttribute("autocomplete","off");
txt.setAttribute("lastSearchText","");
var panel = this.createSlider(place,"chkTaoSearchOptionsPanel","advanced search options »","Choose what elements to search");
var text = store.getTiddlerText("TaoSearchOptions");
panel.setAttribute("refresh","content");
panel.setAttribute("tiddler","TaoSearchOptions");
if(params[0])
txt.value = params[0];
if(config.browser.isSafari) {
txt.setAttribute("type","search");
txt.setAttribute("results","5");
}
else {
txt.setAttribute("type","text");
}
if(text)
wikify(text,panel,null,store.getTiddler("TaoSearchOptions"));
};
// override Tconfig.macros.search.onKeyPress to start incremental search with> 0
var fn=config.macros.search.onKeyPress;
fn=fn.toString().replace(/> 2/g, ">=(config.options.txtIncrementalSearchMin||1)");
eval("config.macros.search.onKeyPress="+fn);
// override TiddlyWiki.search() to sort by relevance
TiddlyWiki.prototype.search = function(searchRegExp, sortField, excludeTag, match) {
var candidates = this.reverseLookup("tags", excludeTag, !!match);
var primary = [];
var secondary = [];
var tertiary = [];
if (config.options.chkSearchText==true && config.options.chkSearchTag==true && config.options.chkSearchTitle==true){
for(var t = 0; t < candidates.length; t++) {
if(candidates[t].title.search(searchRegExp) != -1) {
primary.push(candidates[t]);
} else if(candidates[t].tags.join(" ").search(searchRegExp) != -1) {
secondary.push(candidates[t]);
} else if(candidates[t].text.search(searchRegExp) != -1) {
tertiary.push(candidates[t]);
}
}
var results = primary.concat(secondary).concat(tertiary);
if(sortField) {
results.sort(function(a, b) {
return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);
});
}
return results;
}
else if (config.options.chkSearchText==true && config.options.chkSearchTag==true && config.options.chkSearchTitle==false){
for(var t = 0; t < candidates.length; t++) {
if(candidates[t].text.search(searchRegExp) != -1) {
primary.push(candidates[t]);
} else if(candidates[t].tags.join(" ").search(searchRegExp) != -1) {
secondary.push(candidates[t]);
}
}
var results = primary.concat(secondary);
if(sortField) {
results.sort(function(a, b) {
return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);
});
}
return results;
}
else if (config.options.chkSearchText==true && config.options.chkSearchTag==false && config.options.chkSearchTitle==true){
for(var t = 0; t < candidates.length; t++) {
if(candidates[t].title.search(searchRegExp) != -1) {
primary.push(candidates[t]);
} else if(candidates[t].text.search(searchRegExp) != -1) {
secondary.push(candidates[t]);
}
}
var results = primary.concat(secondary);
if(sortField) {
results.sort(function(a, b) {
return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);
});
}
return results;
}
else if (config.options.chkSearchText==false && config.options.chkSearchTag==true && config.options.chkSearchTitle==true){
for(var t = 0; t < candidates.length; t++) {
if(candidates[t].title.search(searchRegExp) != -1) {
primary.push(candidates[t]);
} else if(candidates[t].tags.join(" ").search(searchRegExp) != -1) {
secondary.push(candidates[t]);
}
}
var results = primary.concat(secondary);
if(sortField) {
results.sort(function(a, b) {
return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);
});
}
return results;
}
else if (config.options.chkSearchText==false && config.options.chkSearchTag==false && config.options.chkSearchTitle==true){
for(var t = 0; t < candidates.length; t++) {
if(candidates[t].title.search(searchRegExp) != -1) {
primary.push(candidates[t]);
}
}
var results = primary;
if(sortField) {
results.sort(function(a, b) {
return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);
});
}
return results;
}
else if (config.options.chkSearchText==false && config.options.chkSearchTag==true && config.options.chkSearchTitle==false){
for(var t = 0; t < candidates.length; t++) {
if(candidates[t].tags.join(" ").search(searchRegExp) != -1) {
primary.push(candidates[t]);
}
}
var results = primary;
if(sortField) {
results.sort(function(a, b) {
return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);
});
}
return results;
}
else if (config.options.chkSearchText==true && config.options.chkSearchTag==false && config.options.chkSearchTitle==false){
for(var t = 0; t < candidates.length; t++) {
if(candidates[t].text.search(searchRegExp) != -1) {
primary.push(candidates[t]);
}
}
var results = primary;
if(sortField) {
results.sort(function(a, b) {
return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);
});
}
return results;
}
else {
alert("At least one search option must be selected!");
}
};
} //# end of "install only once"
//}}}
Formating your text is easy using TiddlyWiki's markup language.
| '''Bold''' | {{{''Bold''}}} |
| //Italics// | {{{'''//'''Italics'''//'''}}} |
| ''//Bold Italics//'' | {{{''//Bold Italics//''}}} |
| __Underline__ | {{{__Underline__}}} |
| --Strikethrough-- | {{{--Strikethrough--}}} |
| Super^^script^^ | {{{Super^^script^^}}} |
| Sub~~script~~ | {{{Sub~~script~~}}} |
| @@Highlight@@ | @@Highlight@@ |
| {{{PlainText No ''Formatting''}}} | {{{ {{{PlainText No ''Formatting''}}} }}} |
To hide text within a tiddler so that it is not displayed you can wrap it in {{{/%}}} and {{{%/}}}. It can be a useful trick for hiding drafts or annotating complex markup. Edit this tiddler to see an example.
/%This text is not displayed
until you try to edit %/
/***
Description: Contains the stuff you need to use Tiddlyspot
Note, you also need UploadPlugin, PasswordOptionPlugin and LoadRemoteFileThroughProxy
from http://tiddlywiki.bidix.info for a complete working Tiddlyspot site.
***/
//{{{
// edit this if you are migrating sites or retrofitting an existing TW
config.tiddlyspotSiteId = 'tao-te-ching';
// make it so you can by default see edit controls via http
config.options.chkHttpReadOnly = false;
window.readOnly = false; // make sure of it (for tw 2.2)
window.showBackstage = true; // show backstage too
// disable autosave in d3
if (window.location.protocol != "file:")
config.options.chkGTDLazyAutoSave = false;
// tweak shadow tiddlers to add upload button, password entry box etc
with (config.shadowTiddlers) {
SiteUrl = 'http://'+config.tiddlyspotSiteId+'.tiddlyspot.com';
SideBarOptions = SideBarOptions.replace(/(<<saveChanges>>)/,"$1<<tiddler TspotSidebar>>");
OptionsPanel = OptionsPanel.replace(/^/,"<<tiddler TspotOptions>>");
DefaultTiddlers = DefaultTiddlers.replace(/^/,"[[WelcomeToTiddlyspot]] ");
MainMenu = MainMenu.replace(/^/,"[[WelcomeToTiddlyspot]] ");
}
// create some shadow tiddler content
merge(config.shadowTiddlers,{
'WelcomeToTiddlyspot':[
"This document is a ~TiddlyWiki from tiddlyspot.com. A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //What now?// @@ Before you can save any changes, you need to enter your password in the form below. Then configure privacy and other site settings at your [[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]] (your control panel username is //" + config.tiddlyspotSiteId + "//).",
"<<tiddler TspotControls>>",
"See also GettingStarted.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working online// @@ You can edit this ~TiddlyWiki right now, and save your changes using the \"save to web\" button in the column on the right.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// @@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick. You can make changes and save them locally without being connected to the Internet. When you're ready to sync up again, just click \"upload\" and your ~TiddlyWiki will be saved back to tiddlyspot.com.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Help!// @@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]]. Also visit [[TiddlyWiki.org|http://tiddlywiki.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help. If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// @@ We hope you like using your tiddlyspot.com site. Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions."
].join("\n"),
'TspotControls':[
"| tiddlyspot password:|<<option pasUploadPassword>>|",
"| site management:|<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">>//(requires tiddlyspot password)//<br>[[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]], [[download (go offline)|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download]]|",
"| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[blog|http://tiddlyspot.blogspot.com/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"
].join("\n"),
'TspotSidebar':[
"<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">><html><a href='http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download' class='button'>download</a></html>"
].join("\n"),
'TspotOptions':[
"tiddlyspot password:",
"<<option pasUploadPassword>>",
""
].join("\n")
});
//}}}
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 27/07/2009 06:53:26 | CharlesNodell | [[/|http://tao-te-ching.tiddlyspot.com/]] | [[store.cgi|http://tao-te-ching.tiddlyspot.com/store.cgi]] | . | [[index.html | http://tao-te-ching.tiddlyspot.com/index.html]] | . | ok |
| 27/07/2009 13:23:20 | CharlesNodell | [[/|http://tao-te-ching.tiddlyspot.com/]] | [[store.cgi|http://tao-te-ching.tiddlyspot.com/store.cgi]] | . | [[index.html | http://tao-te-ching.tiddlyspot.com/index.html]] | . |
| 28/07/2009 07:04:39 | YourName | [[tao-te-ching%20(2).html|file:///C:/Users/usd21872/Documents/Downloads/tao-te-ching%20(2).html]] | [[store.cgi|http://tao-te-ching.tiddlyspot.com/store.cgi]] | . | [[index.html | http://tao-te-ching.tiddlyspot.com/index.html]] | . |
| 28/07/2009 08:07:11 | YourName | [[/|http://tao-te-ching.tiddlyspot.com/]] | [[store.cgi|http://tao-te-ching.tiddlyspot.com/store.cgi]] | . | [[index.html | http://tao-te-ching.tiddlyspot.com/index.html]] | . |
| 28/07/2009 08:13:27 | YourName | [[/|http://tao-te-ching.tiddlyspot.com/]] | [[store.cgi|http://tao-te-ching.tiddlyspot.com/store.cgi]] | . | [[index.html | http://tao-te-ching.tiddlyspot.com/index.html]] | . |
| 28/07/2009 08:19:05 | YourName | [[/|http://tao-te-ching.tiddlyspot.com/]] | [[store.cgi|http://tao-te-ching.tiddlyspot.com/store.cgi]] | . | [[index.html | http://tao-te-ching.tiddlyspot.com/index.html]] | . |
| 28/07/2009 08:20:34 | YourName | [[/|http://tao-te-ching.tiddlyspot.com/]] | [[store.cgi|http://tao-te-ching.tiddlyspot.com/store.cgi]] | . | [[index.html | http://tao-te-ching.tiddlyspot.com/index.html]] | . |
| 28/07/2009 08:23:31 | YourName | [[/|http://tao-te-ching.tiddlyspot.com/]] | [[store.cgi|http://tao-te-ching.tiddlyspot.com/store.cgi]] | . | [[index.html | http://tao-te-ching.tiddlyspot.com/index.html]] | . |
| 28/07/2009 08:31:00 | YourName | [[/|http://tao-te-ching.tiddlyspot.com/]] | [[store.cgi|http://tao-te-ching.tiddlyspot.com/store.cgi]] | . | [[index.html | http://tao-te-ching.tiddlyspot.com/index.html]] | . |
| 28/07/2009 08:39:25 | YourName | [[/|http://tao-te-ching.tiddlyspot.com/]] | [[store.cgi|http://tao-te-ching.tiddlyspot.com/store.cgi]] | . | [[index.html | http://tao-te-ching.tiddlyspot.com/index.html]] | . |
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.3|
|''Date:''|Feb 24, 2008|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
major: 4, minor: 1, revision: 3,
date: new Date("Feb 24, 2008"),
source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
coreVersion: '2.2.0'
};
//
// Environment
//
if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false; // true to activate both in Plugin and UploadService
//
// Upload Macro
//
config.macros.upload = {
// default values
defaultBackupDir: '', //no backup
defaultStoreScript: "store.php",
defaultToFilename: "index.html",
defaultUploadDir: ".",
authenticateUser: true // UploadService Authenticate User
};
config.macros.upload.label = {
promptOption: "Save and Upload this TiddlyWiki with UploadOptions",
promptParamMacro: "Save and Upload this TiddlyWiki in %0",
saveLabel: "save to web",
saveToDisk: "save to disk",
uploadLabel: "upload"
};
config.macros.upload.messages = {
noStoreUrl: "No store URL in parmeters or options",
usernameOrPasswordMissing: "Username or password missing"
};
config.macros.upload.handler = function(place,macroName,params) {
if (readOnly)
return;
var label;
if (document.location.toString().substr(0,4) == "http")
label = this.label.saveLabel;
else
label = this.label.uploadLabel;
var prompt;
if (params[0]) {
prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0],
(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
} else {
prompt = this.label.promptOption;
}
createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};
config.macros.upload.action = function(params)
{
// for missing macro parameter set value from options
if (!params) params = {};
var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
var username = params[4] ? params[4] : config.options.txtUploadUserName;
var password = config.options.pasUploadPassword; // for security reason no password as macro parameter
// for still missing parameter set default value
if ((!storeUrl) && (document.location.toString().substr(0,4) == "http"))
storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
if (storeUrl.substr(0,4) != "http")
storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
if (!toFilename)
toFilename = bidix.basename(window.location.toString());
if (!toFilename)
toFilename = config.macros.upload.defaultToFilename;
if (!uploadDir)
uploadDir = config.macros.upload.defaultUploadDir;
if (!backupDir)
backupDir = config.macros.upload.defaultBackupDir;
// report error if still missing
if (!storeUrl) {
alert(config.macros.upload.messages.noStoreUrl);
clearMessage();
return false;
}
if (config.macros.upload.authenticateUser && (!username || !password)) {
alert(config.macros.upload.messages.usernameOrPasswordMissing);
clearMessage();
return false;
}
bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password);
return false;
};
config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir)
{
if (!storeUrl)
return null;
var dest = bidix.dirname(storeUrl);
if (uploadDir && uploadDir != '.')
dest = dest + '/' + uploadDir;
dest = dest + '/' + toFilename;
return dest;
};
//
// uploadOptions Macro
//
config.macros.uploadOptions = {
handler: function(place,macroName,params) {
var wizard = new Wizard();
wizard.createWizard(place,this.wizardTitle);
wizard.addStep(this.step1Title,this.step1Html);
var markList = wizard.getElement("markList");
var listWrapper = document.createElement("div");
markList.parentNode.insertBefore(listWrapper,markList);
wizard.setValue("listWrapper",listWrapper);
this.refreshOptions(listWrapper,false);
var uploadCaption;
if (document.location.toString().substr(0,4) == "http")
uploadCaption = config.macros.upload.label.saveLabel;
else
uploadCaption = config.macros.upload.label.uploadLabel;
wizard.setButtons([
{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption,
onClick: config.macros.upload.action},
{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
]);
},
options: [
"txtUploadUserName",
"pasUploadPassword",
"txtUploadStoreUrl",
"txtUploadDir",
"txtUploadFilename",
"txtUploadBackupDir",
"chkUploadLog",
"txtUploadLogMaxLine"
],
refreshOptions: function(listWrapper) {
var opts = [];
for(i=0; i<this.options.length; i++) {
var opt = {};
opts.push();
opt.option = "";
n = this.options[i];
opt.name = n;
opt.lowlight = !config.optionsDesc[n];
opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
opts.push(opt);
}
var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
for(n=0; n<opts.length; n++) {
var type = opts[n].name.substr(0,3);
var h = config.macros.option.types[type];
if (h && h.create) {
h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
}
}
},
onCancel: function(e)
{
backstage.switchTab(null);
return false;
},
wizardTitle: "Upload with options",
step1Title: "These options are saved in cookies in your browser",
step1Html: "<input type='hidden' name='markList'></input><br>",
cancelButton: "Cancel",
cancelButtonPrompt: "Cancel prompt",
listViewTemplate: {
columns: [
{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
{name: 'Option', field: 'option', title: "Option", type: 'String'},
{name: 'Name', field: 'name', title: "Name", type: 'String'}
],
rowClasses: [
{className: 'lowlight', field: 'lowlight'}
]}
};
//
// upload functions
//
if (!bidix.upload) bidix.upload = {};
if (!bidix.upload.messages) bidix.upload.messages = {
//from saving
invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
backupSaved: "Backup saved",
backupFailed: "Failed to upload backup file",
rssSaved: "RSS feed uploaded",
rssFailed: "Failed to upload RSS feed file",
emptySaved: "Empty template uploaded",
emptyFailed: "Failed to upload empty template file",
mainSaved: "Main TiddlyWiki file uploaded",
mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
//specific upload
loadOriginalHttpPostError: "Can't get original file",
aboutToSaveOnHttpPost: 'About to upload on %0 ...',
storePhpNotFound: "The store script '%0' was not found."
};
bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
var callback = function(status,uploadParams,original,url,xhr) {
if (!status) {
displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
return;
}
if (bidix.debugMode)
alert(original.substr(0,500)+"\n...");
// Locate the storeArea div's
var posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
bidix.upload.uploadRss(uploadParams,original,posDiv);
};
if(onlyIfDirty && !store.isDirty())
return;
clearMessage();
// save on localdisk ?
if (document.location.toString().substr(0,4) == "file") {
var path = document.location.toString();
var localPath = getLocalPath(path);
saveChanges();
}
// get original
var uploadParams = new Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
var originalPath = document.location.toString();
// If url is a directory : add index.html
if (originalPath.charAt(originalPath.length-1) == "/")
originalPath = originalPath + "index.html";
var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
var log = new bidix.UploadLog();
log.startUpload(storeUrl, dest, uploadDir, backupDir);
displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
if (bidix.debugMode)
alert("about to execute Http - GET on "+originalPath);
var r = doHttp("GET",originalPath,null,null,username,password,callback,uploadParams,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
bidix.upload.uploadRss = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
if(status) {
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
bidix.upload.uploadMain(params[0],params[1],params[2]);
} else {
displayMessage(bidix.upload.messages.rssFailed);
}
};
// do uploadRss
if(config.options.chkGenerateAnRssFeed) {
var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
var rssUploadParams = new Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
var rssString = generateRss();
// no UnicodeToUTF8 conversion needed when location is "file" !!!
if (document.location.toString().substr(0,4) != "file")
rssString = convertUnicodeToUTF8(rssString);
bidix.upload.httpUpload(rssUploadParams,rssString,callback,Array(uploadParams,original,posDiv));
} else {
bidix.upload.uploadMain(uploadParams,original,posDiv);
}
};
bidix.upload.uploadMain = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
var log = new bidix.UploadLog();
if(status) {
// if backupDir specified
if ((params[3]) && (responseText.indexOf("backupfile:") > -1)) {
var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
}
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
store.setDirty(false);
log.endUpload("ok");
} else {
alert(bidix.upload.messages.mainFailed);
displayMessage(bidix.upload.messages.mainFailed);
log.endUpload("failed");
}
};
// do uploadMain
var revised = bidix.upload.updateOriginal(original,posDiv);
bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};
bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
var localCallback = function(status,params,responseText,url,xhr) {
url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
if (xhr.status == 404)
alert(bidix.upload.messages.storePhpNotFound.format([url]));
if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
alert(responseText);
if (responseText.indexOf("Debug mode") >= 0 )
responseText = responseText.substring(responseText.indexOf("\n\n")+2);
} else if (responseText.charAt(0) != '0')
alert(responseText);
if (responseText.charAt(0) != '0')
status = null;
callback(status,params,responseText,url,xhr);
};
// do httpUpload
var boundary = "---------------------------"+"AaB03x";
var uploadFormName = "UploadPlugin";
// compose headers data
var sheader = "";
sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
sheader += uploadFormName +"\"\r\n\r\n";
sheader += "backupDir="+uploadParams[3] +
";user=" + uploadParams[4] +
";password=" + uploadParams[5] +
";uploaddir=" + uploadParams[2];
if (bidix.debugMode)
sheader += ";debug=1";
sheader += ";;\r\n";
sheader += "\r\n" + "--" + boundary + "\r\n";
sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
sheader += "Content-Length: " + data.length + "\r\n\r\n";
// compose trailer data
var strailer = new String();
strailer = "\r\n--" + boundary + "--\r\n";
data = sheader + data + strailer;
if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; ;charset=UTF-8; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
if (!posDiv)
posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
store.allTiddlersAsHtml() + "\n" +
original.substr(posDiv[1]);
var newSiteTitle = getPageTitle().htmlEncode();
revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
return revised;
};
//
// UploadLog
//
// config.options.chkUploadLog :
// false : no logging
// true : logging
// config.options.txtUploadLogMaxLine :
// -1 : no limit
// 0 : no Log lines but UploadLog is still in place
// n : the last n lines are only kept
// NaN : no limit (-1)
bidix.UploadLog = function() {
if (!config.options.chkUploadLog)
return; // this.tiddler = null
this.tiddler = store.getTiddler("UploadLog");
if (!this.tiddler) {
this.tiddler = new Tiddler();
this.tiddler.title = "UploadLog";
this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
this.tiddler.created = new Date();
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
}
return this;
};
bidix.UploadLog.prototype.addText = function(text) {
if (!this.tiddler)
return;
// retrieve maxLine when we need it
var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
if (isNaN(maxLine))
maxLine = -1;
// add text
if (maxLine != 0)
this.tiddler.text = this.tiddler.text + text;
// Trunck to maxLine
if (maxLine >= 0) {
var textArray = this.tiddler.text.split('\n');
if (textArray.length > maxLine + 1)
textArray.splice(1,textArray.length-1-maxLine);
this.tiddler.text = textArray.join('\n');
}
// update tiddler fields
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
// refresh and notifiy for immediate update
story.refreshTiddler(this.tiddler.title);
store.notify(this.tiddler.title, true);
};
bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {
if (!this.tiddler)
return;
var now = new Date();
var text = "\n| ";
var filename = bidix.basename(document.location.toString());
if (!filename) filename = '/';
text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
text += config.options.txtUserName + " | ";
text += "[["+filename+"|"+location + "]] |";
text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
text += uploadDir + " | ";
text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
text += backupDir + " |";
this.addText(text);
};
bidix.UploadLog.prototype.endUpload = function(status) {
if (!this.tiddler)
return;
this.addText(" "+status+" |");
};
//
// Utilities
//
bidix.checkPlugin = function(plugin, major, minor, revision) {
var ext = version.extensions[plugin];
if (!
(ext &&
((ext.major > major) ||
((ext.major == major) && (ext.minor > minor)) ||
((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
// write error in PluginManager
if (pluginInfo)
pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
}
};
bidix.dirname = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(0, lastpos);
} else {
return filePath.substring(0, filePath.lastIndexOf("\\"));
}
};
bidix.basename = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("#")) != -1)
filePath = filePath.substring(0, lastpos);
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(lastpos + 1);
} else
return filePath.substring(filePath.lastIndexOf("\\")+1);
};
bidix.initOption = function(name,value) {
if (!config.options[name])
config.options[name] = value;
};
//
// Initializations
//
// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);
// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");
//optionsDesc
merge(config.optionsDesc,{
txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
txtUploadUserName: "Upload Username",
pasUploadPassword: "Upload Password",
chkUploadLog: "do Logging in UploadLog (default: true)",
txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});
// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');
// Backstage
merge(config.tasks,{
uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");
//}}}
Welcome to the TaoTeChing!
Sometimes it's handy to be able to write WikiWords without them being recognised as links (for people's names, for instance). You can do this by preceding the WikiWord with a tilde ({{{~}}}). For example, ~JamesBond, ~JavaScript and ~TiddlyWiki