From f42351e23585a54296db4d3dad021e187f6680d4 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Tue, 2 Jul 2019 16:53:23 +0100 Subject: [PATCH] Add new readme build script, and update the readme build --- bin/readme-bld.sh | 17 ++++++ bin/readme.md | 3 +- contributing.md | 3 +- readme.md | 132 ++++------------------------------------------ 4 files changed, 29 insertions(+), 126 deletions(-) create mode 100755 bin/readme-bld.sh diff --git a/bin/readme-bld.sh b/bin/readme-bld.sh new file mode 100755 index 000000000..198c3abd0 --- /dev/null +++ b/bin/readme-bld.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Build readmes from corresponding tiddlers + +# Default to the version of TiddlyWiki installed in this repo + +if [ -z "$TW5_BUILD_TIDDLYWIKI" ]; then + TW5_BUILD_TIDDLYWIKI=./tiddlywiki.js +fi + +# tw5.com readmes +node $TW5_BUILD_TIDDLYWIKI \ + editions/tw5.com \ + --verbose \ + --output . \ + --build readmes \ + || exit 1 diff --git a/bin/readme.md b/bin/readme.md index 22cb2965e..d2014ca6b 100644 --- a/bin/readme.md +++ b/bin/readme.md @@ -1,3 +1,4 @@

Script Files

The TiddlyWiki5 repository contains several scripts in the bin folder that you can use to automate common tasks, or as a useful starting point for your own scripts. See Scripts for building tiddlywiki.com for details of the scripts used to build and release https://tiddlywiki.com/.

All the scripts expect to be run from the root folder of the repository.

serve: serves tw5.com

./bin/serve.sh -h
 ./bin/serve.sh [edition dir] [username] [password] [host] [port]

Or:

./bin/serve.cmd -h
-./bin/serve.cmd [edition dir] [username] [password] [host] [port]

This script starts TiddlyWiki5 running as an HTTP server, defaulting to the content from the tw5.com-server edition. By default, the Node.js serves on port 8080. If the optional username parameter is provided, it is used for signing edits. If the password is provided then HTTP basic authentication is used. Run the script with the -h parameter to see online help.

To experiment with this configuration, run the script and then visit http://127.0.0.1:8080 in a browser.

Changes made in the browser propagate to the server over HTTP (use the browser developer console to see these requests). The server then syncs changes to the file system (and logs each change to the screen).

test: build and run tests

This script runs the test edition of TiddlyWiki on the server to perform the server-side tests and to build test.html for running the tests in the browser.

lazy: serves tw5.com with lazily loaded images

./bin/lazy.sh <username> [<password>]

Or:

./bin/lazy.cmd <username> [<password>]

This script serves the tw5.com-server edition content with LazyLoading applied to images.

2bld: builds TiddlyWiki 2.6.5

This script builds TiddlyWiki 2.6.5 from the original source and then displays the differences between them (diff is used for *nix, fc for Windows).

\ No newline at end of file +./bin/serve.cmd [edition dir] [username] [password] [host] [port]

This script starts TiddlyWiki5 running as an HTTP server, defaulting to the content from the tw5.com-server edition. By default, the Node.js serves on port 8080. If the optional username parameter is provided, it is used for signing edits. If the password is provided then HTTP basic authentication is used. Run the script with the -h parameter to see online help.

To experiment with this configuration, run the script and then visit http://127.0.0.1:8080 in a browser.

Changes made in the browser propagate to the server over HTTP (use the browser developer console to see these requests). The server then syncs changes to the file system (and logs each change to the screen).

test: build and run tests

This script runs the test edition of TiddlyWiki on the server to perform the server-side tests and to build test.html for running the tests in the browser.

lazy: serves tw5.com with lazily loaded images

./bin/lazy.sh <username> [<password>]

Or:

./bin/lazy.cmd <username> [<password>]

This script serves the tw5.com-server edition content with LazyLoading applied to images. +

\ No newline at end of file diff --git a/contributing.md b/contributing.md index 01112e1f1..cb328b582 100644 --- a/contributing.md +++ b/contributing.md @@ -1,4 +1,3 @@ -

Contributing to TiddlyWiki5

We welcome contributions to the code and documentation of TiddlyWiki in several ways:

There are other ways to help TiddlyWiki too.

Contributor License Agreement

Like other OpenSource projects, TiddlyWiki5 needs a signed contributor license agreement from individual contributors. This is a legal agreement that allows contributors to assert that they own the copyright of their contribution, and that they agree to license it to the UnaMesa Association (the legal entity that owns TiddlyWiki on behalf of the community).

How to sign the CLA

Create a GitHub pull request to add your name to cla-individual.md or cla-entity.md, with the date in the format (YYYY/MM/DD).

step by step

  1. Navigate to licenses/CLA-individual or licenses/CLA-entity according to whether you are signing as an individual or representative of an organisation
  2. Click the "edit" button at the top-right corner (clicking this button will fork the project so you can edit the file)
  3. Add your name at the bottom
    • eg: Jeremy Ruston, @Jermolene, 2011/11/22
  4. Below the edit box for the CLA text you should see a box labelled Propose file change
  5. Enter a brief title to explain the change (eg, "Signing the CLA")
  6. Click the green button labelled Propose file change
  7. On the following screen, click the green button labelled Create pull request

The CLA documents used for this project were created using Harmony Project Templates. "HA-CLA-I-LIST Version 1.0" for "CLA-individual" and "HA-CLA-E-LIST Version 1.0" for "CLA-entity".

Remarks -----—

In this case, please clearly state so, since otherwise we assume that you are the legal copyright holder of the contributed work! Please provide links and additional information that clarify under which license the rest of the code is distributed. +

Contributing to TiddlyWiki5

We welcome contributions to the code and documentation of TiddlyWiki in several ways:

There are other ways to help TiddlyWiki too.

Contributor License Agreement

Like other OpenSource projects, TiddlyWiki5 needs a signed contributor license agreement from individual contributors. This is a legal agreement that allows contributors to assert that they own the copyright of their contribution, and that they agree to license it to the UnaMesa Association (the legal entity that owns TiddlyWiki on behalf of the community).

How to sign the CLA

Create a GitHub pull request to add your name to cla-individual.md or cla-entity.md, with the date in the format (YYYY/MM/DD).

step by step

  1. Navigate to licenses/CLA-individual or licenses/CLA-entity according to whether you are signing as an individual or representative of an organisation
  2. Ensure that the "branch" dropdown at the top left is set to tiddlywiki-com
  3. Click the "edit" button at the top-right corner (clicking this button will fork the project so you can edit the file)
  4. Add your name at the bottom
    • eg: Jeremy Ruston, @Jermolene, 2011/11/22
  5. Below the edit box for the CLA text you should see a box labelled Propose file change
  6. Enter a brief title to explain the change (eg, "Signing the CLA")
  7. Click the green button labelled Propose file change
  8. On the following screen, click the green button labelled Create pull request

The CLA documents used for this project were created using Harmony Project Templates. "HA-CLA-I-LIST Version 1.0" for "CLA-individual" and "HA-CLA-E-LIST Version 1.0" for "CLA-entity".

Remarks

If you do not own the copyright in the entire work of authorship:

In this case, please clearly state so and provide links and any additional information that clarify under which license the rest of the code is distributed.

This file was automatically generated by TiddlyWiki5

\ No newline at end of file diff --git a/readme.md b/readme.md index d653c77d7..d26bd8fdb 100644 --- a/readme.md +++ b/readme.md @@ -1,134 +1,20 @@

Welcome to TiddlyWiki, a non-linear personal web notebook that anyone can use and keep forever, independently of any corporation.

TiddlyWiki is a complete interactive wiki in JavaScript. It can be used as a single HTML file in the browser or as a powerful Node.js application. It is highly customisable: the entire user interface is itself implemented in hackable WikiText.

Learn more and see it in action at https://tiddlywiki.com/

Developer documentation is in progress at https://tiddlywiki.com/dev/

Join the Community

Users

The TiddlyWiki discussion groups are mailing lists for talking about TiddlyWiki: requests for help, announcements of new releases and plugins, debating new features, or just sharing experiences. You can participate via the associated website, or subscribe via email.

Developers

New releases of TiddlyWiki, TiddlyDesktop and TiddlyFox are announced via the discussion groups and Twitter (you can also subscribe to an Atom/RSS feed of TiddlyWiki releases from GitHub)

Documentation

There is also a discussion group specifically for discussing TiddlyWiki documentation improvement initiatives: http://groups.google.com/group/tiddlywikidocs

-

Installing TiddlyWiki on Node.js

  1. Install Node.js
    • either from your favourite package manager: typically apt-get install nodejs on Debian/Ubuntu Linux or Termux for Android, or brew install node on a Mac
    • or directly from http://nodejs.org
  2. Open a command line terminal and type:

    npm install -g tiddlywiki

    If it fails with an error you may need to re-run the command as an administrator:

    sudo npm install -g tiddlywiki (Mac/Linux)

  3. Check TiddlyWiki is installed by typing:

    tiddlywiki --version

  4. In response, you should see TiddlyWiki report its current version (eg "5.1.18"; you may also see other debugging information reported)
  5. Try it out:
    1. tiddlywiki mynewwiki --init server to create a folder for a new wiki that includes server-related components
    2. tiddlywiki mynewwiki --listen to start TiddlyWiki
    3. Visit http://127.0.0.1:8080/ in your browser
    4. Try editing and creating tiddlers
  6. Optionally, make an offline copy:
    • click the +

      Installing TiddlyWiki on Node.js

      1. Install Node.js
        • either from your favourite package manager: typically apt-get install nodejs on Debian/Ubuntu Linux or Termux for Android, or brew install node on a Mac
        • or directly from http://nodejs.org
      2. Open a command line terminal and type:

        npm install -g tiddlywiki

        If it fails with an error you may need to re-run the command as an administrator:

        sudo npm install -g tiddlywiki (Mac/Linux)

      3. Check TiddlyWiki is installed by typing:

        tiddlywiki --version

      4. In response, you should see TiddlyWiki report its current version (eg "5.1.20-prerelease"; you may also see other debugging information reported)
      5. Try it out:
        1. tiddlywiki mynewwiki --init server to create a folder for a new wiki that includes server-related components
        2. tiddlywiki mynewwiki --listen to start TiddlyWiki
        3. Visit http://127.0.0.1:8080/ in your browser
        4. Try editing and creating tiddlers
      6. Optionally, make an offline copy:
        • click the - save changes button in the sidebar, OR
        • tiddlywiki mynewwiki --build index

      The -g flag causes TiddlyWiki to be installed globally. Without it, TiddlyWiki will only be available in the directory where you installed it.

      If you are using Debian or Debian-based Linux and you are receiving a node: command not found error though node.js package is installed, you may need to create a symbolic link between nodejs and node. Consult your distro's manual and whereis to correctly create a link. See github issue 1434

      Example Debian v8.0: sudo ln -s /usr/bin/nodejs /usr/bin/node

      You can also install prior versions like this:

      npm install -g tiddlywiki@5.1.13

      Using TiddlyWiki on Node.js

      TiddlyWiki5 includes a set of Commands for use on the command line to perform an extensive set of operations based on TiddlyWikiFolders, TiddlerFiles and TiddlyWikiFiles.

      For example, the following command loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in static HTML:

      tiddlywiki --verbose --load mywiki.html --rendertiddler ReadMe ./readme.html

      Running tiddlywiki from the command line boots the TiddlyWiki kernel, loads the core plugins and establishes an empty wiki store. It then sequentially processes the command line arguments from left to right. The arguments are separated with spaces.

      The first argument is the optional path to the TiddlyWikiFolder to be loaded. If not present, then the current directory is used.

      The commands and their individual arguments follow, each command being identified by the prefix --.

      tiddlywiki [<wikipath>] [--<command> [<arg>[,<arg>]]]

      + save changes button in the sidebar, OR

    • tiddlywiki mynewwiki --build index

The -g flag causes TiddlyWiki to be installed globally. Without it, TiddlyWiki will only be available in the directory where you installed it.

If you are using Debian or Debian-based Linux and you are receiving a node: command not found error though node.js package is installed, you may need to create a symbolic link between nodejs and node. Consult your distro's manual and whereis to correctly create a link. See github issue 1434

Example Debian v8.0: sudo ln -s /usr/bin/nodejs /usr/bin/node

You can also install prior versions like this:

npm install -g tiddlywiki@5.1.13

Using TiddlyWiki on Node.js

TiddlyWiki5 includes a set of Commands for use on the command line to perform an extensive set of operations based on TiddlyWikiFolders, TiddlerFiles and TiddlyWikiFiles.

For example, the following command loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in static HTML:

tiddlywiki --verbose --load mywiki.html --rendertiddler ReadMe ./readme.html

Running tiddlywiki from the command line boots the TiddlyWiki kernel, loads the core plugins and establishes an empty wiki store. It then sequentially processes the command line arguments from left to right. The arguments are separated with spaces.

+ + + + New in: 5.1.20 First, there can be zero or more plugin references identified by the prefix + for plugin names or ++ for a path to a plugin folder. These plugins are loaded in addition to any specified in the TiddlyWikiFolder.

The next argument is the optional path to the TiddlyWikiFolder to be loaded. If not present, then the current directory is used.

The commands and their individual arguments follow, each command being identified by the prefix --.

tiddlywiki [+<pluginname> | ++<pluginpath>] [<wikipath>] [--<command> [<arg>[,<arg>]]]

For example:

tiddlywiki --version
+tiddlywiki +plugins/tiddlywiki/filesystem +plugins/tiddlywiki/tiddlyweb mywiki --listen
+tiddlywiki ++./mygreatplugin mywiki --listen

New in: 5.1.18 Commands such as the ListenCommand that support large numbers of parameters can use NamedCommandParameters to make things less unwieldy. For example:

tiddlywiki wikipath --listen username=jeremy port=8090

See Commands for a full listing of the available commands. -

Upgrading TiddlyWiki on Node.js

If you've installed TiddlyWiki on Node.js on the usual way, when a new version is released you can upgrade it with this command:

npm update -g tiddlywiki

On Mac or Linux you'll need to add sudo like this:

sudo npm update -g tiddlywiki

Also see

This readme file was automatically generated by TiddlyWiki +

Upgrading TiddlyWiki on Node.js

If you've installed TiddlyWiki on Node.js on the usual way, when a new version is released you can upgrade it with this command:

npm update -g tiddlywiki

On Mac or Linux you'll need to add sudo like this:

sudo npm update -g tiddlywiki

Also see

This readme file was automatically generated by TiddlyWiki

\ No newline at end of file