post_name = os.path.basename(blog_file).split('.')[0] #修复博客名称有.md后缀问题
All Replies
木一明
deepin
2021-12-08 07:30 Reply Like 1 View the author
babyfengfjx
2021-12-08 07:42 deepin testing team
好牛皮!
以前是使用公司自己的代码仓库做图床,大佬的方式真心6!
Reply Like 0 View the author
木一明
deepin
2021-12-08 07:49 babyfengfjx:
好牛皮!
以前是使用公司自己的代码仓库做图床,大佬的方式真心6!
可别乱搞
Reply Like 0 View the author
神末shenmo
2021-12-08 07:57 Moderator
安利下小书匠,
Reply Like 0 View the author
木一明
deepin
2021-12-08 08:00 神末shenmo:
安利下小书匠,
这个6了,这个简直就是降维打击了,哈哈
Reply Like 0 View the author
神末shenmo
2021-12-08 08:10 Moderator
It has been deleted!
神末shenmo
2021-12-08 08:12 Moderator
木一明:
这个6了,这个简直就是降维打击了,哈哈
不是说你的方案不好哈
我提的小书匠对标的是typora,这玩意要收费了,而且配置难度其实比小书匠高一点
我用的是gitee+hugo方案,目前发布的方法是我写了一个脚本一键推送
图床我现在是gitee图床,也没什么特别的原因,也许是为了刷commit显得我似乎很努力在开发什么东西(
Reply Like 0 View the author
木一明
deepin
2021-12-08 08:16 神末shenmo:
不是说你的方案不好哈
我提的小书匠对标的是typora,这玩意要收费了,而且配置难度其实比小书匠高一点
我用的是gitee+hugo方案,目前发布的方法是我写了一个脚本一键推送
图床我现在是gitee图床,也没什么特别的原因,也许是为了刷commit显得我似乎很努力在开发什么东西(
对,选择太多,姿势舒服就行
Reply Like 0 View the author
sammy-621
2021-12-14 10:58 Moderator
blog地址给下?
Reply Like 0 View the author
木一明
deepin
2021-12-14 11:35 sammy-621:
blog地址给下?
Reply Like 0 View the author
sammy-621
2021-12-15 01:50 Moderator
没学过Python,按贴子方法操作后,在Typora里测试,一直提示我账号有问题,但我账号真的没问题。可能是我看不懂错误提示。楼主帮忙看下?
我的账号信息cnblogs.json如下:
Typora报错信息如下:
Traceback (most recent call last):
File "/home/sammy/.sammy/deepin/scripts/send_to_cnblogs.py", line 132, in
sammy_cnblogs = CnblogsAPI('/home/sammy/.sammy/deepin/scripts/cnblogs.json')
File "/home/sammy/.sammy/deepin/scripts/send_to_cnblogs.py", line 33, in __init__
self.__user_info = self.__cnblogs_api.blogger.getUsersBlogs('',self.__user,self.__password)
File "/usr/lib/python3.7/xmlrpc/client.py", line 1112, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python3.7/xmlrpc/client.py", line 1452, in __request
verbose=self.__verbose
File "/usr/lib/python3.7/xmlrpc/client.py", line 1154, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python3.7/xmlrpc/client.py", line 1170, in single_request
return self.parse_response(resp)
File "/usr/lib/python3.7/xmlrpc/client.py", line 1336, in parse_response
p.feed(data)
File "/usr/lib/python3.7/xmlrpc/client.py", line 439, in feed
self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 34, column 33
Reply Like 0 View the author
木一明
deepin
2021-12-15 02:08 sammy-621:
没学过Python,按贴子方法操作后,在Typora里测试,一直提示我账号有问题,但我账号真的没问题。可能是我看不懂错误提示。楼主帮忙看下?
我的账号信息cnblogs.json如下:
Typora报错信息如下:
Traceback (most recent call last):
File "/home/sammy/.sammy/deepin/scripts/send_to_cnblogs.py", line 132, in
sammy_cnblogs = CnblogsAPI('/home/sammy/.sammy/deepin/scripts/cnblogs.json')
File "/home/sammy/.sammy/deepin/scripts/send_to_cnblogs.py", line 33, in __init__
self.__user_info = self.__cnblogs_api.blogger.getUsersBlogs('',self.__user,self.__password)
File "/usr/lib/python3.7/xmlrpc/client.py", line 1112, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python3.7/xmlrpc/client.py", line 1452, in __request
verbose=self.__verbose
File "/usr/lib/python3.7/xmlrpc/client.py", line 1154, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python3.7/xmlrpc/client.py", line 1170, in single_request
return self.parse_response(resp)
File "/usr/lib/python3.7/xmlrpc/client.py", line 1336, in parse_response
p.feed(data)
File "/usr/lib/python3.7/xmlrpc/client.py", line 439, in feed
self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 34, column 33
url有问题哈,这个url是需要在个人博客里面开通的一个接口

Reply Like 0 View the author
sammy-621
2021-12-15 02:45 Moderator
木一明:
url有问题哈,这个url是需要在个人博客里面开通的一个接口

Reply Like 0 View the author
木一明
deepin
2021-12-15 02:48 sammy-621:
对的。搞定了吧?爽不爽?
Reply Like 1 View the author
sammy-621
2021-12-15 02:52 Moderator
木一明:
对的。搞定了吧?爽不爽?
Reply Like 0 View the author

niu0518
deepin
2021-12-16 01:23 大佬牛皮
Reply Like 0 View the author
Use Markdown Editor
1. 闲言碎语
好记性不如烂笔头。我们很多人喜欢写技术博客,构建知识库,然后把它们分享到网络平台,比如自建博客,主流博客平台,又或者记录在自己的笔记软件。
以下是我个人观点:
有人说,使用windowns系列操作系统+写作或者笔记软件来写,或者在线写不香吗?或者离线写好,同步软件同步,粘贴到在线平台不香吗?
实话说,挺香。
选择【创作】【保存】【同步】【分享】的组合方式很多,但是我还是喜欢找到适合自己的舒服的方式。
用typora写好了,右键分享一下,就能发布到博客,也挺香
我个人的组合方式:deepin+typora+cnblogs+wiznote
当然typora已经收费,wiznote已经发布Linux版本。更多更好的替代,都在排着队......
===================================================================
着重和正式强调:不要拿博客平台当图床用,后果自负!!!
===================================================================
2. 正式入题
之前也写过一篇比较全面的博客《Deepin15和20使用命令行快捷键鼠标右键发布博客至博客园和为知笔记》
在上面这篇博客中,你能在deepin上,用快捷键,用命令行,用右键三种姿势,来分享你的博客。
但是今天,我把代码改了改,2.0版本出来了。最重要的就是,能够上传图片了,香不香?
2.1 python3+xmrpc.client实现代码
以下是主要代码: