0.0.30 • Published 4 years ago

jeeebot v0.0.30

Weekly downloads
75
License
-
Repository
-
Last release
4 years ago

jeeebot

Jeeebot is a constants generator for XCode Projects that is written with Node.JS.

Using NSString* as a key easily cause serious misstake that is hard to find. Jeeebot generates keys as constants so, Compiler can check this errors easiy. XCode also prevent mistake and can suggest code completion with Jeeebot

Jeeebot can generate constants for:

  • Localized String Keys for .strings files.
  • Segue Identifiers from .Stroyboard files.
  • Reuse Identifiers from .Stroyboard and .xib files.
  • Named Image keys from .asset files.
  • Entity names, attribute names and fetch requests from core data model definition.

Jeeebot can be used as cli tool or can be integrated with XCode.

This project was started to use for my commercial ios projects. I'v helped a lot from great open source communities about the developing ios apps. Now I'm contributing my tool to pay back.

Build Status

Installation

You need to install node to use jeeebot.

$ npm install jeeebot -g
$ jeeebot -h
Usage:
  jeeebot [OPTIONS] [ARGS]

Options: 
  -t, --type STRING           Generator type: segue | reuse | strings | asset | 
                              coredata | plist 
      --fieldStyle [STRING]   Field naming style: uppercase | camelcase  (Default is camelcase)
      --fieldPrefix [STRING]  Prefix for field name (Default is k)
  -c, --copyright [STRING]    Copyright (Default is Jeeeyul Lee<jeeeyul@gmail.com>)
  -o, --output PATH           Output file
  -h, --help                  Display help and usage details

Keys for localized string

en.lproj/strings.strings:

# Jeeebot
"hello" = "Hello";

ko.lproj/strings.strings:

# Jeeebot
"hello" = "안녕하세요!";
$ jeeebot -t strings *.lproj/strings.strings --fieldPrefix kLang -o strings.h

will generates:

//
//  strings.h
//
//  Created by Jeeebot on .
//  Copyright (c) 2015 . All rights reserved.
//
#ifndef strings_h


#pragma mark - Jeeebot

/** en : Hello! */
/** ko : 안녕하세요! */
static NSString* const kLangHello = @"hello";


#endif

Keys for segue identifier

$ jeeebot -t segue Storyboard.storyboard --fieldPrefix kSegue -o SegueIdentifiers.h
//
//  RPSegues.derived.h
//
//  Created by Jeeebot on Mon, Jan 26, 2015 12:44 PM.
//  Copyright (c) 2015 Jeeeyul Lee<jeeeyul@gmail.com>. All rights reserved.
//
#ifndef RPSegues_derived_h


#pragma mark - Root View Controller

/**
 A Constant for showDetail segue identifier ‘edit-sort’.
 Root View Controller -> Sort Controller (showDetail)
*/
static NSString* const kSegueEditSort = @"edit-sort";

/**
 A Constant for showDetail segue identifier ‘show’.
 Root View Controller -> Calendar Settings Editor (showDetail)
*/
static NSString* const kSegueShow = @"show";


#pragma mark - Calendar Settings Editor

/**
 A Constant for show segue identifier ‘edit-priority-filter’.
 Calendar Settings Editor -> Priority Filter Editor (show)
*/
static NSString* const kSegueEditPriorityFilter = @"edit-priority-filter";

/**
 A Constant for show segue identifier ‘edit-due-filter’.
 Calendar Settings Editor -> Due Date Filter Editor (show)
*/
static NSString* const kSegueEditDueFilter = @"edit-due-filter";


#endif

Keys for Reuse Identifiers

$ jeeebot -t reuse Storyboard.storyboard --fieldPrefix kReuse -o ReuseIdentifiers.h
//
//  RPReuses.derived.h
//
//  Created by Jeeebot on Mon, Jan 26, 2015 12:44 PM.
//  Copyright (c) 2015 Jeeeyul Lee<jeeeyul@gmail.com>. All rights reserved.
//
#ifndef RPReuses_derived_h


#pragma mark - Sort Controller

/** A constant for reuse identifier ‘default’ */
static NSString* const kReuseDefault = @"default";


#endif

Keys for Image Assets

$ jeeebot -t asset Media.assets --fieldPrefix kImage -o NamedImages.h
//
//  RPImages.derived.h
//
//  Created by Jeeebot on Mon, Jan 26, 2015 12:44 PM.
//  Copyright (c) 2015 Jeeeyul Lee<jeeeyul@gmail.com>. All rights reserved.
//
#ifndef RPImages_derived_h


#pragma mark - default

/** An image constants for AppIcon.appiconset */
static NSString* const kImageAppIcon = @"AppIcon";

/** An image constants for Logo.imageset */
static NSString* const kImageLogo = @"Logo";


#endif

Keys for Core Data entities and attributes

$ jeeebot -t coredata "Test.xcdatamodeld/Test 4.xcdatamodel" --fieldPrefix kModel -o ModelKeys.h
//
//  RPModelKeys.derived.h
//
//  Created by Jeeebot on Tue, Jan 27, 2015 9:58 AM.
//  Copyright (c) 2015 Jeeeyul Lee<jeeeyul@gmail.com>. All rights reserved.
//
#ifndef RPModelKeys_derived_h


#pragma mark - RPCalendarSettings

/** A constants for entity name ‘RPCalendarSettings’ */
static NSString* const kModelRPCalendarSettings = @"RPCalendarSettings";

/** calendarIdentifier:[String] attribute of RPCalendarSettings */
static NSString* const kModelRPCalendarSettingsCalendarIdentifier = @"calendarIdentifier";

/** displayInWidget:[Boolean] attribute of RPCalendarSettings */
static NSString* const kModelRPCalendarSettingsDisplayInWidget = @"displayInWidget";

/** displayNotScheduled:[Boolean] attribute of RPCalendarSettings */
static NSString* const kModelRPCalendarSettingsDisplayNotScheduled = @"displayNotScheduled";

/** dueDateFilter:[Integer 32] attribute of RPCalendarSettings */
static NSString* const kModelRPCalendarSettingsDueDateFilter = @"dueDateFilter";

/** filterCompoundRule:[Integer 32] attribute of RPCalendarSettings */
static NSString* const kModelRPCalendarSettingsFilterCompoundRule = @"filterCompoundRule";

/** order:[Integer 32] attribute of RPCalendarSettings */
static NSString* const kModelRPCalendarSettingsOrder = @"order";

/** priorityFilter:[Integer 32] attribute of RPCalendarSettings */
static NSString* const kModelRPCalendarSettingsPriorityFilter = @"priorityFilter";

/** useDueDateFilter:[Boolean] attribute of RPCalendarSettings */
static NSString* const kModelRPCalendarSettingsUseDueDateFilter = @"useDueDateFilter";

/** usePriorityFilter:[Boolean] attribute of RPCalendarSettings */
static NSString* const kModelRPCalendarSettingsUsePriorityFilter = @"usePriorityFilter";


#endif
0.0.30

4 years ago

0.0.28

9 years ago

0.0.27

9 years ago

0.0.26

9 years ago

0.0.25

9 years ago

0.0.24

9 years ago

0.0.23

9 years ago

0.0.22

9 years ago

0.0.21

9 years ago

0.0.20

9 years ago

0.0.18

9 years ago

0.0.17

9 years ago

0.0.16

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago