hacker0limbo / vscode-flomo Goto Github PK
View Code? Open in Web Editor NEWflomo extension for Visual Studio Code
Home Page: https://marketplace.visualstudio.com/items?itemName=Limboer.vscode-flomo
License: MIT License
flomo extension for Visual Studio Code
Home Page: https://marketplace.visualstudio.com/items?itemName=Limboer.vscode-flomo
License: MIT License
你好,我觉得代码片段也是可以收集到flomo中的。能不能增加一个功能,选中一段代码,然后右键选择post selected code to flomo。当然,也可用command pallete触发post操作。
你好,偶然发现 vscode 上面发布了这个插件,下来试了一下。
提示“发送失败,请检查 API Key 是否正确”。
我用下面脚本验证了一下 API,是可以用的。想咨询一下什么地方可以看调试信息?谢谢。
#!/bin/env python
# -*- coding: UTF-8 -*-
import os, sys, re
import requests
'''
## 使用方法
0. 安装python,安装requests包 (pip install requests)
1. 系统创建环境变量FLOMOAPI,内容可于https://flomoapp.com/mine?source=incoming_webhook 获取
2. 保存此文件至本地路径,命名为flomo.py
3. 将存放flomo.py的路径添加至系统PATH路径中
4. 执行 flomo.py '文本...'
## 说明
1. 文本中不包含#的,将会增加`#待整理`标签
2. 独立的文本参数分行记录
## 注意
- 命令行输入#,请使用单引号括起来,否则会被当成注释
- 文本中有空格的,请使用单引号括起来,否则会被识别为多行
'''
headers = {'Content-Type': 'application/json;charset=UTF-8'}
flomoapi=os.getenv('FLOMOAPI')
if not flomoapi:
print("请先创建 FLOMOAPI 环境变量")
exit()
if len(sys.argv) <= 1:
print("姿势不对。用法:flomo.py '文本...'")
exit()
content=''
for argv in sys.argv[1:]:
content += argv + '\n'
if '#' not in content:
content = '#待整理\n' + content
print(flomoapi)
r = requests.post(flomoapi, headers=headers, json={'content':f'{content}'})
print("----------------")
print(content)
print("----------------")
print(r)
print(r.__dict__)
print(r._content)
if r.status_code == 200:
print ('MEMO 创建成功')
else:
print ('MEMO 创建失败。内容宝贵,请注意保存!')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.