Code Monkey home page Code Monkey logo

tiddlywiki-git-sync's Introduction

tiddlywiki-git-sync

'tiddlywiki-git-sync' is a script that automatically backs all TiddlyWiki tiddles into a git repository. It is intended to be deployed to the cloud and configured via environment variables.

How does it work

This script on launch starts the standard TiddlyWiki node.js server that stores tiddlers in the local directory. The script every several minutes commits changed files to a git repository and pushes them to the remote repository. The contents of the remote repository are retrieved on launch and removed before the script terminates.

How to run it

The easiest way to run the script is by using the provided docker image, either running it locally or by deploying it to the cloud provider of choice. Otherwise, set necessary environment variables and execute run.sh shell script.

Running on Windows machines may be possible under WSL or Cygwin although, I cannot guarantee it.

How to configure it

The following environment variables are used as configuration:

CLONEPATH (required)
The remote repository URL. Is authentication is required to access this repository place the username as part of the URL: https://<username>@<host>/path

CREDENTIALS
Username and password used to clone and push changes to the remote. The value must follow the format: https://<username>:<password>@<host>. See details.

COMMITER_NAME and COMMITER_EMAIL
Name and E-main of the commits' author. Required if git's user.name and user.email configuration values are not set.

PORT
TCP/IP port that the server is going to listen to. Default: 8080.

BIND
The IP address that the server is going to bind on. Default: 127.0.0.1.

OPTIONS
Additional options to be passed to the server.

PERIOD
How often to perform "commit-pull-push" operation. Uses the same syntax as the sleep utility.

tiddlywiki-git-sync's People

Contributors

poletaevvlad avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.