Messy Notes about using ZeroNet and other things
All code published here are under CC-BY-SA licence, if not compatible, then MIT license X)
Another python script :3 This script gives you the power to cross post between ZeroMe and Mastodon, which means when you post something on ZeroMe, it will also post to your Mastodon account, and vice versa.
What is Mastodon? It's a Twitter-like, that based on OStatus protocol, distributed social network, and recently its user base and development are exploding. For more information check its github repository.
Unlike Feedbot.py, this time the installation is quite simple. First you need to have an account from a Mastodon instance. Then create a folder named
ZeroMeMastodonBridge under your ZeroNet root directory (Or simply use the FeedBot folder if you have created one):
$ cd /path/to/zeronet && mkdir ZeroMeMastodonBridge
Download the script file ↗ or copy it from Nullpaste to the folder, then install dependent packages
Mastodon.py like with
$ pip install html2text --user && pip install Mastodon.py --user. That's all.
Run the script with
$ python zerome_mastodon_bridge.py, just at the first time it will ask you to input your hub
auth_privatekey (you can find them in the
users.json) and your Mastodon instance website address, your username and password of your Mastodon account.
You can keep repeating the script with
$ while sleep TIME_INTERVAL_IN_SECOND; do python zerome_mastodon_bridge.py; done.
PS: The script also supports to set last timestamps without cross-posting anything, with command:
$ cd /path/to/zeronet/ZeroMeMastodonBridge && python -c 'from zeronet_mastodon_bridge import initGlobalName, setLastTimestamp; initGlobalName(); setLastTimestamp()'
The process is similar to "ZeroMe Mastodon Bridge", but in addition you need to create an
access token dict: First register an OAuth client applicant from Settings -> Connections, then check https://pythonhosted.org/gnusocial/oauth.html to get the access_token dict. Finally copy & paste the dict when running the script at the first time. Script file ↗
For Markdown support, add this, and enable it in Settings.
html2text, though it may still have some bugs. Also Mastodon limits post to 500 characters by default.
Currently ZeroMe still has not many users (though I also like small community), and most hubs have quite heavy limit to content size. But I believe ZeroMe is still quite a promising project . Besides keep improving performance and adding functions, similiar to using same protocol like traditional email service, Diaspora* with Friendica (Friendica also supports connecting to many other websites, before it could also hack Facebook, but later Facebook built some high wall...) and Hubzilla, Mastodon with StatusNet, Gnusocial and Quitter. In the long term it may be better that ZeroMe and ZeroNet can communicate with other distributed (social) network, or just P2P (social) network. Therefore ZeroMe and ZeroNet project won't become an isolated island.