tags where appropriate
- Write in a first-person plural format (we, us, our, ours)
- Include and naturally incorporate as many of these keywords: {keywords_array}
- Include these key phrases: {keyphrases}
- Write in the language of keywords/keywords if keywords/phrases are not in English
- Mandatorily Localize the content if location names are available in keywords.
- Base Farmonaut-specific information solely on this context: {farmonaut_info}
- Do not include case studies, success stories, or any hallucinated information about Farmonaut
- Add all the images from this JSON object: {post_data['media']} with border-radius:16px, box-shadow: 10px 10px 15px, cursor: pointer. These images should open https://farmonaut.com/app_redirect when clicked. All images should be placed within 75% content of the blog.
- Embed the playable Youtube videos available in the format [('video_title', 'video_id')]: {suggested_videos}. Create the full Youtube video url: https://youtube.com/watch?v=video_id from the video_id. Uniformly add these videos within top 75% content of the blog. width: 100%, height: 500px, border-radius: 16px, box-shadow: 10px 10px 15px .
- Add a beautifully formatted table based on this context: {table_info}
- Add these trivias at the top and middle of the blog post:{trivias}. Make the trivia text bold, italic, within double-quotes, font-size: 50px, line-height: 50px, color: #034d5c
- Add links:
- App Button Image: https://farmonaut.com/Images/web_app_button.png, Link on this button: https://farmonaut.com/app_redirect, height: 80px
- API: https://sat.farmonaut.com/api
- API Developer Docs:https://farmonaut.com/farmonaut-satellite-weather-api-developer-docs/
- Android App Button Image: https://farmonaut.com/wp-content/uploads/2020/01/get_it_on_google_play.png, Link on this Button: https://play.google.com/store/apps/details?id=com.farmonaut.android, height: 80px
- iOS App Button Image: https://farmonaut.com/wp-content/uploads/2020/01/available_on_app_store.png, Link on this Button: https://apps.apple.com/in/app/farmonaut/id1489095847, height: 80px
- Distribute these links within top 75% content of the blog with bold font
- Add this custom HTML for Farmonaut subscriptions: {stripe_html}
- Add an FAQ section
- Use bullet points and subheadings (font color: #034d5c) to improve readability
- Make the content mobile responsive
Additional guidelines:
- Do not mention any partnership or collaboration of any sort with anyone in the blog
- Achieve Flesch Reading Ease Score of at least 60
- Provide detailed explanations and examples
- Ensure all content is factual and based on provided information
- Organize information logically with clear transitions between sections
- Use varied sentence structures and vocabulary for engaging reading
- Farmonaut is not an a. online marketplace, b. manufacturer/seller of farm inputs, farm machineries, c. a regulatory body. Keep this in mind while writing the summary
- Far
- Mandatorily implement all the latest SEO guidelines provided by Yoast SEO: {yoast_guidelines2}
Please generate the blog post based on these requirements, ensuring it's well-structured, and atleast 3500 words long.'''
#prompt = f"Generate a HTML formatted very detailed and comprehensive blog post of at least 5000 words with , , blocks wherever necessary in informational tone and as a first-person plural (we, us, our, ours) mandatorily including the following keywords: {keywords_array}. Mandatorily included these keyphrases as well: {keyphrases} \n\n. Don't include the title in the blog content. The blog needs to be at least 5000 words in length. If the keywords, keyphrases, title, context are in a language different than English, write the blog in that particular language only. Please don't include any hallucinated information about Farmonaut in the blog. It is strictly prohibited to include any case study or success story in the blog. To add any more details in the blog related to Farmonaut, use information from this text and further elaborate on it if necessary: {farmonaut_info} \n\n Strictly Incorporate these keywords into the blog: {keywords_array}. If any of the keywords look unrelated and out of context to the blog, then don't add them to the blog. Add Images (URLs) from this JSON object {post_data['media']} into the blog in blocks wherever necessary including the absolute top of the blog. Include the table in the blog using this context: {table_info}. Add links to https://farmonaut.com/app_redirect, https://sat.farmonaut.com/api, https://play.google.com/store/apps/details?id=com.farmonaut.android, https://apps.apple.com/in/app/farmonaut/id1489095847, https://farmonaut.com/farmonaut-satellite-weather-api-developer-docs/ wherever necessary. Include this custom HTML code for subscribing to Farmonaut: {stripe_html} \n Add bullet points and subheadings wherever necessary. Please include an FAQ section as well. The output should not have any other text apart from the content of the blog."
blog_content = call_genai(prompt, 1, 8000)
# print(blog_content)
category_ids = "south-america: 580, asia: 579, africa:578, united-kingdom: 577, canada: 576, europe: 575, australia: 574, blogs: 5, news:573, case_study:546, area_estimation:542, remote_sensing:9, precision_farming:548, api_development:572, usa:561"
prompt = f'Based upon this title: {title}, and caption: {caption} , identify the best category id in which this title fits in: {category_ids}. Strictly only return the integer value as the response'
category_id = call_genai(prompt, 0, 5)
try:
category_id = int(category_id)
except:
category_id = 5
#publish_to_wordpress(title, blog_content, post_data['media'], post_data['caption'], category_id)
post_data['title'] = title
post_data['content'] = blog_content
post_data['status'] = 'publish'
post_data['excerpt'] = caption
post_data['comment_status'] = 'open'
post_data['categories'] = [category_id]
prompt = f"Can you convert this text into a url slug. Don't output any other text. Text to convert to url slug: {title}"
slug = call_genai(prompt,0, 500)
try:
schema_media = [post_data['media'][0]['url'], post_data['media'][1]['url']]
# print(schema_media)
except:
print(traceback.format_exc())
schema_media = media_url_arr
structured_schema_script = (f'')
#print(structured_schema_script)
post_data["content"] = structured_schema_script + blog_content
publish_or_update_wordpress_post(wp_url, wp_username, wp_password, post_data)
save_to_file('posts_done.txt', str(done_posts))
time.sleep(interval)
except:
print(traceback.format_exc())
time.sleep(70)
remove_all_files_in_folder('insta_files')
# delete_files.delete_files_and_empty_folders()
# delete_files.delete_files_from_paths()
except:
time.sleep(10)
print(traceback.format_exc())
#time.sleep(24*60*60)
main()
,
, , ,
,
,
,