first impressions of TiddlyWeb - and some questions about POSTing forms, and streaming & uploading (hosted) audio

15 views
Skip to first unread message

Scott Alexander

unread,
Nov 13, 2011, 1:58:23 PM11/13/11
to TiddlyWeb
Hi -

Last night I installed TiddlyWiki on my laptop,
and then I installed TiddlyWeb on my server, and then TiddlySpace.

I just wanted to share my first impressions, which are very positive
-
and towards the end, ask some specific questions for my particular
case
(I want to do some streaming audio and video, and let people upload
answers on forms).

+++

I find TiddlyWiki / TiddlyWeb / TiddlySpace to be very well-designed
for several reasons:

(a) It Just Works

- very important in these days of bloated software which often has
broken dependencies


(b) It's tiny and fast (at least after the initial page load -
is there any way to optimize this, eg with nginx or gzip?)

- "Speed is a feature" they say these days.

- Where's the code ??
There's almost nothing in the ~/home/tiddlyspace/tiddlyspace_instance
directory!

- Is all the logic really still in the JavaScript in the single file
sent to the browser?
(If so, are there any guides to understanding this JavaScript better?)

Question:
Is all the "data" in MySQL now, for TiddlySpace?
Or is stuff still stored in the filesystem like it is in TiddlyWeb?


(c) It's reflective

