Skip to content

GeneralD/Snippets

Repository files navigation

Snippets

language platform architecture database status

Snippets hero banner

An iOS app for browsing and searching a code snippet library stored in a Dash-style SQLite database. Open a snippet database via the system document picker, fuzzy-search snippets and tags, and view snippet bodies with syntax highlighting — including Dash placeholder tokens (__placeholder__, @clipboard, @cursor, @time, @date).

Built around 2020–2021 as a personal project; preserved as-is and not actively maintained.

Features

  • Opens a Dash-compatible snippets SQLite database (snippets, tags, smartTags, tagsIndex tables) via GRDB
  • Fuzzy search powered by Fuse
  • Syntax-highlighted snippet view (Sourceful) with a custom lexer for Dash placeholders
  • Per-language theme colors derived from GitHub's language color palette
  • Reactive MVVM throughout, using RxSwift 6 / RxCocoa

Project Structure

Target Role
Snippets Main iOS app (MVVM modules: SnippetList, SnippetDetail)
Entity GRDB record types (SQLSnippet, SQLTag, SQLSmartTag, SQLTagsIndex)
DashSourceful Sourceful-based code view + lexer for Dash placeholder syntax
LanguageThemeColor Language → theme color mapping utilities
RxActivityIndicator Activity-tracking Rx helper framework
RxPropertyChaining Rx property-chaining operators
RxPropertyWrapper @RxProperty / @RxTrigger property wrappers

The Xcode project is generated by XcodeGen (project.yml); dependencies are managed with CocoaPods, tools with Mint, and new MVVM modules are scaffolded with Generamba (Local Templates/rx_mvvm).

Requirements

  • Xcode 12.4-era toolchain (iOS deployment target 14.4)
  • Mint, CocoaPods, optionally rbenv + Bundler for Generamba

Setup

./setup.sh

This installs Mint/CocoaPods if missing, bootstraps Mint tools (XcodeGen, SwiftLint, SwiftFormat, R.swift, Mockolo), generates Snippets.xcodeproj, runs pod install, and installs the Generamba template. Then open Snippets.xcworkspace.

Note: the Podfile references a private fork (CollectionKit-Swift via SSH), and the toolchain versions are dated — building on a modern setup may require adjustments.

About

iOS app to browse and fuzzy-search a Dash-style code snippet SQLite library with syntax highlighting (RxSwift MVVM, GRDB).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors