From 57ea0b3a5f16e33d507183ac81fa0bdddd374106 Mon Sep 17 00:00:00 2001 From: Louis Grasset Date: Sun, 22 Oct 2023 20:20:14 +0200 Subject: [PATCH] docs: fix typos & co --- README.md | 8 +++---- docs/docs/configuration/cron.md | 6 ++--- docs/docs/configuration/index.mdx | 2 +- docs/docs/configuration/manual-sync.md | 6 ++--- docs/docs/configuration/pm2.md | 6 ++--- docs/docs/discover.md | 22 +++++++++---------- docs/docs/resources/environment-variables.md | 4 ++-- docs/docs/resources/storage/auth-system.md | 2 +- docs/docs/resources/storage/cache-system.md | 2 +- docs/docs/resources/twitter-authentication.md | 10 ++++----- docs/docusaurus.config.js | 2 +- src/helpers/medias/parse-blob-for-bluesky.ts | 2 +- src/index.ts | 2 +- src/services/bluesky-sender.service.ts | 4 ++-- src/services/mastodon-sender.service.ts | 4 ++-- src/services/posts-synchronizer.service.ts | 2 +- src/services/profile-synchronizer.service.ts | 2 +- 17 files changed, 43 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index a2864c8..8e5c0ed 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Touitomamout relies on two APIs: - [Twitter-Scraper](https://github.com/the-convocation/twitter-scraper) ### Mastodon configuration -In order to communicate with the mastodon instance, you'll have to generate an API Token. It's totally free. Reminder: your application name will be publicly visible. +In order to communicate with the mastodon instance, you'll have to generate an API Token. It is totally free. Reminder: your application name will be publicly visible. 1. Go to your account's application page: `https://{yourinstance.tld}/settings/applications/new` 2. Create a new application with the following scopes: - `read:accounts`: get your mastodon account username @@ -55,14 +55,14 @@ In order to communicate with the mastodon instance, you'll have to generate an A ### Twitter configuration The tweets retrieval by itself can be done without Twitter credentials. But keep in mind that twitter currently blocks guests to access users' replies. -Touitomamout is trying to restore the previous session so you'll not get spammed by the Twitter security team for each connection. +Touitomamout is trying to restore the previous session, so you'll not get spammed by the Twitter security team for each connection. > **Note** > > The configuration allows you to sync a first account and authenticate with a secondary account for two reasons: > 1. Currently, there is no simple way to authenticate with an account having 2FA enabled, so you may not want to lower your main account security. -> 2. Because this project is running with a non-official API, you may not want put your account at risk. +> 2. Because this project is running with a non-official API, you may not want to put your account at risk. ### Environment @@ -74,7 +74,7 @@ Then, please fill each variable. > Do not forget to properly choose the `EXECUTION` variable. > Two values are allowed: > 1. `manual`: a simple node script execution -> 2. `pm2`: spanws as a new PM2 process, named with `touitomamout-${instance_id}` pattern. +> 2. `pm2`: spawns as a new PM2 process, named with `touitomamout-${instance_id}` pattern. ### Multiple instances diff --git a/docs/docs/configuration/cron.md b/docs/docs/configuration/cron.md index fcaecec..0c62502 100644 --- a/docs/docs/configuration/cron.md +++ b/docs/docs/configuration/cron.md @@ -11,6 +11,6 @@ tags: [ ## Define environment variables 3 types of environment variables are required to run the sync: -- **Core variables**: required in situations, get them [here](/docs/resources/environment-variables#core-variables) -- **Sync variables**: required for the sync **you** want, get them [here](/docs/resources/environment-variables#synchronization-) -- **Cron variables**: required for the cron, get them [here](/docs/resources/environment-variables#configuration-with-cron-) +- **Core variables**: required in situations, get them [here](/docs/resources/environment-variables#core-variables). +- **Sync variables**: required for the sync **you** want, get them [here](/docs/resources/environment-variables#synchronization-). +- **Cron variables**: required for the cron, get them [here](/docs/resources/environment-variables#configuration-with-cron-). diff --git a/docs/docs/configuration/index.mdx b/docs/docs/configuration/index.mdx index 63d96bd..8697c4e 100644 --- a/docs/docs/configuration/index.mdx +++ b/docs/docs/configuration/index.mdx @@ -19,6 +19,6 @@ There are multiple ways to run Touitomamout, all of these ways are detailed belo In all cases you'll have to define a set of environment variables to properly shape the Touitomamout instance to your needs. -You can find the [list of all environment variables here](/docs/resources/environment-variables). +You can find a [list of all environment variables here](/docs/resources/environment-variables). ::: diff --git a/docs/docs/configuration/manual-sync.md b/docs/docs/configuration/manual-sync.md index c20a62d..6453896 100644 --- a/docs/docs/configuration/manual-sync.md +++ b/docs/docs/configuration/manual-sync.md @@ -11,6 +11,6 @@ tags: [ ## Define environment variables 3 types of environment variables are required to run the sync: -- **Core variables**: required in situations, get them [here](/docs/resources/environment-variables#core-variables) -- **Sync variables**: required for the sync **you** want, get them [here](/docs/resources/environment-variables#synchronization-) -- **Manual sync variables**: required for the manual sync, get them [here](/docs/resources/environment-variables#configuration-with-manual-sync-) +- **Core variables**: required in situations, get them [here](/docs/resources/environment-variables#core-variables). +- **Sync variables**: required for the sync **you** want, get them [here](/docs/resources/environment-variables#synchronization-). +- **Manual sync variables**: required for the manual sync, get them [here](/docs/resources/environment-variables#configuration-with-manual-sync-). diff --git a/docs/docs/configuration/pm2.md b/docs/docs/configuration/pm2.md index a37201a..2760b36 100644 --- a/docs/docs/configuration/pm2.md +++ b/docs/docs/configuration/pm2.md @@ -11,6 +11,6 @@ tags: [ ## Define environment variables 3 types of environment variables are required to run the sync: -- **Core variables**: required in situations, get them [here](/docs/resources/environment-variables#core-variables) -- **Sync variables**: required for the sync **you** want, get them [here](/docs/resources/environment-variables#synchronization-) -- **PM2 variables**: required for the PM2 instance, get them [here](/docs/resources/environment-variables#configuration-with-pm2-) +- **Core variables**: required in situations, get them [here](/docs/resources/environment-variables#core-variables). +- **Sync variables**: required for the sync **you** want, get them [here](/docs/resources/environment-variables#synchronization-). +- **PM2 variables**: required for the PM2 instance, get them [here](/docs/resources/environment-variables#configuration-with-pm2-). diff --git a/docs/docs/discover.md b/docs/docs/discover.md index dd7f6e0..b63a422 100644 --- a/docs/docs/discover.md +++ b/docs/docs/discover.md @@ -7,7 +7,7 @@ sidebar_position: 1 Let's discover Touitomamout in less than ⏲️ **5** minutes! -First, what is Touitomamout? It is a self-hosted cross-poster from **Twitter** to **Mastodon** and / or **Bluesky**. It's a tool that allows you to sync tweets to Mastodon & Bluesky. But it also allows you to synchronize the profile picture, the name, the banner & profile description if you'd like to. +First, what is Touitomamout? It is a self-hosted cross-poster from **Twitter** to **Mastodon** and / or **Bluesky**. It is a tool that allows you to sync tweets to Mastodon & Bluesky. But it also allows you to synchronize the profile picture, the name, the banner & profile description if you’d like to. ![touitomamout](/img/touitomamout-small.svg) @@ -23,18 +23,18 @@ Here are an overview of the Touitomamout features. :::note Gifs & Videos are not supported on Bluesky yet. But it will be soon 🤞! Until then, tweets containing gifs or videos will -be synced without the medias. If no text and no compatible media are found, the post will be skipped during sync. +be synced without the media. If no text and no compatible media is found, the post will be skipped during sync. ::: -## How synchronization is working? +## How is synchronization working? ### Content synchronization Touitomamout syncs tweets from the selected account every X minutes (you have to choose this while creating your instance). -If you have to understand a single thing about sync, it would be the following: +If you need to understand a single thing about sync, it would be the following: :::tip Sync in a nutshell -Touitomamout only syncs **the content from the synced account** and only when it's **platform-agnostic**. +Touitomamout only syncs **the content from the synced account** and only when it is **platform-agnostic**. ::: @@ -44,13 +44,13 @@ Meaning for a given synced account @ilovetouitomamout: Here is a detailed view of what is synced or not. -| Sync eligible | Text | Image | Video | Text & Image | Text & Video | Reply | Quote | Retweet | -|------------------------------|:------:|:------:|:------:|:------------:|:------------:|:------:|:------:|:--------:| -| Tweet from synced account | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | -| Tweet from different account | ⛔ | ⛔ | ⛔ | ⛔ | ⛔ | ⛔ | ⛔ | ⛔ | +| Sync eligible | Text | Image | Video | Text & Image | Text & Video | Reply | Quote | Retweet | +|--------------------------------|:------:|:------:|:------:|:------------:|:------------:|:------:|:------:|:--------:| +| Tweet from synced account | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | +| Tweet from a different account | ⛔ | ⛔ | ⛔ | ⛔ | ⛔ | ⛔ | ⛔ | ⛔ | ### Profile synchronization -This process is totally optional and **can be disabled** from the `.env` configuration file. You're able to chose to synce the following items: +This process is totally optional and **can be disabled** from the `.env` configuration file. You're able to chose to sync the following items: 1. 📸 Profile picture 2. 📜 Biography 3. 🌄 Banner @@ -58,6 +58,6 @@ This process is totally optional and **can be disabled** from the `.env` configu ## What does Touitomamout rely on to work? -The project relies on [Twitter Scraper](https://github.com/the-convocation/twitter-scraper) to access the data from Twitter. Since it's not an official way of connecting to Twitter, please take into account the data retrieval can sometimes be slow down or broken. +The project relies on [Twitter Scraper](https://github.com/the-convocation/twitter-scraper) to access the data from Twitter. Since it is not an official way of connecting to Twitter, please take into account the data retrieval can sometimes be slow down or broken. Some filtering & configuration rules are taken into account to output the list of posts to sync. Finally, posts are provided to Mastodon & Bluesky by relying on the [atproto](https://github.com/bluesky-social/atproto) and [masto.js](https://github.com/neet/masto.js) libraries. diff --git a/docs/docs/resources/environment-variables.md b/docs/docs/resources/environment-variables.md index 564b49a..d8200c4 100644 --- a/docs/docs/resources/environment-variables.md +++ b/docs/docs/resources/environment-variables.md @@ -4,8 +4,8 @@ title: Environment variables # Environment variables -In order to configure the application, you have to provide environment variables. You'll find here the list of all the -environment variables by type of usage. `(📌 means the variable is required for the context where it is defined)` +To configure the application, you have to provide environment variables. You'll find here the list of all the +environment variables by usage. `(📌 means the variable is required for the context where it is defined)` ## Core variables diff --git a/docs/docs/resources/storage/auth-system.md b/docs/docs/resources/storage/auth-system.md index c673151..8bf9a80 100644 --- a/docs/docs/resources/storage/auth-system.md +++ b/docs/docs/resources/storage/auth-system.md @@ -3,7 +3,7 @@ title: Auth system --- # Auth system -To prevent Touitomamout to re-authenticate at each run, the application is storing the authentication tokens in a file. +To prevent Touitomamout to re-authenticate at each run, the application stores the authentication tokens in a file. A `Cookies` file is always named with the following naming: `cookies..json`. **Take care of this file!** diff --git a/docs/docs/resources/storage/cache-system.md b/docs/docs/resources/storage/cache-system.md index 77ae370..20d553b 100644 --- a/docs/docs/resources/storage/cache-system.md +++ b/docs/docs/resources/storage/cache-system.md @@ -3,7 +3,7 @@ title: Storage system --- # Cache system -In order to resume the sync process where it stopped, Touitomamout is keeping track of the already synced tweets. This is done by storing the tweet's id in a file. +To resume the sync process where it stopped, Touitomamout keeps track of the already synced tweets. This is done by storing the tweet's id in a file. A `Cache` file is always named with the following naming: `cache..json`. ## Cache file location diff --git a/docs/docs/resources/twitter-authentication.md b/docs/docs/resources/twitter-authentication.md index fcf053b..0e61dba 100644 --- a/docs/docs/resources/twitter-authentication.md +++ b/docs/docs/resources/twitter-authentication.md @@ -4,10 +4,10 @@ title: Twitter autentication # Twitter Authentication -Touitomamout is leveraging the [Twitter Scrapper](https://github.com/the-convocation/twitter-scraper) project to +Touitomamout leverages the [Twitter Scrapper](https://github.com/the-convocation/twitter-scraper) project to retrieve Twitter's data. -Even if you are technically allowed to use by Touitomamout without passing a Twitter username & password, the data we're +Even if you are technically allowed to use by Touitomamout without passing a Twitter username & password, the data we are able to retrieve from it is pretty limited (euphemism). That's why we **_highly_** recommend you to provide twitter credentials. @@ -34,7 +34,7 @@ able to automate its tasks without having to wait for a human to input a code re > The only way to authenticated with Twitter is to provide credentials for an account with 2FA **disabled** -(Tip: sms, google | dashlane | other authenticator apps = **OFF**). +(Tip: sms, google | dashlane | other authenticator apps = **OFF**). ## No guaranty regarding the account you will log in with ❗ @@ -48,5 +48,5 @@ official Twitter webapp. Meaning we can get the data for free as a regular user Since this technique is not official at all nor especially legal, the recommendation is to rely on a secondary account you could accept to lose or get restricted. -Until now (date of writing), no account of the author has been impacted in any way. But we cannot garranty anything, -let's be cautious +Until now (date of writing), no account of the author has been impacted in any way. But we can't guarantee anything, +let's be cautious. diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index b73ea0a..64f2ae6 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -20,7 +20,7 @@ const config = { // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. projectName: 'louisgrasset.github.io', // Usually your repo name. - organizationName: 'louisgrasset', // Usually your GitHub org/user name. + organizationName: 'louisgrasset', // Usually your GitHub org name / username. trailingSlash: false, diff --git a/src/helpers/medias/parse-blob-for-bluesky.ts b/src/helpers/medias/parse-blob-for-bluesky.ts index 6fec102..8d28ccb 100644 --- a/src/helpers/medias/parse-blob-for-bluesky.ts +++ b/src/helpers/medias/parse-blob-for-bluesky.ts @@ -4,7 +4,7 @@ interface BlueskyBlob { } /** - * An async method to convert a Blob to an upload-compatible Bluesky Blob + * An async method to convert a Blob to an upload-compatible Bluesky Blob. * @returns BlueskyBlob */ export const parseBlobForBluesky = async (blob: Blob): Promise => { diff --git a/src/index.ts b/src/index.ts index bf8d824..50e9d7f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -38,7 +38,7 @@ const touitomamout = async () => { await touitomamout(); if(DAEMON){ - console.log(`Run dameon every ${DAEMON_PERIOD_MIN}min`); + console.log(`Run daemon every ${DAEMON_PERIOD_MIN}min`); setInterval(async () => { await touitomamout(); }, DAEMON_PERIOD_MIN * 60 * 1000); diff --git a/src/services/bluesky-sender.service.ts b/src/services/bluesky-sender.service.ts index 9a8843b..ad848fe 100644 --- a/src/services/bluesky-sender.service.ts +++ b/src/services/bluesky-sender.service.ts @@ -13,7 +13,7 @@ import { mediaDownloaderService } from './index.js'; const MASTODON_MEDIA_IMAGES_MAX_COUNT = 4; /** - * An async method in charge of handling Bluesky posts computation & uploading + * An async method in charge of handling Bluesky posts computation & uploading. */ export const blueskySenderService = async (client: BskyAgent | null, post: BlueskyPost | null, medias: Media[], log: Ora) => { if(!client || !post) { @@ -57,7 +57,7 @@ export const blueskySenderService = async (client: BskyAgent | null, post: Blues } } - // When no compatible media has been found and no text is present, skip the post + // When no compatible media has been found and no text is present, skip the post. if(!mediaAttachments.length && !post.tweet.text) { log.warn(`☁️ | post skipped: no compatible media nor text to post (tweet: ${post.tweet.id})`); return; diff --git a/src/services/mastodon-sender.service.ts b/src/services/mastodon-sender.service.ts index 5a27611..d927950 100644 --- a/src/services/mastodon-sender.service.ts +++ b/src/services/mastodon-sender.service.ts @@ -12,7 +12,7 @@ import { mediaDownloaderService } from './index.js'; const BLUESKY_MEDIA_IMAGES_MAX_COUNT = 4; /** - * An async method in charge of handling Mastodon posts computation & uploading + * An async method in charge of handling Mastodon posts computation & uploading. */ export const mastodonSenderService = async (client: mastodon.rest.Client | null, post: MastodonPost | null, medias: Media[], log: Ora) => { if (!client || !post) { @@ -49,7 +49,7 @@ export const mastodonSenderService = async (client: mastodon.rest.Client | null, } } - // When no compatible media has been found and no text is present, skip the post + // When no compatible media has been found and no text is present, skip the post. if (!mediaAttachments.length && !post.tweet.text) { log.warn(`🦣️ | post skipped: no compatible media nor text to post (tweet: ${post.tweet.id})`); return; diff --git a/src/services/posts-synchronizer.service.ts b/src/services/posts-synchronizer.service.ts index d72f726..6c92110 100644 --- a/src/services/posts-synchronizer.service.ts +++ b/src/services/posts-synchronizer.service.ts @@ -13,7 +13,7 @@ import { tweetsGetterService } from './index.js'; import { mastodonSenderService } from './mastodon-sender.service.js'; /** - * An async method in charge of dispatching posts synchronization tasks for each received tweets + * An async method in charge of dispatching posts synchronization tasks for each received tweets. */ export const postsSynchronizerService = async (twitterClient: Scraper, mastodonClient: mastodon.rest.Client | null, blueskyClient: BskyAgent | null, synchronizedPostsCountThisRun: Counter.default): Promise => { const tweets = await tweetsGetterService(twitterClient); diff --git a/src/services/profile-synchronizer.service.ts b/src/services/profile-synchronizer.service.ts index c49a6d5..4a75f27 100644 --- a/src/services/profile-synchronizer.service.ts +++ b/src/services/profile-synchronizer.service.ts @@ -17,7 +17,7 @@ import { Platform, SynchronizerResponse } from '../types/index.js'; import { mediaDownloaderService } from './index.js'; /** - * An async method in charge of dispatching profile synchronization tasks + * An async method in charge of dispatching profile synchronization tasks. */ export const profileSynchronizerService = async (twitterClient: Scraper, mastodonClient: mastodon.rest.Client | null, blueskyClient: BskyAgent | null): Promise => { const log = ora({ color: 'cyan', prefixText: oraPrefixer('profile-sync') }).start();