Code Monkey home page Code Monkey logo

tiddlywiki-ipfs's Introduction

IPFS with TiddyWiki

This TiddlyWiki plugin aims to help users, editors and developers to manage their wikis on IPFS.

An ethical open source project License: GPL v3 Covenant Prettier

TravisCI Snyk

Builds available on IPFS

This plugin provides the following features:

  • Store TiddlyWiki's and attachments on IPFS
  • Access TiddlyWiki's and attachments from IPFS
  • Compress TiddlyWiki's and attachments
  • Encrypt, Decrypt and Sign TiddlyWiki's and attachments
    • Standford
    • Ethereum
    • SHA-3
  • Import and Export
  • Publish and Manage IPNS Keys and IPNS cids
  • Metamask Ethereum wallets support
  • Publish to ENS
  • Share over IPFS TiddlyWiki's Tiddlers and attachments

According to Wikipedia:

TiddlyWiki is a personal wiki and a non-linear notebook for organising and sharing complex information. It is an open-source single page application wiki in the form of a single HTML file that includes CSS, JavaScript, and the content. It is designed to be easy to customize and re-shape depending on application. It facilitates re-use of content by dividing it into small pieces called Tiddlers.

IPFS with TiddlyWiki enhances TiddlyWiki as a decentralized application (Đapps) who uses distributed computing systems:

IPFS with TiddlyWiki has the following ĐApp characteristics:

  • Open Source
  • Decentralized
  • Unhackable
  • Unstoppable

Using IPFS with TiddlyWiki

Latest IPFS with TiddlyWiki assets

  • $:/boot/boot.js Available on IPFS Available on GitHub
  • $:/ipfs/documentation Available on IPFS Available on GitHub
  • $:/library/ipfs Available on IPFS Available on GitHub
  • $:/plugins/ipfs Available on IPFS Available on GitHub

Latest TiddlyWikis editions

  • bluelightav.eth Available on IPFS Available on GitHub
  • empty empty Available on GitHub
  • tidlywiki.com Available on IPFS Available on GitHub

Release

  • $:/ipfs/documentation Resolve with ENS Resolve with DNS Link
  • $:/plugins/ipfs Resolve with ENS Resolve with DNS Link
  • bluelightav.eth Resolve with ENS Resolve with DNS Link

Recommended Plugins

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Starting from the file system, Follow the developer instructions Running TiddlyWiki

To resolve .eth domains you need an Ethereum capable browser:

  • Use Metamask as a browser extension or as an Android mobile application

To update ENS domains you need an Ethereum wallet:

  • Use Metamask as a browser extension or as an Android mobile application

To run a local IPFS node, you need:

More informations about IPFS:

Remarks:

EthDNS and EthLink EthDNS and EthLink are able to resolve bluelightav.eth.link to IPFS.

Run a local IPFS node with IPFS Desktop

According to the ipfs-desktop README.md, IPFS Desktop allows you to run your IPFS Node on your machine without having to bother with command line tools.

Use a browser extension with IPFS Companion

According to the ipfs-companion README.md, This add-on enables everyone to access IPFS resources the way they were meant: from locally running IPFS node :-).

Supported ENS Ethereum Networks

  • Goerli: Ethereum Test Network (PoA)
  • Mainnet: Ethereum Main Network
  • Rinkeby: Ethereum Test Network (PoA)
  • Ropsten: Ethereum Test Network (PoW)

Setup a nodejs environment to build tiddlywiki instances bundled with IPFS with TiddlyWiki.

Node.js

jsDelivr, A free CDN for Open Source: https://www.jsdelivr.com/

Node Documentation: https://nodejs.org/en/docs/

Npm Repository: https://www.npmjs.com/

SriHash: https://www.srihash.org/

Yarn Documentation: https://classic.yarnpkg.com/en/docs/

Install

On Debian Buster we don't use the default Debian repositories or the Nodesource repositories. We use nvm.

Setup

Follow the nvm installation and update tutorial:

Current installation and update script:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

or

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

