WordpressNewsLoader

所属分类:建站系统
开发工具:C#
文件大小:0KB
下载次数:0
上传日期:2023-08-29 13:09:07
上 传 者sh-1993
说明:  Console实用程序加载WordPress站点的最后一条新闻的预览,
(Console utility to load the previews of the last news from the WordPress sites,)

文件列表:
NewsLoader.sln (1338, 2023-09-13)
NewsLoader/ (0, 2023-09-13)
NewsLoader/ApiReader.cs (921, 2023-09-13)
NewsLoader/FileSaver.cs (637, 2023-09-13)
NewsLoader/Models/ (0, 2023-09-13)
NewsLoader/Models/MimResponse.cs (707, 2023-09-13)
NewsLoader/Models/NewsformatProfile.cs (401, 2023-09-13)
NewsLoader/Models/SourceConfig.cs (163, 2023-09-13)
NewsLoader/MyLogger.cs (250, 2023-09-13)
NewsLoader/NewsLoader.csproj (1548, 2023-09-13)
NewsLoader/Program.cs (1586, 2023-09-13)
NewsLoader/Properties/ (0, 2023-09-13)
NewsLoader/Properties/launchSettings.json (169, 2023-09-13)
NewsLoader/appsettings.dev.json (151, 2023-09-13)
NewsLoader/appsettings.json (151, 2023-09-13)
NewsLoader/datasources.json (239, 2023-09-13)
NewsLoader/nlog.config (959, 2023-09-13)

# Wordpress NewsLoader ## Summary The console utility to load the previews of the last news from the Wordpress sites. It makes requests to a WordPress site and saves the data in the JSON file. It's good to use if you want to show the previews of the news on external site or if you just want to decrease the quantity of the API or DB Requests. You can easily load the full content of the posts from WordPress site The example of the result JSON ```json [ { "id": 1232, "date": "2023-08-21T08:17:39", "status": "publish", "title": "C# method to create a UNC directory recursively and return the path", "excerpt": "

I will write down the useful method. I used it several times and it works good. It’s C# method to create a UNC directory recursively and return the path.

\n" } ] ``` in the 'datasource.json' file you can set multiple resources for downloading the content and filenames to store the data respectively. ```json [ { "Url": "https://markimarta.com/wp-json/wp/v2/posts", "StorePath": "c:\\Temp\\mimnews.json" }, { "Url": "https://markimarta.ru/wp-json/wp/v2/posts", "StorePath": "c:\\Temp\\mimrunews.json" } ] ``` ## Prerequisites - AutoMapper 12.0.1 - AutoMapper.Extensions.Microsoft.DependencyInjection 12.0.1 - Microsoft.NETCore.App 6.0.16 - Microsoft.Extensions.Configuration 7.0.0 - Microsoft.Extensions.Configuration.Json 7.0.0 - Microsoft.Extensions.DependencyInjection 7.0.0 - NLog 5.2.3 - Newtonsoft.Json 13.0.3 - RestSharp 110.2.0 ## Solution | Solution | Author(s) | | ----------- | ------------------------------------------------------------- | | NewsLoader | Aleksei Beliaev, https://www.linkedin.com/in/aleksei-beliaev/ | ## Version history | Version | Date | Comments | | ------- | ------------------- | ----------------- | | 1.2.2 | September 14, 2023 | Full Url added | | 1.2.1 | September 11, 2023 | Dev / prod config | | 1.2 | August 29, 2023 | Multiple load | | 1.1 | August 28, 2023 | JSON simplified | | 1.0 | August 25, 2023 | Initial release | ## Minimal Path to Awesome - Clone this repository - Ensure that you are at the solution folder - update the values in 'appsettings.json' - remote url and where to store text data - update the log-file location in nlog.config - compile and execute

近期下载者

相关文件


收藏者