- (Or maybe it's just minimal and transparent and consistent and self-
contained - I'm not sure :-)


What I mean by "reflective" is this:
At the operational level everything's just a Tiddler
(or a Bag of Tiddlers, or a Recipe which generates a Bag of Tiddlers)

This seems similar to LISP programs where everything is a list -
including LISP programs themselves.

And TIddlyWeb seems similar in other ways to Squeak,
which is a desktop GUI environment for using (and programming)
Smalltalk,
where all the features of the language are exposed via the GUI...

So the "language features" are exposed to the *user*, not just to the
programmer.
This has the nice side-effect of blurring the distinction between user
and programmer.

I have so many friends who are really smart and have a desire to make
their own website,
but they have no idea how to proceed. Just the prospect of installing
PHP,
with all its mysterious (and often broken/missing) dependencies, is so
off-putting.

(Once I had to wipe my entire server because of a PHP install
which had led to some kind of weird cyclic conflict among all the apt-
get dependencies.)

So it is really great the way TiddlyWeb gives non-programmers a way
to edit their own webpage.

+++

In many realms, there are two very distinct types of things:
- a "tool", and
- a "thing you can make (or act on) with the tool".

And these two types of things are of fundamentally DIFFERENT natures.

A washing-machine is very different from the clothes you put in it.
You can wash clothes by putting them into a washing-machine,
but you CANNOT wash washing-machines by putting them into a washing-
machine!

But then there are realms, like TiddlyWeb and LISP and Squeak, where
"the tool"
(what one might call the programming "language" or the "(integrated)
development environment / IDE")
and "the thing you make with it"
are fundamentally of the SAME nature.

In TiddlyWeb, what you're making is a webpage (supported "backstage"
by a webserver) ~
which people can visit and edit.

And the tool you use to create this is not some (separate) language or
IDE:

THE "TOOL" YOU USE TO CREATE THE WEBPAGE
WHICH PEOPLE CAN VISIT AND EDIT
IS THE WEBPAGE ITSELF
WHICH YOU CAN VISIT AND EDIT!

So it's in that sense that TiddlyWeb seems to be "reflective".

Reflective languages (eg, Refal, Maude) are very expressive and
powerful.

I would be curious to hear any other ideas about reflection
and how it has been implemented in TIddlyWiki and TiddlyWeb -
and what's the best way to leverage it to Get Things Done.

+++

Question: is there a way of regarding a Bag or a Recipe
as also being a Tiddler?

I suspect there might be, because a lot of TiddlyWeb's underlying
functionality
does seem to be exposed via the standard web interface -
in the form of Tiddlers, which seem to be the fundamental "entity" in
TiddlyWeb,
along with Bags and Recipes.

If Bag or a Recipe could also be treated as a Tiddler
then this would really unify things a lot - then everything would be a
Tiddler.

+++

Another strength of TIddlyWeb and TIddlySpace is the way they handle
Users.
From what I see, there are really only two main types of entities:
Users and Tiddlers.

I also noticed that tags are also considered to be Tiddlers - a
further unification.

This is in line with some of the theoretical and practical work being
done by Google and Yahoo
for things such as "recommender systems" applied to spaces such as
Orkut.

What they found was, instead of modeling three types of entity
(users, items, and communities/tags),
it was more useful to model just two
(users, and communities/tags - where communities/tags = items).

I can't remember the details but I have the PDFs somewhere around
here.
The take-away was: these sorts of "social" models are more expressive
when there are only two types of entities:
(1) users and (2) communities=tags=items -
not three: (1) users (2) items (3) tags=communities.

This was a very interesting theoretical result derived from practical
studies
involving massive datasets from Orkut,
so it is interesting if TiddlyWeb has gone in a similar direction.

+++

Question: How do Bags and Recipes relate to popular notions
about "routing" and "MVC" and "REST" in the web programming world?

At the semantic level there seems to be this isomorphism or
equivalence
between a Tiddler on the webpage and a File in the filesystem.

Plus maybe another semantic isomorphism or equivalence
between a File in the filesystem and a Record in a (relational, or
NoSQL) recordset.
(In the case of TiddlyWiki and TiddlyWeb, the relational database was
conveniently omitted
- and only the filesystem half of the equation remains.)

Intuitively, it would make sense to go further with these semantic
notions
and perhaps establish an isomorphism between Tiddlers
and the objects being modeled in the problem domain.

I understand that a Tiddler normally is just a header and a body, or a
key and a value -
but within that value there could be a certain structure.

So we have the typical type of Tiddler which models a bit of content
on a webpage -
consisting of a text title and a text body.

Question: Is it common practice to define other, customized types of
Tiddlers
corresponding to other types of objects in the problem domain,
where each type of Tiddler could have a particular "signature" ie set
of field(-type)s?

If so, are there special facilities for mapping the various types of
Tiddlers
to various types of HTTP content or MIME types?

+++

In my particular case, I would like to create an online wiki for
teaching languages,
and I would like to include some audio and video content (not just
text content).

Question: Are there some standard or preferred methods for handling
audio or video using Tiddlers?

(I would be hosting and streaming some of the audio and video myself -
not just linking to YouTube.)

+++

It seems TiddlyWeb makes some optimal choices about the best way to
leverage
the strengths of the available constituents of the web:
browsers, servers, filesystems - and HTML and JavaScript and CSS.

I understand that:

- TiddlyWiki runs as a single HTML file in the browser
(with all programming logic encoded as JavaScript embedded directly in
this file)

JavaScript is a very interesting language
and I would be welcome any help in getting a better understanding of
this JavaScript
sprinkled throughout the single page of this app.

What I mean is, in its final form here,
the JavaScript can be rather low-level and hard to figure out what it
does.
If there were a high-level specification somewhere of the various bits
of JavaScript embedded in the page,
this could be very interesting to study.

- TiddlyWeb uses Python and CherryPy to implement a server -
but apparently this is only used to handle, in very standardized
fashion
(and why not? it's all just GETs and POSTs and PUTs and DELETEs with
URLs and query-strings)
the HTTP requests and responses between the browser, the server, and
the server-side filesystem,
which (in the case of TiddlyWeb at least - I'm not sure about
TiddlySpace)
establishes a directory for each Tiddler and then stores various
successive versions of the Tiddler
using successive sequential numbers for the (unique-within-a-
directory) filenames.

- TiddlySpace also uses MySQL

Question: What is the MySQL being used for in TiddlySpace?

Merely to handle the multi-user aspects?

Or has TiddlyWeb's storage in the filesystem been replaced in
TiddlySpace
by storage in a relational database?

+++

Finally, I have some specific questions pertaining to my particular
use-case -
where I want to create site for learning languages online.

Regarding multiple users in TiddlySpace...
I have just installed TiddlySpace on my server, so I guess I'm hosting
a TiddlySpace now :-)