As we are using zsh, here is an excerpt of our .zshrc

# nvm initialization!
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
  local node_version="$(nvm version)"
  local nvmrc_path="$(nvm_find_nvmrc)"
  if [ -n "$nvmrc_path" ]; then
    local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
    if [ "$nvmrc_node_version" = "N/A" ]; then
      nvm install
    elif [ "$nvmrc_node_version" != "$node_version" ]; then
      nvm use
    fi
  elif [ "$node_version" != "$(nvm version default)" ]; then
    echo "Reverting to nvm default version"
    nvm use default
  fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc

Check:

nvm -v
0.38.0

This repository contains a .nvmrc who describes the node version to use.

v16

Install the recommended node version.

nvm install v16

Check:

node -v
v16.2.0
npm -v
v7.13.0

Install yarn. https://classic.yarnpkg.com/en/docs/install/#debian-stable

On Debian setup the yarn repository:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

As we are using nvm, we avoid the node installation:

sudo apt update
sudo apt install --no-install-recommends yarn

Or Upgrade yarn.

yarn set version latest

Check your environment:

yarn -v
1.22.10

Repository install

Clone this repository in a local folder, the following command pulls the main branch:

git clone https://github.com/xmaysonnave/tiddlywiki-ipfs --depth 1

Change directory:

cd tiddlywiki-ipfs

Install dependencies, Node.js should be installed and setup:

yarn

Building TiddlyWiki

The repository contains several scripts who build TiddWiki instances bundled with IPFS with TiddlyWiki.

The package.json references several options:

  • build
  • build-bluelightav
  • build-tiddlywiki-ipfs
  • download
  • precommit
  • prepare
  • prettier-standard
  • publisher
  • semver
  • snyk-monitor
  • snyk-protect
  • test
  • testc
  • testw
  • tiddlywiki-ipfs
  • updater
  • uploader
  • upload-tree

Use the build script to build IPFS with TiddlyWiki.

yarn build

Use the test script to run the tests.

yarn test

This project is integrated with Travis CI:

Contributor Covenant Code of Conduct

Please read CODE_OF_CONDUCT.md for details on our code of conduct.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the GPL-3.0-or-later - see the LICENSE file for details.

Acknowledgments

  • Hat tip to anyone who support this project
  • Inspiration

tiddlywiki-ipfs's People

Contributors

dependabot[bot] avatar snyk-bot avatar xmaysonnave avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tiddlywiki-ipfs's Issues

Error while saving

First of all, thanks for this very promising work!

I added the IPFS pluging to a new TiddlyWiki, and tried to create a new tiddler. When I pressed "save", I got the error message:

Error while saving:

Error: Ipfs default client is unavailable: Invalid scope

I get the same error message no matter if IPFS Desktop is running on my machine or not (normally it's running, but I stopped it for testing).

However, I do not get that error message when I open https://tiddly.bluelightav.eth.link/#%24%3A%2Fplugins%2Fipfs and create a new tiddler right there. However, if I press the "export to IPFS" button on the freshly created tiddler, I get the error message

Error while saving:

Upload to Ipfs not supported: text/html

Browser warning and error.

While displaying an embedded application/pdf attachment :

1 - Chrome 78 display the whole content of the pdf in the dev console

Here is the displayed warning.
Resource interpreted as Document but transferred with MIME type application/pdf:

2 - Firefox 68.2.0esr do not complain however the following error message is displayed:
_getLoginDataFromParent: A form origin is required

Thanks

Failed to retrieve an IPFS HTTP provider...

Hi,
I was trying ipfs plugin. But there is something I must have missed...
I am running a local go-ipfs daemon, but when trying to save my new modifications, this message is poping

"Failed to retrieve an IPFS HTTP provider..."

Could you please help me?

Use files rm and cp to update the cid of the html path

I use ipfs saver protocol, because saving to ipns is too slow. I want to update the cid of the tiddlywiki html path after the new version was add to ipfs repo, maybe a configure of the file path is suitable to update the cid?

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.