• Stars
    star
    166
  • Rank 219,818 (Top 5 %)
  • Language
    C#
  • License
    MIT License
  • Created almost 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

博客园文章快捷发布工具

dotNet 博客园工具

一.前言

此工具解决的痛点是在本地编辑的 Markdown 文件里包含的图片,在博客园发布时,需要手动一张张的复制到博客园的编辑器中上传,十分麻烦,此文中有详细说明:如何高效的编写与同步博客 (.NET Core 小工具实现)

二.安装工具

(1)具有 .NET Core/.NET 5 环境可以直接使用命令安装:

dotnet tool install --global dotnet-cnblog

(2)如果没有上面的环境,那么可以直接下载二进制文件

下载地址: https://github.com/stulzq/dotnet-cnblogs-tool/releases

因为本工具是开源的,而且使用过程中需要输入 Token,所以不要相信任何第三方下载,因为它们有可能被植入恶意代码,仅提供上面两种方式。

三.使用

第一次运行需要配置博客ID,账号、Token等,按照提示输入即可,对密码采用tea加密算法进行加密存储。

需要账号、Token 是因为调用 MetaWeblog API 需要此信息

Token 申请:https://i.cnblogs.com/settings

image

2022.6.29 更新,请使用 MetaWeblog Token 替换原来的账户密码!!!

重置配置

使用下面的命令重置配置:

dotnet-cnblog reset

四.上传图片

对Markdown文件里的图片进行解析,上传到博客园,并且转换内容保存到新的文件中。

dotnet-cnblog proc -f <markdown文件路径>

处理过的内容保存在 Markdown 原始文件名-cnblog.md 中,复制粘贴到博客园的编辑器发布即可。

五.其他说明

  • 程序未加过多的容错机制,请勿暴力测试。比如发送一个非MarkDown文件到程序。

  • 上传图片具有重试机制,重试三次。

  • 只有本地路径的图片才会上传,所有http/https远程图片都会过滤

  • 图片上传完毕以后,会自动转换md内容保存到带cnblog后缀的文件里面

  • 密码错误请重置配置

若上传接口报错,请到博客园后台设置 https://i.cnblogs.com/settings

Windows 设置右键菜单的方法 https://www.cnblogs.com/shengliC/p/14410298.html

More Repositories

1

azure-openai-proxy

Azure OpenAI Service Proxy. Convert OpenAI official API request to Azure OpenAI API request. Support GPT-4,Embeddings,Langchain. Adapter from OpenAI to Azure OpenAI.
Go
1,177
star
2

IdentityServer4.Samples

Samples for IdentityServer4,use .net core 2.0
JavaScript
608
star
3

Alipay.Demo.PCPayment

支付宝PC网站支付、扫码支付 演示项目,实现支付、支付同步回调、支付异步通知、订单查询、退款、退款查询、订单关闭、扫码支付功能。采用支付宝服务端SDK:Alipay.AopSdk.Core,使用ASP.NET Core MVC 。
HTML
282
star
4

RSAUtil

.NET Core RSA algorithm using the help tool.It supports data encryption, decryption, signature and verification signature.It supports three key formats, namely: xml, pkcs1, pkcs8.It also supports key conversion for these three formats.Last also support pem formatting.
C#
273
star
5

HttpCode.Core

简单、易用、高效 一个有态度的开源.Net Http请求框架!可以用制作爬虫,api请求等等。
C#
158
star
6

IPTools

Querying IP address information, support longitude and latitude. 快速查询IP信息,支持国内和国外IP信息查询,支持查询经纬度。
C#
154
star
7

RSAExtensions

.NET Core >=3.0 & .NET Standard >=2.2, RSA Enhanced Extension. Provide XML format key import and export. Unified export and import of PKCS # 1, PKCS # 8, and XML formats. Supports PKCS # 1, PKCS # 8 PEM import and export.
C#
149
star
8

SolutionRenamer

Fast rename solution,using .net core 2.0
C#
145
star
9

Hangfire.MySql.Core

Hangfire Mysql storage components, support for. NET core 1.1,. NET core 2.0,. NET standard 2.0. Based on Hangfire.MySqlStorage, some bugs were fixed and .NET standard 2.0 support was provided.
C#
83
star
10