My goal here is to make a site which could help students learn
English.

Now I see an opportunity because of the way TiddlySpace handles
multiple users.

I could let each student have their own webpage, eg:

maria-julia.example.com
pedro-lucas.example.com

This could be helpful to let each student take notes on their own
wiki.
And I guess over time their wiki could become more and more
personalized,
reflecting which "learning modules" they had selected and studied
(they don't have to do them all!)
and reflecting their answers on quizzes and tests
(which could be text, multiple-choice, audio or video answers).

So in this case, a lot of Tiddlers would involve not only text,
but also an audio clip or video clip,
since multi-media is important for language learning.

Question: What is the best way for including media (audio, video) in a
Tiddler?

There are some existing open-source JavaScript + Flash tools for
streaming media
(eg, SoundManager2, and JWPlayer)
which I have added to plain HTML pages (which I manually created) -
but not using TiddlyWiki / TiddlyWeb yet.

Some media might be hosted at YouTube and linked from there -
but some media would be hosted and streamed from my server.

Question: What is the best way (using Tiddlers, Bags, Recipes)
to stream audio and video from my server to the web page?


I don't want to confront the student with a traditional, fixed series
of "lessons"
where each lesson contains a fixed series of items
(some audio, some video, some text, and some questions).

Instead, I would like to experiment with a more fluid approach.

Maybe the user picks a tag
(say a topic like, "hospital" or "hotel" or "breakfast" or
"nightlife",
or a grammatical structure like "-ing verbs" or "negation" or
"interrogatives",
or a Recipe implementing a filter finding
"vocabulary items I haven't mastered yet", "items I got wrong on last
quiz")
and gets a Bag of Tiddlers relating to that tag,
where ideally a Tiddler could be composed of a bunch of sub-items
(eg, some text, some audio, and a form for submitting answers).

So I would be curious to know if people think
TiddlyWeb would be good for this sort of thing.

For quizzes, I assume there is some way of including a Form in a
Tiddler,
and so the user (a student) could answer questions,
and then click OK to send this to the server.

I would like to save each student's answers to quizzes within their
own wiki.

Question: Are there existing modules for TiddlyWeb
which make it easy to create and use Forms?

Question: Assuming each student has their own TiddlyWiki
with their own name as the subdomain (eg maria.example.com).

Then what would be the best way to store the student's answers for a
quiz,
which they submitted by POSTing a form?

+++

I guess the next thing for me to try to learn is
what Recipes and Bags are all about.

My intuition is that TIddlyWeb provides an elegant implementation
of the task performed by many "web application frameworks"
(and their names are legion):

eg http://en.wikipedia.org/wiki/Comparison_of_Web_application_frameworks

...handling HTTP GETs by selecting / filtering (using Recipes)
and then formatting / presenting
(using what? how are traditional notions
of templates and layouts implemented in TiddlyWiki & TiddlyWeb?)
sets (Bags) of content-items (Tiddlers)
from a server to a browser
(and also handling HTTP POSTs and PUTs and DELETEs from the browser to
the server).

Most web frameworks generate HTML using specialized sublanguages
for templating and laying out pages.

I understand that this is being done in TiddlyWeb
using Recipes applied to Bags of Tiddlers.

So I am eager to learn more about the approaches used in TiddlyWeb
for:

(1) routing

(2) page templating and layout

(3) customized content (eg, streaming audio and video)

(4) submitting forms

I am also curious about authentication and authorization,
and would appreciate any pointers in that direction.

I suppose maybe it is possible to simply
absorb a lot of this hands-on and intuitively,
while manipulating the webpage itself.

I already did manage to figure out that
I shouldn't've changed the "title" part of SiteTitle
- just the "body text" part -
which led to the discovery that the "title" part of a Tiddler is the
variable name,
and the "body text" part is the value -
which led to a lot of further understandings and intuitions about how
TiddlyWeb works.

+++

Well sorry for rambling on, I just really do like TiddlyWeb.

And it is nice to have open-ended questions about potential ways of
using a system -
rather than frustrated questions about how to install it :-)

Thanks for any ideas -
and thanks to the people who have developed TiddlyWiki, TiddlyWeb and
TiddlySpace!

- Scott


chris...@gmail.com

unread,
Nov 13, 2011, 6:01:17 PM11/13/11
to TiddlyWeb
On Sun, 13 Nov 2011, Scott Alexander wrote:

> Hi -

So at some point I suspect somebody else will join in the fray here,
but I'm around, and you keep asking interesting questions, so here
come some comments. This message is huge so I'll probably skip some
parts...

> I find TiddlyWiki / TiddlyWeb / TiddlySpace to be very well-designed
> for several reasons:

There's a timetable on these things and different people:

* TiddlyWiki: Jeremy Ruston, 2004
* TiddlyWeb: Me, starting in 2007, based on a design worked out with
me, Jeremy, Martin Budden, quickly followed by lots of input from
FND. At the end of this message I posted some of the logic behind
TiddlyWeb (at the paragraph beginning "Which leaves me to talk a bit
about TiddlyWeb"):
http://groups.google.com/group/tiddlywiki/msg/e0291462d115f729
* TiddlySpace: Osmosoft, starting in 2010
http://osmosoft.com/

At each stage there's been a different set of goals, and different set
of technical challenges and environments. By which I mean the forces
impacting the design have been different.

For example, in 2007 when I started TiddlyWeb I was pretty excited after
successfully establishing the REST API for Socialtext, in Perl, so
I was keen on being uptight about HTTP and about code structure.
Later, with TiddlySpace we've taken a more pragmatic and sometimes
hurried approach to things. In either case the techniques used needed
to fit in with at least some of the precedents set by TiddlyWiki.

Just in the past few months we've been more actively exploring ways of
being outside some of those TiddlyWiki precedents (more on that
below).

The constant, though, is the idea of the tiddler.

> (a) It Just Works
>
> - very important in these days of bloated software which often has
> broken dependencies

I'm glad you still think this, despite your ordeal last night.

> (b) It's tiny and fast (at least after the initial page load -
> is there any way to optimize this, eg with nginx or gzip?)

Each of the things you GET from a tiddlyweb can be had in a variety of
formats using content negotiation. If you've got TiddlyWebWiki
installed the available formats are html, plain text, json, as a
TiddlyWiki, and Atom.

Most of these are receptive to being gzipped. tiddlyspace.com uses
mod_deflate on outgoing content.

> - "Speed is a feature" they say these days.

This is a big deal once you start having a large tiddlywiki with lots
of tiddlers in it. There have been lots of discussions about options
for "lazy" or "dynamic" loading of tiddlers in TiddlyWiki.

> - Where's the code ??
> There's almost nothing in the ~/home/tiddlyspace/tiddlyspace_instance
> directory!

There's the two sides of the code, the stuff doing the server stuff:

* http handlers
* storage handling
* authentication and authorization handling
* recipe processing

and whatever is on the client side. If you get the tiddlywiki
representation of some tiddlers then it is the TiddlyWiki HTML file
with its embedded Javascript, but there are lots of other options. My
space, http://cdent.tiddlyspace.com/ is the HTML representation of a
single tiddler, with some loaded javascript to enhance the
presentation. No TiddlyWiki.

The bulk of the server-side code is located wherever your system
installs extra Python libraries, something like
/usr/lib/python2.5/site-packages

> - Is all the logic really still in the JavaScript in the single file
> sent to the browser?
> (If so, are there any guides to understanding this JavaScript better?)

When TiddlyWiki is being used with TiddlyWeb, then the Javascript in
the tiddlywiki does the PUT and GET handling when you do edits, but
that stuff is not in a TiddlyWiki by default, it is added as a
(client-side) plugin. The tiddlywebwiki client code is here:

https://github.com/tiddlyweb/tiddlywebwikiclient

and is added to the tiddlywebwiki python package when it is built.

> Question:
> Is all the "data" in MySQL now, for TiddlySpace?
> Or is stuff still stored in the filesystem like it is in TiddlyWeb?

In MySQL, by default.

TiddlyWeb has an architectural bit called the StorageInterface. When
an entity is persisted or required from the persistence layer, a
generic method is called. Configuration determines which
implementation of the StorageInterface is then called to do the
handling. The default "store" in TiddlyWeb is called "text". In
TiddlySpace the default store is called "tiddlywebplugins.mysql2". On
tiddlyspace.com the store is tiddlywebplugins.caching which wrap any
StorageInterface with memcached. It wraps the mysql2 store. There are
lots of storage implementations out there, including ones that make it
possible to use different stores for different bags, or store the same
stuff in multiple stores.

> This seems similar to LISP programs where everything is a list -
> including LISP programs themselves.

This comment (and similar on smalltalk) has been said about TiddlyWiki
quite often. Someone once called it a quine.

> I would be curious to hear any other ideas about reflection
> and how it has been implemented in TIddlyWiki and TiddlyWeb -
> and what's the best way to leverage it to Get Things Done.

This is one of the topics that comes up quite regularly on the
tiddlywiki list (referenced above).

> Question: is there a way of regarding a Bag or a Recipe
> as also being a Tiddler?

Not as things are currently implemented. We talked about doing this
sort of thing while talking the design but it was decided that at some
point the possible abstractions had to be nailed down and the
different meanings of the three entities was important to reify in a
concrete fashion.

This is not to say that you couldn't represent either a recipe or bag
as a tiddler, on the client side, and then adapt it appropriately.

> I suspect there might be, because a lot of TiddlyWeb's underlying
> functionality
> does seem to be exposed via the standard web interface -
> in the form of Tiddlers, which seem to be the fundamental "entity" in
> TiddlyWeb,
> along with Bags and Recipes.

The things you can GET from a default instance are:

* a single tiddler, bag or recipe
* a collection of tiddlers, bags or recipes, optionally filtered

tiddler collections come from:

* a processed recipe
* the contents of a bag
* a search result set
* the revisions of single tiddler

The last two are optional. A store may choose not to implement search
or revisions.

> Question: How do Bags and Recipes relate to popular notions
> about "routing" and "MVC" and "REST" in the web programming world?

I'm not sure I understand this question. You might look at this and
then restate what you're asking:

http://tiddlyweb.peermore.com/wiki/#%5B%5BHTTP%20API%5D%5D

> At the semantic level there seems to be this isomorphism or
> equivalence
> between a Tiddler on the webpage and a File in the filesystem.

Yes, this is something that came up on the list recently:

http://groups.google.com/group/tiddlyweb/browse_frm/thread/1c224b4f5c4a4c93/ff5d3f49ff4c322e

> I understand that a Tiddler normally is just a header and a body, or a
> key and a value -
> but within that value there could be a certain structure.

The usual way of achieving such things, since TiddlyWeb came along and
made field more "core", is by using the 'fields' field of the tiddler to
have a dictionary attached to the tiddler, putting the structure in an
adjacent field, not the text attribute.

> Question: Is it common practice to define other, customized types of
> Tiddlers
> corresponding to other types of objects in the problem domain,
> where each type of Tiddler could have a particular "signature" ie set
> of field(-type)s?

This is done yes.

> If so, are there special facilities for mapping the various types of
> Tiddlers
> to various types of HTTP content or MIME types?

There are what are called binary and pseudo-binary tiddlers, which have
a 'type' field set to a MIME type, with the text attribute containing
the binary content. There's more to say on this topic, but I'll leave
that for more detail later, also look on tiddlyweb.peermore.com

This 'type' stuff is a TiddlyWeb thing, not quite a TiddlyWiki thing.

> In my particular case, I would like to create an online wiki for
> teaching languages,
> and I would like to include some audio and video content (not just
> text content).

Yes, this is possible with binary tiddlers. The tiddlers just "become"
the binary content, PUT to the server into a bag with a title.

> What I mean is, in its final form here,
> the JavaScript can be rather low-level and hard to figure out what it
> does.

Yes, I agree.

> If there were a high-level specification somewhere of the various bits
> of JavaScript embedded in the page,
> this could be very interesting to study.

There's an ongoing discussion about this in the [tiddlywiki] group
right now.

> Question: What is the MySQL being used for in TiddlySpace?

Speed. The volume of content on tiddlyspace and the type of activities
requires indexes across all the attributes which make up a tiddler.
And there is fulltext indexing of the text field on the tiddlers.
MySQL was a convenient choice at the time. I've since been
investigating using redis but there hasn't been time to get it feature
complete.

> Or has TiddlyWeb's storage in the filesystem been replaced in
> TiddlySpace
> by storage in a relational database?

Yes see above about storage interface implementations.

> My goal here is to make a site which could help students learn
> English.

This is something I've seen done on TiddlySpace with Russian speakers
learning English, but mostly as a reference. But it ought to work well
in the pattern you describe.

> I could let each student have their own webpage, eg:

Yes.

> This could be helpful to let each student take notes on their own
> wiki.
> And I guess over time their wiki could become more and more
> personalized,
> reflecting which "learning modules" they had selected and studied
> (they don't have to do them all!)
> and reflecting their answers on quizzes and tests
> (which could be text, multiple-choice, audio or video answers).

One option you might pursue is putting lesson content in spaces. Then
when a student chooses to work on lesson they would include that
lesson's space in their own, do their exercises, making notes in their
own space.

> Question: What is the best way for including media (audio, video) in a
> Tiddler?

http://tiddlyweb.peermore.com/wiki/#%5B%5Bbinary%20tiddler%5D%5D

That links to an explanation of how to do a raw PUT to get binary
content into the server. Another option is, inside a TiddlyWiki
generated by TiddylSpace to have a tiddler containing the binaryUpload
macro:

<<binaryUpload edit:title>>

However TiddlyWeb is not ideal for delivering huge binary content. If
you're going to have that, it is often best to host it as a file
somewhere else and maintain (in a tiddler of course) a reference to
the somewhere else by link.

> Some media might be hosted at YouTube and linked from there -
> but some media would be hosted and streamed from my server.

There are tiddlywiki plugins for embedding external videos.

> For quizzes, I assume there is some way of including a Form in a
> Tiddler,
> and so the user (a student) could answer questions,
> and then click OK to send this to the server.

There are a variety of tiddlywiki plugins that allow quizzing and
recording the results.

> Question: Are there existing modules for TiddlyWeb
> which make it easy to create and use Forms?

In TiddlyWeb, not a great deal. It's really oriented towards just
handling the GETting and PUTting of tiddlers. In _TiddlyWiki_ there's
lots of stuff for translating form input into a structured tiddler
which can then be saved to the server. Ask around the tiddlywiki group
about such things. Sometimes they need to be adapted to work
effectively with a server, but if they do the changes are usually
minor.

> So I am eager to learn more about the approaches used in TiddlyWeb
> for:

TiddlyWeb isn't a framework in the sense that say Rails or Django is,
but it can fake it if desired. It is more of a toolkit for tiddlers on
the web which can use (server-side) plugins to do all this stuff:

> (1) routing
> (2) page templating and layout
> (3) customized content (eg, streaming audio and video)
> (4) submitting forms

See:

http://pypi.python.org/pypi?%3Aaction=search&term=tiddlywebplugins

for published plugins.

> I am also curious about authentication and authorization,
> and would appreciate any pointers in that direction.

This is a good starting point for the concepts related to Auth{N,Z}:

http://tiddlyweb.peermore.com/wiki/#%5B%5BAuth%20Model%5D%5D

> I suppose maybe it is possible to simply
> absorb a lot of this hands-on and intuitively,
> while manipulating the webpage itself.

Yes, also you can browse around the server and poke at things to see
what URLs exist and what the present. For lots of the if you stick
'.txt' or '.json' on the end you'll get a different representation.

Another thing you can do is explore the information presented by a
recently created plugin installed on tiddlyspace.com, it creates
automatic docs. See this thread where I announced it:

http://groups.google.com/group/tiddlyweb/browse_frm/thread/959ec1eab0156583

Keep in mind that there is a fairly big difference/boundary between
TiddlyWeb, the server which is storing and providing the tiddlers, and
TiddlyWiki (just) one of the applications which can be used to view
those tiddlers. What a tiddler like "SiteTitle" means is different
depending on the context. In TiddlyWeb it is just another tiddler, in
TiddlyWiki it is the title on the page that you see when looking at
the TiddlyWiki.

Most of the things you describe here:

> I already did manage to figure out that
> I shouldn't've changed the "title" part of SiteTitle
> - just the "body text" part -
> which led to the discovery that the "title" part of a Tiddler is the
> variable name,
> and the "body text" part is the value -
> which led to a lot of further understandings and intuitions about how
> TiddlyWeb works.

are about TiddlyWiki, not TiddlyWeb.

I think the distinction is fairly important. Yes they are operating in
the same place and when you see one you often see the other, but you
don't always, and when you think you do (or think you don't) and you
don't (or do), things get weird.

> Well sorry for rambling on, I just really do like TiddlyWeb.

I'm glad.

> And it is nice to have open-ended questions about potential ways of
> using a system -
> rather than frustrated questions about how to install it :-)

