Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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
Appearance settings

Snippets builder for Dash

License

NotificationsYou must be signed in to change notification settings

tbpgr/dash_snippets_builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dash Snippet Builder

$ git clone https://github.com/tbpgr/dash_snippets_builder.git

Structure

java1.toml, java2.toml, ruby1.toml are sample snippets.

.├── Gemfile├── Gemfile.lock├── LICENSE.txt├── README.md├── Rakefile└── snippets : you save snippets here    ├── java    │   ├── java1.toml    │   └── java2.toml    └── ruby        └── ruby1.toml

Settings

Move to work dir

$ cd %git%/dash_snippets_builder# check rake task$ rake -Trake dash:build  # build snippets

.env Setting(Sample)

$ cd $ touch .env
DASH_SNIPPET_PATH=/Users/your user name/Library/Application Support/Dash/library.dashLOG_LEVEL=DEBUG

TOML Setting(Samples)

  • snippets/java/java1.toml
[snippet]title = "javatitle;;"body = "line1\nline1\nline2\n"syntax = "Java"tag = "Java"
  • snippets/java/java2.toml
[snippet]title = "javatitle2;;"body = "line1\nline1\nline2\n"syntax = "Java"tag = "Java"
  • snippets/ruby/ruby1.toml
[snippet]title = "title;;"body = "line1\nline1\nline2\n"syntax = "Ruby"tag = "Ruby"

Usage

Build

$ rake dash:build2015/12/15 22:35:40 - DEBUG - start build snippets2015/12/15 22:35:40 - DEBUG -  start delete snippets2015/12/15 22:35:40 - DEBUG -    success delete snippets2015/12/15 22:35:40 - DEBUG -    success delete tagsIndex2015/12/15 22:35:40 - DEBUG -    success delete tags2015/12/15 22:35:40 - DEBUG -  finish delete snippets2015/12/15 22:35:40 - DEBUG -  create javatitle;;2015/12/15 22:35:40 - DEBUG -    insert tagsIndexfor title:javatitle;; tag: Java2015/12/15 22:35:40 - DEBUG -    create tag Java2015/12/15 22:35:40 - DEBUG -    create snippet javatitle;;2015/12/15 22:35:40 - DEBUG -  create javatitle2;;2015/12/15 22:35:40 - DEBUG -    insert tagsIndexfor title:javatitle2;; tag: Java2015/12/15 22:35:40 - DEBUG -    create snippet javatitle2;;2015/12/15 22:35:40 - DEBUG -  create title;;2015/12/15 22:35:40 - DEBUG -    insert tagsIndexfor title:title;; tag: Ruby2015/12/15 22:35:40 - DEBUG -    create tag Ruby2015/12/15 22:35:40 - DEBUG -    create snippet ti

Check SQLite Table

$cd~/Library/Application Support/Dash$ sqlite3 library.dashsqlite>select* from snippets;1|javatitle;;|line1line1line2|Java|02|javatitle2;;|line1line1line2|Java|03|title;;|line1line1line2|Ruby|0sqlite>select* from tags;1|Java2|Rubysqlite>select* from tagsIndex;1|11|2

Dump

$ rake dash:dump2015/12/15 23:32:38 - DEBUG - start dump snippets2015/12/15 23:32:38 - DEBUG -   snippet count = 32015/12/15 23:32:38 - DEBUG -complete output ./snippets/dump/javatitle.toml2015/12/15 23:32:38 - DEBUG -complete output ./snippets/dump/javatitle2.toml2015/12/15 23:32:38 - DEBUG -complete output ./snippets/dump/title.toml2015/12/15 23:32:38 - DEBUG - finish dump snippets
$cd  snippets/dump$ cat*.toml[snippet]body ="line1\nline1\nline2\n"syntax ="Java"tag ="Java"title ="javatitle;;"[snippet]body ="line1\nline1\nline2\n"syntax ="Java"tag ="Java"title ="javatitle2;;"[snippet]body ="line1\nline1\nline2\n"syntax ="Ruby"tag ="Ruby"

After build

alt

About

Snippets builder for Dash

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp