Skip to content

Commit 32a150f

Browse files
committed
Rewritten
1 parent 4fddc71 commit 32a150f

File tree

2 files changed

+42
-50
lines changed

2 files changed

+42
-50
lines changed

readme.md

Lines changed: 42 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ TootPress copies your toots from Mastodon to WordPress continuously.
44

55
## Description
66

7-
The plugin copies your toots from Mastodon continuously and saves them into the WordPress database. The toots can be displayed on the blog chronologically (but do not have to). Indeed, Mastodon is also blogging, micro-blogging so to speak.
7+
TootPress brings your data back and copies your toots from Mastodon to WordPress continuously. The toots will be saved in the WordPress database and can be displayed on the blog chronologically (but do not have to). Indeed, Mastodon is also blogging, micro-blogging so to speak.
88

99
## Functions
1010

@@ -16,32 +16,41 @@ The plugin copies your toots from Mastodon continuously and saves them into the
1616

1717
## Installation
1818

19-
1. Download the plugin from the GitHub Repository (see Releases)
20-
2. Rename the folder to "tootpress"
21-
2. Upload the plugin to the WordPress Plugin Directory
19+
1. Download the plugin from the GitHub Repository (see latest Release)
20+
2. Rename the downloaded folder to "tootpress"
21+
2. Upload the folder to the WordPress Plugin Directory
2222
3. Activate the plugin in WordPress
2323
4. Follow the configuration manual
2424

2525
## Configuration
2626

27-
1. Create an Application on your Mastodon Instance for API Access (Account Settings/Applications)
28-
2. Restrict the Authorization of the Application to Read (all data)
27+
1. Create an Application on your Mastodon Instance to get API Access (under Settings/Development)
28+
2. Restrict the Authorization of the created Application to Read (all data)
2929
3. Maintain Mastodon Instance and Access Token in the TootPress Settings
30-
4. Retrieve your Account ID (WordPress Tools/Toots)
30+
4. Retrieve your Account ID (in WordPress under Tools/Toots)
3131
5. Maintain the Account ID in the TootPress Settings
32-
6. Create a new WordPress Page and add the Page to your Main Menu
33-
7. Maintain the Page ID in the TootPress Settings (see URL editing the Page)
34-
8. Run Mastodon API Request once (WordPress Tools/Toots)
32+
6. Create a new WordPress Page and add the Page to your Menu
33+
7. Maintain the Page ID in the TootPress Settings (you find the Page ID in URL of the Browser when editing the Page in WordPress)
34+
8. Run Mastodon API Request once (in WordPress under Tools/Toots)
3535
9. Activate Steady Fetch
3636
10. That's it!
3737

38-
## CSS classes
38+
## Instructions for Use
3939

40-
TootPress comes with basic CSS Styles. For best fit it is required to add additional styles in your theme. All TootPress UI elements can be addressed with individual CSS selectors. Please use browser debugger to find the right classes.
40+
* You find TootPress in WordPress in the area of Settings and Tools
41+
* Steady Fetch activates the automatic and regular load of new toots
42+
* First API Request will copy your last 40 toots
43+
* New toots will be loaded every 15 minutes (customizable)
44+
* You can load your complete timeline into WordPress with the eponymous function
45+
* Loading your complete timeline can take several hours depending of the amount of toots
46+
* 480 toots are loaded per hour as maximum
47+
* You can run a Mastodon API Request everytime at your own with the eponymous function
48+
* There is no prescribed order for the execution of Steady Fetch, Complete Timeline or manual requests
49+
* If problems occur, TootPress provides a Healthy Check
4150

42-
## TootPress API
51+
## CSS classes
4352

44-
WordPress Action: tootpress_toots_update (fired on toot update)
53+
TootPress comes with basic CSS Styles. For best fit it is required to add additional styles in your theme. All TootPress UI elements can be addressed with individual CSS selectors. Please use the browser development tools to find the right classes.
4554

4655
## Data & Files
4756

@@ -71,14 +80,18 @@ Following toot objects are not supported.
7180
* Emojis
7281
* Teaser
7382

74-
## Not supported Toot Types
83+
## Excluded Toot Types
7584

76-
Following toot types are not supported.
85+
Following toot types are excluded from the data transfer.
7786

7887
* Boosts
7988
* Replys
8089
* Private Toots
8190

