Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A tool to read the clipboard and parse out the table data. Support for parsing @RequestParam/@ApiModelProperty interfaces to define code, Word, Excel and other form-like data

License

NotificationsYou must be signed in to change notification settings

saqqdy/clipboard-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A tool to read the clipboard and parse out the table data. Support for parsing @RequestParam/@ApiModelProperty interfaces to define code, Word, Excel and other form-like data

NPM versionCodacy BadgeTest coveragenpm downloadgzipLicense

Sonar

Installing

# use pnpm$ pnpm install clipboard-parser# use npm$ npm install clipboard-parser --save# use yarn$ yarn add clipboard-parser

Usage

<!-- demo.vue --><template>  <textarea @paste="handlePaste"></textarea></template><script>import clipboardParser from 'clipboard-parser'export default {  methods: {    handlePaste(e) {      const result = clipboardParser(e)      // ...    }  }}</script>

Using unpkg CDN:

<body><textareaonpaste="handlePaste"></textarea></body><scriptsrc="https://unpkg.com/clipboard-parser@3.0.0/dist/index.global.prod.js"></script><script>functionhandlePaste(event){constdata=clipboardParser(event)}</script>

Demos

1. Parsing JAVA code containing the interface definition of @RequestParam

input

@RequestParam("rowCount")@ApiParam(required =false,name ="rowCount",value ="page size",defaultValue =10)StringrowCount,@RequestParam(value ="current")@ApiParam(required =false,name ="current",value ="start page",defaultValue =1)Stringcurrent,

output

[  {"type":"String","required":true,"name":"rowCount","defaultValue":10,"description":"page size"  },  {"type":"String","required":true,"name":"current","defaultValue":1,"description":"start page"  }]

2. Parsing JAVA code containing the interface definition of @ApiModelProperty

input

@ApiModelProperty(value ="id key",required =true)privateStringid;@ApiModelProperty(value ="name")privateStringname;

output

[  {"required":true,"type":"String","description":"id key","defaultValue":"","name":"id"  },  {"required":true,"type":"String","description":"name","defaultValue":"","name":"name"  }]

3. Parse word/excel/web-page-table and other form-like data

input

ParametersDescriptionTypeOptionalRequiredDefault
typebranch typeStringfeature/bugfix/supportfalsecurrent branch type
namebranch nameString-falsecurrent branch name

output

[  {"name":"type","type":"String","required":false,"defaultValue":"","description":"branch type"  },  {"name":"name","type":"String","required":false,"defaultValue":"","description":"branch name"  }]

Support & Issues

Please open an issuehere.

License

MIT

About

A tool to read the clipboard and parse out the table data. Support for parsing @RequestParam/@ApiModelProperty interfaces to define code, Word, Excel and other form-like data

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

    Packages

    No packages published

    [8]ページ先頭

    ©2009-2025 Movatter.jp