Yes.

Good luck with it all. Looking forward to hearing about what you
accomplish and discover.

--
Chris Dent http://burningchrome.com/
[...]

Scott Alexander

unread,
Nov 13, 2011, 11:36:05 PM11/13/11
to TiddlyWeb
Chris -

Thank you for your detailed reply to my detailed post!

This has been very helpful to give me a better understanding of how TW
works.

- Scott

Peter Neumark

unread,
Nov 14, 2011, 3:39:29 AM11/14/11
to tidd...@googlegroups.com
Chris, you mention that a "collection of tiddlers" can also be GET'd from tiddlyweb.
Is it possible to get the actual tiddlers from /search.json in JSON format rather than just tiddler metadata?
Thanks,
Peter


--
You received this message because you are subscribed to the Google Groups "TiddlyWeb" group.
To post to this group, send email to tidd...@googlegroups.com.
To unsubscribe from this group, send email to tiddlyweb+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tiddlyweb?hl=en.


FND

unread,
Nov 14, 2011, 3:57:37 AM11/14/11
to tidd...@googlegroups.com
>> Question: is there a way of regarding a Bag or a Recipe
>> as also being a Tiddler?
>
> [...]

> This is not to say that you couldn't represent either a recipe or bag
> as a tiddler, on the client side, and then adapt it appropriately.

Indeed - I've often wanted to do this, but somehow never got around to
it. (Perhaps that's because in TiddlyWiki, this would have required some
special-casing in the adaptor. But if I were to write a new client, I'd
probably implement it that way, perhaps using a content-type which might
then make the client display such tiddlers using a UI like TiddlyWeb
Commander[1]'s.)

>> Well sorry for rambling on, I just really do like TiddlyWeb.
>
> I'm glad.

Ditto - this was a very interesting read.

> Is it possible to get the actual tiddlers from /search.json in JSON
> format rather than just tiddler metadata?

You can add the `fat` parameter:

$ curl -X GET -H "Accept: application/json" \
"http://tiddlyspace.com/search?q=modifier:fnd;fat=1" | \
python -m json


-- F.


[1] http://commander.tiddlyspace.com

Peter Neumark

unread,
Nov 14, 2011, 4:38:39 AM11/14/11
to tidd...@googlegroups.com
Ah, thanks, very cool!
The "fat" was what I needed.

Peter

chris...@gmail.com

unread,
Nov 14, 2011, 10:16:46 AM11/14/11
to tidd...@googlegroups.com
On Mon, 14 Nov 2011, Peter Neumark wrote:

> Ah, thanks, very cool!
> The "fat" was what I needed.

You can also say 'render=1' to get the HTML rendering of the tiddler
in a render field as well.

Both fat and render add some expense to the request.

The expectation with "skinny" JSON collections was that you'd get
the skinny stuff, and then only get the text of those that you
_really_ cared about, individually.

Reply all
Reply to author
Forward
0 new messages