91+
## TootPress API
92+
93+
WordPress Action: tootpress_toots_update (fired on toot update)
94+
8295
## TootPress Cron Jobs @ WordPress
8396

8497
* Steady Fetch (every 15 minutes, customizable)
@@ -96,59 +109,38 @@ Following components of WordPress are used in TootPress.
96109
* Date Functions
97110
* MySQL Functions
98111
* URL Functions
99-
* WordPress Functions
100112
* File Functions
113+
* Content Functions
101114

102115
## Frequently Asked Questions
103116

104-
### Which Toots are displayed in the blog?
105-
106-
Only your own toots will be displayed. Boosts (these are not your toots), Replys (these are communication, no micro-posts) and private Toots are excluded.
107-
108-
### Can the toots be loaded automaticly?
109-
110-
Yes. Activate Steady Fetch for this.
111-
112-
### How many toots will be loaded with an API Request?
117+
### Why are boosts, replys and private toots not supported?
113118

114-
40 toots at maximum.
115-
116-
### How often will the toots be loaded?
117-
118-
As Standard your toots will be fetched from Mastodon every 15 minutes. But you can define the period in minutes different in the plugin settings.
119-
120-
### Can I load my complete Mastodon timeline?
121-
122-
Yes. You can load your complete Mastodon timeline with this plugin. Just run the corresponding function. The Load will take some time. Every 5 minutes 40 toots will be loaded until the timeline is complete.
123-
124-
### What do I have to do first, activate steady fetch or load the complete timeline first?
125-
126-
All the same. It works both.
119+
Boosts are not your toots. Replys are communication, but not micro-posts. Private Toots should stay private.
127120

128121
### How does TootPress handle the canonical URL?
129122

130-
TootPress does not modify the existing canonical url handling in WordPress. If you want to change the canonical url, you must control that with a SEO plugin. This is relevant for the paged TootPress subpages.
123+
TootPress does not modify the existing canonical url handling in WordPress. If you want to create a unique canonical url for each TootPress subpage, you must control that with a SEO plugin. This becomes relevant when your toots must be distributed over several pages and the plugin starts the paging process.
131124

132125
### What have to be considered with the usage of caching plugins?
133126

134-
The length of the cron period in combination with the configuration of caching determines how early a toot will be displayed within the blog. If a toot should be displayed as early as possible, the caching must be deactivated for the page including the toots. Another possibility is removing the affected page from the cache, if new toots have been loaded. For this, a WordPress Action is fired by the plugin (see above).
135-
136-
### Why require some updates a reset of the plugin and reload of the data?
137-
138-
The plugin does still not have a high maturity grade. It is in a early stage of development. To avoid data inconsistency and process errors some updates require a reload of the data.
127+
The length of the cron period in combination with the configuration of caching determines how early a toot will be displayed within the blog. If a toot should be displayed as early as possible, the caching must be deactivated for the page containing the toots. Another possibility is removing the affected page from the cache, if new toots have been loaded. For this, a WordPress Action is fired by the plugin.
139128

140129
### Does TootPress support WordPress Multisite?
141130

142131
No. TootPress does not support the WordPress Multisite Feature. The plugin is working on the master-site, but is not working on all other child sites within the wordpress network.
143132

144-
### Can TootPress load toots from several Mastodon instances?
145-
146-
No.
147-
148133
## Live Demo
149134

150135
[Here!](https://www.unmus.de/troets/)
151136

137+
## Maturity Grade
138+
139+
* Low maturity level
140+
* Early stage of development
141+
* Future updates may require a complete reload of the toots.
142+
* To avoid data inconsistancy and process errors
143+
152144
## Branches
153145

154146
This repository follows the git-flow workflow to a large extent.
@@ -163,6 +155,7 @@ Hotfix and release branches will not be applied.
163155
## Built With
164156

165157
* [Visual Studio Code](https://code.visualstudio.com)
158+
* [Postman](https://postman.com)
166159
* [JSON Viewer](https://jsonviewer.app)
167160

168161
## License

tootpress_api.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ function tootpress_create_query_param_get_account_statuses($direction) {
5454
// Request Mastodon API forwards
5555
} elseif($direction=='forwards') {
5656

57-
5857
$since_id=tootpress_get_latest_toot();
5958

6059
if($since_id) {

0 commit comments

Comments
 (0)