RSS → Mastodon Bot with Feediverse
This guide is for Ubuntu/Linux Mint, other Distros will have different package names / installation commands.
1. Installation
First, install Python 3 and its pip packet manager:
sudo apt install python3-pip
Then we'll install some Python packages (these are the packages listed in Feediverse's setup.py):
pip3 install beautifulsoup4 feedparser mastodon.py python-dateutil pyyaml
We will use my Feediverse fork at github.com/gunchleoc/feediverse because I have added some features there.
EIther git clone the project or just download feediverse.py. For the rest of this guide, I will assume that you copied the file to your home directory.
Open a Terminal in your home directory. Mark feediverse.py as executable by running
sudo chmod +x feediverse.py
2. Configuration
In order to be able to write to your Mastodon account, you will need an access token. Log into your Mastodon account and visit Settings > Development. Click on the New application button.
- Fill in the Application name, e.g. feediverse
- Application website is optional
- Leave the Redirect URI as it is
- In the Scopes section, uncheck everything except for write
- Click Submit
You will now see your new application listed. Click on it to reveal its data.
Leave the browser tab open and return to the Terminal. Call Feediverse with the command:
./feediverse.py
On first run, Feediverse will ask you for some information. Fill it out:
- What is your Mastodon Instance URL? https://name-of-your-instance.social
- Do you have your app credentials already? [y/n] y
The information from the application that you just created for your Mastodon account is next. Copy and paste it from your browser:
- What is your app's client id: Client key
- What is your client secret: Client secret
- access_token: Your access token
Now we enter the data source:
- RSS/Atom feed URL to watch: Enter the full URL. For Twitter bots, you can use https://nitter.net/your-twitter-handle/rss
- Shall already existing entries be tooted, too? [y/n] Answer as you like
You will now have a configuration file in your home directory called .feediverse. You may nee to switch on the display of hidden files to see it.
Now open the file in a text editor. It will look like this:
access_token: <Mastodon access token>
client_id: <Mastodon Client key>
client_secret: <Mastodon Client secret>
feeds:
- template: '{title} {url}'
url: https://nitter.net/your-twitter-handle/rss
name: feediverse
time: updated
updated: '2022-06-19T22:57:11.731269+00:00'
url: https://name-of-your-instance.social
visibility: unlisted
You can now tweak the template according to what your RSS source provides. You can also adjust the visibility. Check out the Readme for more information.
In my bots, I like to spread the load over multiple Nitter servers by adding the following lines:
rewrite_source:
- source: https://nitter.net/
targets:
- text: https://nitter.net/
- text: https://nitter.sethforprivacy.com/
- text: https://nitter.pussthecat.org/
- text: https://nitter.nixnet.services/
- text: https://nitter.namazso.eu/
- text: https://bird.trom.tf/
- text: https://nitter.grimneko.de/
- text: https://nitter.mstdn.social/
- text: https://nitter.weiler.rocks/
- text: https://tw.artemislena.eu/
- text: https://de.nttr.stream/
- text: https://nitter.privacy.com.de/
- text: https://nitter.notraxx.ch/
- text: https://nitter.lunar.icu/
- text: https://nitter.tiekoetter.com/
For Twitter bots, the following template works well:
- template: "{title} {hashtags} \u2022 Source: {link}"
You can now make a dry run to test your configuration:
feediverse --dry-run --verbose
You can manipulate the date in the configuration file to get more posts from the past.
If you have multiple bots running, rename the configuration file and hand it to the program like this:
/home/<username>/feediverse.py -c /home/<username>/.feediverse_special_bot
3. Automation
I'm using cron to fetch the RSS regularly. Execute the following command:
crontab -e
Now add this line to pull every 15 minutes:
*/15 * * * * /home/<username>/feediverse.py -c /home/<username>/.feediverse_special_bot
If you want a different time interval, you can use crontab.cronhub.io to help you.
If you want to check whether cron has executed the program, run
grep "feediverse" /var/log/syslog
Doug Holton mag das.
teilten dies erneut
Instagram → Fediverse bot
These instructions are for Debian-based Linux (including Ubuntu & Mint).
You will need an account at Instagram to access their API.
1. Obtaining the code
Open a terminal.
Install the Python programming language & the pip package manager:
sudo apt install python3-pip
Get the code by cloning https://github.com/Horhik/Instagram2Fedi
Install the dependencies listed in the requirements file:
cd Instagram2Fedi
pip install -r requirements.txt
2. Running the bot
The bot will be permanently active once you start it.
So, instead of creating a cron job, I have wrapped the commands into a bash script and am running it as a systemd service.
Create a script file called insta2fedi.sh, then edit the file and paste in the code, adapting to your configuration:
#!/bin/bash
sleep 1s
pushd /path/to/Instagram2Fedi/
# Unit: seconds
declare -i CHECK_INTERVAL=60*15
declare -i POST_INTERVAL=60*5
INSTA_AUTH_USER=<insta_username>
INSTA_AUTH_PASSWORD=<insta_password>
# Token from <pixelfed_server>/settings/developers
TOKEN=<pixelfed_API_token>
# If you are poshing to Mastodon, use --use-mastodon 4 for the media limit
./insta2fedi --use-docker false --instagram-user <insta_username_to_be_fetched> \
--instance <pixelfed_server> --token ${TOKEN} \
--user-name $INSTA_AUTH_USER --user-password $INSTA_AUTH_PASSWORD \
--use-mastodon 0 --fetch-count 3 --carousel-limit 20 \
--check-interval $CHECK_INTERVAL --post-interval $POST_INTERVAL &
popd
# keep the systemd service running so that python scripts won't be killed
while true
do
sleep 1h
done
3. Automated startup
This is how you build the systemd service:
sudo <editor> /etc/systemd/system/insta2fedi.service
Paste this code into the editor, adapting the path to the script according to where you put it:
[Unit]Wants=network.target
After=syslog.target network-online.target
[Service]Type=simple
ExecStart=/path/to/script/insta2fedi.sh
KillMode=mixed
[Install]WantedBy=multi-user.target
Save it. Now adapt the access permissions for the service and the script in the terminal:
sudo chmod 640 /etc/systemd/system/insta2fedi.service
sudo chmod 744 ./insta2fedi.sh
Load the new service configuration into systemd:
sudo systemctl daemon-reload
You should call this every time you make any changes.
You can inspect, start and stop the service with the following commands:
systemctl status insta2fedi.service
sudo systemctl start insta2fedi.service
sudo systemctl stop insta2fedi.service
Once you are happy with the results, you can set it to load automatically on system start:
sudo systemctl enable insta2fedi.service
More information about systemd services:
https://www.howtogeek.com/687970/how-to-run-a-linux-program-at-startup-with-systemd/
https://forums.linuxmint.com/viewtopic.php?t=275464
teilten dies erneut
instructions for Iranians & to help Iranians connect to the internet
Includes information about Tor and messenger apps.
Anti Censorship Package
See comment below this post.
Conecting to the Internet with Tor
Instructions in Farsi for running Tor - Tor team reported that it is currently possible to connect to Tor via #Snowflake or some obfs4 bridges from Iran: https://forum.torproject.net/t/iran-circumventing-censorship-with-tor/4590
Tor Project website in Farsi: https://www.torproject.org/fa/
More Tor instructions if you are having problems connecting: https://forum.torproject.net/t/iran-circumventing-censorship-with-tor/4590
If you're on Android, you can use Orbot to connect to Tor: https://play.google.com/store/apps/details?id=org.torproject.android
Instructions in Farsi for configuring Tor bridges: https://bird.trom.tf/PasKoocheh/status/1574733911812358144 (or in Thread Reader App: https://threadreaderapp.com/thread/1574733911812358144.html)
Helping people to connect to Tor
If you live in a censorship-free country and want to help, install the https://snowflake.torproject.org extension into your browser. All it takes is a few mouse clicks. If you're on Microsoft Edge, pick the Chrome extension. Step-by-step instructions in German: https://opensocial.at/display/59c238fc-1263-2f74-cb3c-5f9002392194
If you want to run a Snowflake on Android, you can use Orbot (see link above).
Instant Messaging
For instant messaging, you can use Briar App https://briarproject.org on Android only
You can download Signal messenger by sending an e-mail to getsignal@signal.org ant they will automatically respond with a link directing you to the APK where you can download Signal for Android. Please note that this inbox is not monitored.
You will need to configure a proxy in order to use Signal. Send @GunChleoc a DM if you need a link to a Proxy #IRanASignalProxy. Instructions in Farsi: https://support.signal.org/hc/fa/articles/360056052052-%D9%BE%D8%B4%D8%AA%DB%8C%D8%A8%D8%A7%D9%86%DB%8C-%D8%A7%D8%B2-%D9%BE%D8%B1%D9%88%DA%A9%D8%B3%DB%8C
If you want to run a Signal Proxy for the people in Iran: https://signal.org/blog/run-a-proxy/
File Sharing
File sharing via #Tor: https://onionshare.org/
#MahsaAmini #IranProtests2022 #مهسا امینی #اعتصابات سراسری #OpIran #Iran #IranRevoIution2022 #IranRevolution
Anti Censorship Package Anonymous - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.Pastebin
mögen das
teilten dies erneut
Friendica translation questions
I am working on translating Friendica on Transifex. What is the best way to ask context questions or report source string bugs, do I open an issue on Transifex or GitHub, or do I post to this group?
I have also found a typo in the English source: countact -> contact
https://www.transifex.com/Friendica/friendica/translate/#gd/messagespo/420116685?q=text%3Acountact
src/Console/MergeContacts.php:90
BTW the link to the translation instructions on https://friendi.ca/resources/contribute/ is dead - https://github.com/friendica/friendica/blob/develop/README.translate.md does not exist
My other questions have been answered - it's more convenient for the development team to have source string bugs reported on GitHub. Do not report typos; only report i18n issues that prevent you from translating properly.
I bet my girlfriend that this picture of our cats could get 10 billion boosts on Mastodon.
She said she doesn't believe me. She said there's only 13 million accounts on Mastodon. She said there aren't even 10 billion people on Earth. She said it concerns her that I struggle so hard to comprehend large numbers.
Let's prove her wrong everyone. Boost away and show her just how awesome the Mastodon community is.
teilten dies erneut
Install failed with Composer\Downloader\TransportException
!Friendica Support
I am trying to do a fresh install of Friendica 2023.04.
When I visit the home url, I get:
Vendor path not found. Please execute "bin/composer.phar --no-dev install" on the command line in the web root.
So, I ssh into the server and run it, but I get the following error:
$ bin/composer.phar --no-dev install
You are using Composer 1 which is deprecated. You should upgrade to Composer 2, see https://blog.packagist.com/deprecating-composer-1-support/
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 35 installs, 0 updates, 0 removals
- Installing npm-asset/cropperjs (1.2.2): Downloading (failed)
Downloading (failed)
Downloading (failed)[Composer\Downloader\TransportException]
The "https://registry.npmjs.org/cropperjs/-/cropperjs-1.2.2.tgz" file could not be downloaded: allow_url_fopen must be enabled in php.ini (https:// wrapper is disabled in the server con
figuration by allow_url_fopen=0
Failed to open stream: no suitable wrapper could be found)
phpinfo() lists allow_url_fopen as On
What can I do to fix this?
I'm on a CPanel managed server and don't have root rights. Linux Kernel version is "Linux 3.10.0-1160.88.1.el7.x86_64 x86_64" but I have no idea which distro. Doesn't seem to be Debian-based though.
PHP 8.1 (ea-php81)
Manually creating the config/local.config.php of course also didn't help, because that won't create the vendor path.
Roland Häder mag das.
Roland Häder mag das.
'S e a' chiad turas a nì mi sin is chan eil spùt agam dè cho fada 's a bheir e
ailbhean.co-shaoghal.net
#gàidhlig
GunChleoc
Als Antwort auf GunChleoc • • •Ways to connect when authorities block services:
* Unblock YouTube grants you access to any blocked web page - https://m.proxfree.com
* Web Proxy — is an intermediate point between your computer and the needed website. - https://hidemy.name/en/
Snowstorm- Multi Hop VPN https://snowstorm.net
* Use ProxMate . This is a addons for webbrowser Mozilla Firefox or Chrome. - https://proxmate.me
* DNS provider that is open and democratic - https://www.opennic.org
* Android: Circumvent Internet restrictions with Tor -https://www.torproject.org/download/
* Android users-
* https://play.google.com/store/apps/details?id=com.psiphon3
* Apple users - http://download.cnet.com/Free-VPN-Onavo-Protect/3000-2064_4-75893697.html
* Google browser - https://chrome.google.com/webstore/detail/zenmate-vpn-best-cyber-se/fdcgdnkidjaadafnichfpabhfomcebme
* Firefox users - https://addons.mozilla.org/en-US/firefox/addon/anonymox/
* List of DNS servers that can be used to avoid censorship - https://www.lifewire.com/free-and-public-dns-servers-2626062
* How Do I Change DNS Servers? - https://www.lifewire.com/how-to-change-dns-server-settings-2617979
* Tor Browser - https://www.torproject.org/download/download-easy.html.en
* What is the Tor Browser? - https://www.torproject.org/projects/torbrowser.html.en
In case it is needed: Dial up internet access VPN Jabber … http://www.cisco.com/c/dam/en/us/products/collateral/security/asa-5500-series-next-generation-firewalls/guide_c07-717020.pdf
Alternate DNS - https://wikileaks.org/wiki/Alternative_DNS/de
Stay Anonymous- https://www.whonix.org
General router DNS setup(recommended) - http://support.smartdnsproxy.com/customer/portal/articles/1558303-general-router-dns-setup-smart-dns-proxy
Express VPN https://www.expressvpn.com/support/vpn-setup/manual-config-for-dd-wrt-router-with-openvpn/
Anonymity Script- https://github.com/HiroshiManRise/anonym8
Secure your wifi- https://www.pcmag.com/article2/0,2817,2409751,00.asp
Stop your internet provider from tracking you - http://www.pcworld.com/article/3184767/security/three-privacy-tools-that-block-your-internet-provider-from-tracking-you.html
VPN GATE client for linux - https://github.com/Dragon2fly/vpngate-with-proxy
TOR Bridges- https://bridges.torproject.org/
Virtual Machine for Linux- Oracle Virtual Box
https://www.virtualbox.org/wiki/Linux_Downloads
For windows and Mac- https://www.virtualbox.org/
QEMU-https://www.qemu.org/download/
Sandbox- https://apkmodule.com/sand-box-mod-apk/
Communication apps
- Threema (Not FREE) - Android, iOS, WEB - https://threema.ch/
end-to-end encryption, can be operated completely anonymously, no need to disclose phone number, communications are not stored in any cloud storage
________________________________________________________________
- Signal (FREE) - Android, iOS, PC, Mac, Linux - https://signal.org/download/
end-to-end encryption, cannot operate anonymously, requires a phone number
________________________________________________________________
- Telegram (FREE) - Android, iOS, PC, Mac, Linux - https://telegram.org
does not have end-to-end encryption by default, requires a phone number, stores conversations in the cloud
-Element (FREE) Android, iOS, PC, Mac
https://element.io/
Element lets you choose where your messages are stored, putting you in control of your data.
#MahsaAmini #IranProtests2022 #مهسا امینی #اعتصابات سراسری #OpIran #Iran #IranRevoIution2022 #IranRevolution
teilten dies erneut
Iran News 🤖 hat dies geteilt.