notes-to-strapi-export-article-ai 1.0.80 → 1.0.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -26,7 +26,7 @@ Strapi Exporter is a game-changing Obsidian plugin that streamlines your content
26
26
  4. Move the `main.js` file & `manifest.json` to your Obsidian plugins folder (usually located at `<vault>/.obsidian/plugins/`).
27
27
  5. Restart Obsidian
28
28
  6. Enable the plugin in Obsidian's settings under "Community plugins".
29
- 7. Configure the necessary settings (see the Configuration section below).
29
+ 7. Configure the necessary settings (see the Configuration section below).
30
30
  8. Enjoy!
31
31
 
32
32
  ### For developers:
@@ -40,120 +40,144 @@ To install Strapi Exporter, follow these steps (coming soon to the Obsidian plug
40
40
  5. Enable the plugin in Obsidian's settings under "Community plugins".
41
41
  6. Configure the necessary settings (see the Configuration section below).
42
42
 
43
+ ### To contribute or debug
44
+
45
+ 1. Install the plugin in a new fresh vault
46
+ 2. Go in community plugin (parameters -> community plugins)
47
+ 3. Install a random plugin, and enable plugin
48
+ 4. Go in the plugin folder in your obsidian folder vault (.obisian/plugins)
49
+ 5. Clone the repo there, and enable the plugin
50
+ 6. Don't forgot to install the plugin https://github.com/pjeby/hot-reload/ too
51
+ 7. (Download the zip, and extract the folder in /plugins folder)
52
+ 8. Enable both plugins
53
+ 9. Press ctrl + shift + i to enable the dev console
54
+ 10. Go in hotkeys configuration, search "reload" and enable the hotkey "Reload app without saving". (with ctrl+r)
55
+ 11. Close & Reopen // ctrl + r your vault
56
+ 12. Go in the plugin folder & run "npm run dev"
57
+
43
58
  ## ⚙️ Configuration
44
59
 
45
60
  To get started with Strapi Exporter, you'll need to configure the following settings:
46
61
 
47
62
  - **Strapi URL**: The URL of your Strapi instance (e.g., `https://your-strapi-url`).
48
- ![img.png](images/img.png)
63
+ ![img.png](images/img.png)
49
64
  - **Strapi API Token**: Your Strapi API token for authentication. You can create an API token in your Strapi admin panel under "Settings" > "API Tokens".
50
- ![img_1.png](images/img_1.png)
51
- ![img_2.png](images/img_2.png)
65
+ ![img_1.png](images/img_1.png)
66
+ ![img_2.png](images/img_2.png)
52
67
  - You need, at least, to have the following permissions:
53
68
  - article: create
54
69
  - upload: create
55
70
  - (you can also add full permissions, but it's not really recommended for security reasons)
56
- ![img_3.png](images/img_3.png)
71
+ ![img_3.png](images/img_3.png)
57
72
  - (the token in the screenshot is not valid, don't try to use it 😌)
58
73
  - **OpenAI API Key**: Your OpenAI API key for using GPT-3 to generate SEO-friendly content. You can get your API key from the [OpenAI website](https://platform.openai.com/account/api-keys).
59
- ![img_4.png](images/img_4.png)
74
+ ![img_4.png](images/img_4.png)
60
75
  - this key is needed to use the GPT-3 API, which is used to generate the content of the article
61
76
  - (it need to access to "Model capabilities" with "write" permission)
62
- ![img_5.png](images/img_5.png)
77
+ ![img_5.png](images/img_5.png)
63
78
  - (or with the "all" permission)
64
79
  - **JSON Template**: The JSON template for the article fields in Strapi. Customize this according to your Strapi content type structure. You can find the JSON template in your Strapi API documentation (Swagger).
65
- ![img_6.png](images/img_6.png)
80
+ ![img_6.png](images/img_6.png)
66
81
  - to get the JSON template, you can go to the documentation of your Strapi API, and copy the JSON template of the article creation
67
- - it should look like this: ``https://{api_url}/documentation/v1.0.0``
82
+ - it should look like this: `https://{api_url}/documentation/v1.0.0`
68
83
  - then, go to the article creation, and copy the JSON template
69
- ![img_7.png](images/img_7.png)
70
- ![img_8.png](images/img_8.png)
84
+ ![img_7.png](images/img_7.png)
85
+ ![img_8.png](images/img_8.png)
71
86
  - it should look like this for example:
87
+
72
88
  ```json
73
89
  {
74
- "data": {
75
- "title": "string",
76
- "seo_title": "string",
77
- "seo_description": "string",
78
- "slug": "string",
79
- "excerpt": "string",
80
- "links": [
81
- {
82
- "id": "number",
83
- "label": "string",
84
- "url": "string"
85
- }
86
- ],
87
- "subtitle": "string",
88
- "type": "string",
89
- "rank": "number",
90
- "tags": [
91
- {
92
- "id": "number",
93
- "name": "string"
94
- }
95
- ],
96
- "locale": "string"
97
- }
90
+ "data": {
91
+ "title": "string",
92
+ "seo_title": "string",
93
+ "seo_description": "string",
94
+ "slug": "string",
95
+ "excerpt": "string",
96
+ "links": [
97
+ {
98
+ "id": "number",
99
+ "label": "string",
100
+ "url": "string"
101
+ }
102
+ ],
103
+ "subtitle": "string",
104
+ "type": "string",
105
+ "rank": "number",
106
+ "tags": [
107
+ {
108
+ "id": "number",
109
+ "name": "string"
110
+ }
111
+ ],
112
+ "locale": "string"
113
+ }
98
114
  }
99
115
  ```
116
+
100
117
  - then, you can copy this JSON template in the settings of the plugin
101
118
  - and copy that, to describe each field in the other JSON description setting
102
119
  - **JSON Template Description**: A description for each field in the JSON template to help GPT-3 understand the structure. Follow the same schema as the JSON template to provide descriptions for each field.
120
+
103
121
  ```json
104
122
  {
105
- "data": {
106
- "title": "<Title of the item, as a short string>",
107
- "seo_title": "<SEO optimized title, as a short string>",
108
- "seo_description": "<SEO optimized description, as a short string>",
109
- "slug": "<URL-friendly string derived from the title>",
110
- "excerpt": "<A short preview or snippet from the content>",
111
- "links": [
112
- {
113
- "id": "<Unique identifier for the link, as a number>",
114
- "label": "<Display text for the link, as a short string>",
115
- "url": "<URL the link points to, as a string>"
116
- }
117
- ],
118
- "subtitle": "<Subtitle or secondary title, as a short string>",
119
- "type": "<Category or type of the item, as a short string>",
120
- "rank": "<Numerical ranking or order priority, as a number>",
121
- "tags": [
122
- {
123
- "id": "<Unique identifier for the tag, as a number>",
124
- "name": "<Name of the tag, as a short string>"
125
- }
126
- ],
127
- "locale": "<Locale or language code, as a short string>"
128
- }
123
+ "data": {
124
+ "title": "<Title of the item, as a short string>",
125
+ "seo_title": "<SEO optimized title, as a short string>",
126
+ "seo_description": "<SEO optimized description, as a short string>",
127
+ "slug": "<URL-friendly string derived from the title>",
128
+ "excerpt": "<A short preview or snippet from the content>",
129
+ "links": [
130
+ {
131
+ "id": "<Unique identifier for the link, as a number>",
132
+ "label": "<Display text for the link, as a short string>",
133
+ "url": "<URL the link points to, as a string>"
134
+ }
135
+ ],
136
+ "subtitle": "<Subtitle or secondary title, as a short string>",
137
+ "type": "<Category or type of the item, as a short string>",
138
+ "rank": "<Numerical ranking or order priority, as a number>",
139
+ "tags": [
140
+ {
141
+ "id": "<Unique identifier for the tag, as a number>",
142
+ "name": "<Name of the tag, as a short string>"
143
+ }
144
+ ],
145
+ "locale": "<Locale or language code, as a short string>"
146
+ }
129
147
  }
130
148
  ```
149
+
131
150
  ```
132
151
  ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
133
152
  ⚠️
134
- ⚠️ **Important:** Remove the `content` (or the attribute name that correspond to the main content of the article)
153
+ ⚠️ **Important:** Remove the `content` (or the attribute name that correspond to the main content of the article)
135
154
  ⚠️ field from the JSON template and specify it separately in the "Strapi Content Attribute Name" setting.
136
155
  ⚠️ ( i do that to avoid changes on the main content by chat gpt )
137
156
  ⚠️
138
157
  ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
139
158
  ```
159
+
140
160
  - **Strapi Article Create URL**: The URL to create articles in Strapi (e.g., `https://your-strapi-url/api/articles`).
141
161
  - to get the URL, you can go to the documentation of your Strapi API, and copy the URL of the article creation
142
- - it should look like this: ``https://{api_url}/documentation/v1.0.0``
162
+ - it should look like this: `https://{api_url}/documentation/v1.0.0`
143
163
  - then, go to the article creation, and copy the URL
144
- - **Strapi Content Attribute Name**: The attribute name for the content field in Strapi (e.g., `content`).
164
+ - **Strapi Content Attribute Name**: The attribute name for the content field in Strapi (e.g., `content`).
145
165
  - to get the attribute name, you can go to the documentation of your Strapi API, and copy the attribute name of the article creation, (it need to be the name of the attribute that contain the main content of the article, for me it's "content", but it can be different for you)
146
166
  - **Additional Prompt** (optional): Additional prompt to provide context for GPT-3 when generating content. You can use this field to specify additional information or instructions for the AI model. Like your langage, the tone of the article, etc.
147
167
 
148
168
  ### Image Settings (main), optional
169
+
149
170
  - **Enable Additional Call API Image**: Toggle this option to enable the image feature for the additional API route. The plugin will look for an image in the `image` folder next to your article file and upload it to Strapi.
150
171
  - **Additional Call API Image Full Path Property**: Specify the full path to the image property for the additional API route in your Strapi API (e.g., `image_presentation`).
151
172
 
152
173
  - **Enable Additional Call API Gallery**: Toggle this option to enable the gallery feature for the additional API route. The plugin will look for images in the `gallery` folder next to your article file and upload them to Strapi.
153
174
  - **Additional Call API Gallery Full Path Property**: Specify the full path to the gallery property for the additional API route in your Strapi API (e.g., `gallery`).
154
- -
175
+ -
176
+
155
177
  ### Additional API Route Settings
178
+
156
179
  ⚠️ Warning: When enabling the additional API route feature, you'll need to restart Obsidian to see the additional button in the ribbon menu.
180
+
157
181
  - **Enable Additional Call API**: Toggle this option to enable the additional API route feature. This will display a new icon in the ribbon menu for creating content in a different Strapi content type.
158
182
  - **Additional JSON Template**: Enter the JSON template for the fields needed for the additional API route.
159
183
  - **Additional API JSON Template Description**: Enter the description for each field in the additional API JSON template.
@@ -161,6 +185,7 @@ To get started with Strapi Exporter, you'll need to configure the following sett
161
185
  - **Additional API Content Attribute Name**: Enter the attribute name for the content field for the additional API route.
162
186
 
163
187
  ### Image Settings (additional), optional
188
+
164
189
  - **Enable Additional Call API Image**: Toggle this option to enable the image feature for the additional API route. The plugin will look for an image in the `image` folder next to your article file and upload it to Strapi.
165
190
  - **Additional Call API Image Full Path Property**: Specify the full path to the image property for the additional API route in your Strapi API (e.g., `image_presentation`).
166
191
 
@@ -171,12 +196,12 @@ To get started with Strapi Exporter, you'll need to configure the following sett
171
196
 
172
197
  1. Open a Markdown file in Obsidian.
173
198
  2. Click on the plugin's ribbon icon to start the magic.
174
- ![img_9.png](images/img_9.png)
199
+ ![img_9.png](images/img_9.png)
175
200
  3. Sit back and relax while Strapi Exporter does the heavy lifting:
176
- - 🖼️ Extracting and uploading images to Strapi
177
- - 🎨 Generating SEO-friendly alt text and captions for images
178
- - 📝 Creating SEO-optimized article content based on your notes
179
- - 🌐 Publishing the article to Strapi with the generated content and images
201
+ - 🖼️ Extracting and uploading images to Strapi
202
+ - 🎨 Generating SEO-friendly alt text and captions for images
203
+ - 📝 Creating SEO-optimized article content based on your notes
204
+ - 🌐 Publishing the article to Strapi with the generated content and images
180
205
  4. Enjoy your freshly exported article in Strapi!
181
206
 
182
207
  For the plugin to detect images and galleries, ensure the following folder structure:
@@ -187,7 +212,6 @@ For the plugin to detect images and galleries, ensure the following folder struc
187
212
 
188
213
  The plugin will detect images in the `image` and `gallery` folders and upload them to Strapi.
189
214
 
190
-
191
215
  ## 🤝 Contributing
192
216
 
193
217
  We welcome contributions from the community! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request. Let's make Strapi Exporter even better together!
@@ -199,4 +223,3 @@ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file
199
223
  ---
200
224
 
201
225
  🌟 Elevate your content workflow with Strapi Exporter and unleash the full potential of your Obsidian notes! 🌟
202
-
package/manifest.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "notes-to-strapi-export-article-ai",
3
3
  "name": "Strapi Exporter AI",
4
- "version": "1.0.80",
4
+ "version": "1.0.81",
5
5
  "minAppVersion": "1.5.0",
6
6
  "description": "Effortlessly export your notes to Strapi CMS with AI-powered handling and SEO optimization.",
7
7
  "author": "Cinquin Andy",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notes-to-strapi-export-article-ai",
3
- "version": "1.0.80",
3
+ "version": "1.0.81",
4
4
  "description": "Effortlessly export your Obsidian notes to Strapi CMS with AI-powered image handling and SEO optimization. Replace all the images in your notes by uploaded images in Strapi, and add SEO metadata to uploaded images.",
5
5
  "main": "main.js",
6
6
  "scripts": {
package/versions.json CHANGED
@@ -76,5 +76,6 @@
76
76
  "1.0.77": "1.5.0",
77
77
  "1.0.78": "1.5.0",
78
78
  "1.0.79": "1.5.0",
79
- "1.0.80": "1.5.0"
79
+ "1.0.80": "1.5.0",
80
+ "1.0.81": "1.5.0"
80
81
  }