Skip to content

Commit

Permalink
First version
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzewoo committed Apr 9, 2020
0 parents commit 27ee7df
Show file tree
Hide file tree
Showing 39 changed files with 2,872 additions and 0 deletions.
149 changes: 149 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Gradle template
.gradle
/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

### Java template
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

### Example user template template
### Example user template

# IntelliJ project files
.idea
*.iml
out
gen
target
*.class
### Kotlin template
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 吴汶泽 <wenzewoo@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Jetbrains Markdown Image Support
> Markdown editor one click upload image support is applicable to common products of JetBrains series.
[中文文档](./README_CN.md) | [Report Issues](https://github.com/wenzewoo/jetbrains-markdown-image-support/issues)

## Features
- Multiple storage support, such as local / qiniu / aliyun OSS / tencent OSS, etc.
- Customize the file name naming policy and provide a variety of preset schemes.
- Provide picture compression function. Before uploading files, compress pictures according to the set compression rate to save traffic.
- Directly from the paste image to the editor, automatically upload the image and convert it to the markdown tag.
- Directly copy one or more picture files to the editor, automatically upload the pictures and convert them to markdown tags.
- Through the ALT + enter shortcut key, the image can be deleted intelligently. When the markdown tag is deleted, the source file in the corresponding storage can be removed.


## Preview

#### Settings
![](./screenshots/example1.png)
![](./screenshots/example2.png)

#### Paste the picture directly and choose the opened storage freely
![](./screenshots/example3.gif)

#### Copy multiple picture files, and freely select the opened storage
![](./screenshots/example4.gif)

#### Use Alt + enter to delete the picture source file
![](./screenshots/example5.gif)
28 changes: 28 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Jetbrains Markdown Image Support
> Markdown编辑器一键上传图片支持,适用于Jetbrains系列的常见产品。
[English](./README.md) | [提交Issues](https://github.com/wenzewoo/jetbrains-markdown-image-support/issues)

## 特性
- 多种存储支持,如本地/七牛/阿里云OSS/腾讯OSS等。
- 自定义文件名命名策略,并提供多种预设方案。
- 提供图片压缩功能,上传文件前,按照设置的压缩率压缩图片,节省流量。
- 直接从粘贴图片到编辑器,自动上传图片并转换为Markdown标签。
- 直接复制一个或者多个图片文件到编辑器,自动上传图片并转换为Markdown标签。
- 通过Alt+Enter快捷键,智能删除图片,删除Markdown标记的同时,移除对应存储中的源文件。-


## 预览

#### 设置界面
![](./screenshots/example1.png)
![](./screenshots/example2.png)

#### 直接粘贴图片,自由选择已开启的存储
![](./screenshots/example3.gif)

#### 复制多个图片文件,自由选择已开启的存储
![](./screenshots/example4.gif)

#### 使用 Alt+Enter 删除图片源文件
![](./screenshots/example5.gif)
58 changes: 58 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* MIT License
*
* Copyright (c) 2020 吴汶泽 <wenzewoo@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

plugins {
java
kotlin("jvm") version "1.3.61"
id("org.jetbrains.intellij") version "0.4.18"
}

group = "com.github.wenzewoo.jetbrains.plugin"
version = "1.0-SNAPSHOT"

repositories {
mavenCentral()
}

dependencies {
implementation(kotlin("stdlib-jdk8"))
compile("net.coobird", "thumbnailator", "0.4.8")
compile("com.qiniu", "qiniu-java-sdk", "7.2.28")
}

// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version = "2019.3.1"
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kotlin.code.style=official
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 27ee7df

Please sign in to comment.