On Monday, April 3, 2017 at 12:29:14 AM UTC+2, Dan L. wrote:
>
> My goal is to use TidyWiki as a repository for personal notes and 
> journals (i.e. Evernote). I'm new to using TiddlyWiki, but comfortable 
> with scripting and development. 


Welcome to the club!
 

> I'd like to get some input from more 
> experienced users on how they approach creating and editing tiddler 
> content (or integrating in general) outside of manually creating 
> tiddlers. 
>

That's possible. Tiddlers are just text files with a .tid extension and 
some special formatting. 

eg:

created: 20170405135712000
modified: 20170405135712000
title: New Tiddler
tags: tagA tabB [[tag with spaces]]
field-y: optional field
field-y: an other optional field

The empty line above separates the meta data section form this text area. 

All fields are optional except title. If you want to see the tiddlers in 
the "latest" sidebar created and modified are mandatory. 

There is a second format, that uses 2 files. eg: 

test.txt

The test.txt file contains just the "text" area from above and the meta 
data file looks like this

text.txt.meta

created: 20170405135712000
modified: 20170405135712000
title: New Tiddler
tags: tagA tabB [[tag with spaces]]
field-y: optional field
field-y: an other optional field

The latest / upcomming TW nodejs version 5.1.14 will create files like this 
by default. 


The two approaches I could find were editing files directly, and using 
> the REST API.


yes
 

> * Directly creating/editing files in the tiddlers directory requires a 
> restart of the nodejs server, followed by a refresh of the browser 
> window, for any changes to go through. 
>

that's right. ... but its relatively straight forward to create an external 
watch-task that restarts the server for you. It's a bit hacky, but works 
for a dev workflow 
 

> * Using the REST API (GET/PUT/DELETE) seems straight forward enough for 
> getting, editing, or creating text based tiddlers. However, it's 
> undocumented so I'm not sure if there's steps I might be missing 
> (updating indexes, etc.) and I'd have to check into how to handle any 
> new content such as images. Also, it seems a browser refresh is also 
> necessary to render any changes.


That's right!
 

> Some examples of things I'd like to do: 
>
> * Append entries to a day specific tiddler, either automatically (i.e. I 
> have a simple script to connect/disconnect from my work VPN and open 
> related applications, it could also add lines that have the time and 
> connection/disconnection for time tracking) or manually through the 
> command line. 
>

As I wrote above. As long as you keep the general directory and file 
structure it's simple to create single file TWs from the "tiddlywiki" 
command line interface. .. That's how the whole development workflow works. 

>From your OP I suppose you installed nodejs already. I'm using the latest 
stable branch 6.x which works well.

You also should install tiddlywiki CLI with npm install -g tiddlywiki ... 
version 5.1.13 is fine!

eg:

[mario:~] $ 
-> tiddlywiki --version
5.1.13

tiddlywiki without any params will show you the possible commands. See: 
http://tiddlywiki.com/#Commands

tiddlywiki --help editions will list all the available editions

One of the is the server edition. Which you can initialize like this: 

cd tmp
tiddlywiki test-server --init server

and start with: 

tiddlywiki test-server --server

Have a look at the directory structure!

There also is a configuration file named tiddlywiki.info

It contains infos about the plugins, that should be used and some general 
buidl instructions, to make the --build command easier. 

   - create some tiddlers 
   - stop the server 
   - try: tiddlywiki test-server --build index


You'll see, that a index.html has been built in the default output 
directory, of your edition folder. 
You can also try: tiddlywiki test-server --build static
It will use the parameters from tiddlywiki.info. So you don't need to 
remember many parameters 


 

> * Poll my Pinboard account for new bookmarks, then create corresponding 
> Tiddlers in TiddlyWiki, which I may later use for annotations/notes on 
> resources. 
>

With the above info you should be able to create bash scripts, that get you 
going. 

 

> * Have a daemon watching a directory so if I put a photo in Dropbox from 
> my phone, it will import it. 
>

The "watch-stuff" is a bit more work. We'll discuss this later. 

have fun!
mario 

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/79459d59-f16d-4d26-9c9f-1cf1e2a88e06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to