Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/t-osawa-009/swift-spreadsheet-gen
Convert a Google Spreadsheet to a file
https://github.com/t-osawa-009/swift-spreadsheet-gen
android generator ios localized spreadsheet swift xcode xml yml
Last synced: about 1 month ago
JSON representation
Convert a Google Spreadsheet to a file
- Host: GitHub
- URL: https://github.com/t-osawa-009/swift-spreadsheet-gen
- Owner: t-osawa-009
- License: mit
- Created: 2019-10-02T12:51:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-31T12:04:17.000Z (almost 3 years ago)
- Last Synced: 2024-03-15T07:35:37.274Z (11 months ago)
- Topics: android, generator, ios, localized, spreadsheet, swift, xcode, xml, yml
- Language: Swift
- Homepage:
- Size: 60.5 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# swift-spreadsheet-gen
Convert a Google Spreadsheet to a file. This project is heavily inspired by the [xvrh/localize-with-spreadsheet](https://github.com/xvrh/localize-with-spreadsheet), [SwiftGen/SwiftGen](https://github.com/SwiftGen/SwiftGen)
## Installation
### Makefile
```sh
$ git clone [email protected]:t-osawa-009/swift-spreadsheet-gen.git
$ cd swift-spreadsheet-gen
$ make install
```
### [Mint](https://github.com/yonaskolb/Mint)
```sh
$ mint install t-osawa-009/swift-spreadsheet-gen
```## Usage
Given a Google Spreadsheet like this:
[Spreadsheet](https://docs.google.com/spreadsheets/d/1zVw1G2LvoJOnnaez3Tuf2Kxqt7S8-zATNazY14FgBwI/edit?usp=sharing)To use swift-spreadsheet-gen, simply create a `swift_spreadsheet_gen.yml` YAML file to list all the subcommands to invoke, and for each subcommand, the list of arguments to pass to it. For example:
```
strings:
id: "your Google Spreadsheet id"
sheet_number: your Google Spreadsheet number
outputs:
- key: KEY
value_key: ja
output: ./ja.lproj/Localizable.strings
format: strings
- key: KEY
value_key: en
output: ./en.lproj/Localizable.xml
format: xml
customKey:
id: "your Google Spreadsheet id"
sheet_number: your Google Spreadsheet number
outputs:
- key: KEY
value_key: KEY
output: ./Localizable.swift
enumName: Strigs
is_camelized: true
```
Then you just have to invoke `swift-spreadsheet-gen` and it will execute what's described in the configuration file.## Notes
- Your spreadsheet should be "Published" for this to work