Sha256: 4350df442e59dbbab6fe6d7c1bf0880173c5d28a1a2aa414bb910d431bffa164

Contents?: true

Size: 1.39 KB

Versions: 9

Compression:

Stored size: 1.39 KB

Contents

# TDiary::IO::MongoDB

mongoid adapter for tDiary

## Installation

Add this line to your tDiary's Gemfile.local:

    gem 'tdiary-io-mongodb'

And then execute:

    $ bundle

## Usage

Add follow snipet to your tdiary.conf

```ruby
@io_class = TDiary::IO::MongoDB
```

## Migration

`bin/tdiary-mongodb-convert` is utility that uploads tDiary default IO data to MongoDB.

(1) Migrate tDiary configuration

Migrate your tDiary configuration to MongoDB.

```
$ bundle exec tdiary-mongodb-convert -c $DATA_PATH/tdiary.conf -m $MONGODB_URI
```

 * $MONGODB_URI: the uri of mongodb (mongodb://)
 * $DATA_PATH: the path of your tdiary data directory

(2) Migrate tDiary data

Migrate your tDiary data to MongoDB.

```
$ bundle exec tdiary-mongodb-convert -s ./lib/tdiary/style -m $MONGODB_URI $DATA_PATH
```
 * $MONGODB_URI: the uri of mongodb (mongodb://)
 * $DATA_PATH: the path of your tdiary data directory

### Note

If you use the style provided by an external gem (like GFM style), append the gem to Gemfile and run `bundle`.

```
gem 'tdiary-style-gfm'
gem 'tdiary-style-etdiary'
gem 'tdiary-style-rd
```

### See also

 * http://sho.tdiary.net/20150206.html#p01 (in Japanese)

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

9 entries across 7 versions & 2 rubygems

Version Path
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/bundler/gems/tdiary-io-mongodb-6cbfeb61de5c/README.md
tdiary-io-mongodb-5.1.1 README.md
tdiary-io-mongodb-5.1.0 README.md
tdiary-io-mongodb-5.0.4 README.md
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/bundler/gems/tdiary-io-mongodb-d8d5bf37608d/README.md
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-io-mongodb-3047266c9611/README.md
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-io-mongodb-d8d5bf37608d/README.md
tdiary-5.0.4 vendor/bundle/bundler/gems/tdiary-io-mongodb-d8d5bf37608d/README.md
tdiary-io-mongodb-5.0.3 README.md