ToolGood.Words.Core

一款高性能敏感词(非法词/脏字)检测过滤组件,附带繁体简体互换,支持全角半角互换,汉字转拼音,模糊搜索等功能。支持.net standard 2.0
C#
71
star
11

DotnetCore.RSA

.NET Core use RSA examples,implement RSA/RSA2's Encrypt,Decrypt,Sign,Verify Sign.Use OpenSsl's private/public key.
C#
69
star
12

UrlFirewall

UrlFirewall is a lightweight, fast filtering middleware for http request urls.It supports blacklist, whitelist mode.Supports persisting filter rules to any media.You can use it in webapi, gateway, etc.
C#
66
star
13

BlogDemos

C#
62
star
14

NConsul

.NET API for Consul (http://www.consul.io/)
C#
60
star
15

BlogTools

博文快速多渠道发布工具包,支持博客园、阿里云栖社区、腾讯云+社区、慕课网手记 4种渠道。
C#
36
star
16

AspNetCore.Authentication.ApiToken

A asp.net core webapi token authentication & generator open source library.
C#
32
star
17

DotnetRSA

DotnetRSA is a .NET Core Global Tool.Dotnet RSA Tool can help you generate xml pkcs1, pkcs8 three kinds of format keys, and supports three types of mutual conversion.
C#
27
star
18

dotnetcore-image

Solution of .NET Core GDI+(Image) on Linux/Docker
C#
21
star
19

QRConsole

Print QRCode to console.
C#
16
star
20

ClickHouse.DapperExtensions

Make ClickHouse available to Dapper
C#
14
star
21

NZookeeper

A zookeeper client library based on ZookeeperEx,easily use for Zookeeper.
C#
14
star
22

FreeCert

Fast and easy generation of HTTPS certificate library (Let's Encrypt ACME).
C#
13
star
23

EntityFrameworkCore2Demo

.NET Core控制台、ASP.NET Core程序使用EntityFrameworkCore 2.0示例,包括CodeFirst、DBFirst。详细文章介绍请看:http://www.cnblogs.com/stulzq/p/7717873.html
C#
12
star
24

Influxdb.BulkInsert

Influxdb asynchronous, fast and bulk insert components.Using HTTP or UDP protocol.Influxdb 异步、快速、批量插入组件,支持http和udp协议。
C#
11
star
25

CnBlogSubscribeTool

CnBlogSubscribeTool can crawl blog home page data at regular intervals.
C#
10
star
26

DynamicDns

动态DNS,支持多个云厂商。
C#
9
star
27

ChinaRegionCode

中华人民共和国县以上行政区划代码数据
C#
9
star
28

AspNetCoreHighConcurrency.Sample

AspNetCore High Concurrency Simple Code.Describes how to use distributed locking based on redis. Lock-free and queued commodity inventory operations.
C#
8
star
29

go-linecount

Fast text file line count tool.
Go
8
star
30

kong-plugin-rate-limiting-ex

Rate Limiting Ex is the rate limit plugin for kong gateway.Based on official rate-limiting plugin, I added a property that can be customized to get the request header for the ip address.
Lua
8
star
31

ClientUpdate

Update you c/s software
C#
7
star
32

hexo-deploy-agent

Go
7
star
33

EntityFramework-Core-Migrator

EntityFramework Core Migrator
C#
6
star
34

StudyRoad

6
star
35

MonitoringSystem

prometheus & grafana help doc.
5
star
36

JenkinsSharedLibraries

Jenkins Shared Libraries
Groovy
3
star
37

hexo-statistics

Go
3
star
38

DotNetActionsExample

.NET Github Action Example
C#
3
star
39

Damocles

Open source permission system.Under development now.
C#
3
star
40

MailHelper

C#
2
star
41

blog-demo-go

my blog's article demo
Go
2
star
42

WhoisClient

A simple domain whois lookup library.
C#
2
star
43

Visual-Studio-2013-Theme-Editor

Visual Studio 2013 Theme Editor
C#
1
star
44

TestJenkins

1
star
45

Zeta

A mysterious code repository.
C#
1
star
46

stulzq

1
star
47

WindowsRemoteDesktopCleanTool

Clean up windows remote desktop records
C#
1
star