Project

jottit-to

0.0
No commit activity in last 3 years
No release in over 3 years
A tool for converting a list in jottit page to any formats
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.5
~> 10.2
~> 1.17

Runtime

~> 3.2
~> 1.6
~> 0.19
 Project Readme

JottitTo

Gem Version Build Status Dependency Status Code Climate Coverage Status

Jottit list page converter for CLI

Installation

$ gem install jottit-to

Usage

As a tool for CLI:

$ jotto json http://youpy.jottit.com/trivia
["Evernoteは象で動いている","CD音質を超えるデータはすべてハイレゾ", ...

$ jotto yaml http://youpy.jottit.com/trivia | head
---
- Evernoteは象で動いている
- CD音質を超えるデータはすべてハイレゾ
 :

$ jotto text http://youpy.jottit.com/trivia | head
Evernoteは象で動いている
CD音質を超えるデータはすべてハイレゾ
 :

$ jotto xml http://youpy.jottit.com/trivia | head
<?xml version="1.0" encoding="UTF-8"?>
<items>
  <item>Evernoteは象で動いている</item>
  <item>CD音質を超えるデータはすべてハイレゾ</item>
 : 

Show help

$ jotto help
Commands:
  jotto help [COMMAND]  # Describe available commands or one specific command
  jotto json URI        # Show as json
  jotto text URI        # Show as text
  :
  :

Applications for CLI:

  • Fetch random one

    $ jotto text http://youpy.jottit.com/trivia | shuf -n 1
    高性能な機械は触ると少しひんやりする
  • Tweet a trivia with usging tw gem ( http://shokai.github.io/tw/ )

    $ jotto text http://youpy.jottit.com/trivia | shuf -n 1 | tw --pipe
    首をボキボキ鳴らすと1トンの衝撃がかかる
    http://twitter.com/toby_net/status/451337693436198913
    2014-04-02 21:37:46 +0900
  • Tweet a trivia like yazawa using YAZAWA gem ( https://github.com/tobynet/yazawa ) and tw

    $ jotto text http://youpy.jottit.com/trivia | shuf -n 1 | yazawa | tw --pipe
    『SOUJI』は人を裏切らない
    http://twitter.com/toby_net/status/451338808189911040
    2014-04-02 21:42:12 +0900

As a library of ruby:

require 'jottit-to'

uri = 'http://youpy.jottit.com/trivia'

puts JottitTo.parse_uri(uri).to_json    # Fetch and print as JSON
puts JottitTo.parse_uri(uri).to_yaml    # Fetch and print as yaml
puts JottitTo.parse_uri(uri).to_text    # Fetch and print as text
puts JottitTo.parse_uri(uri).to_xml     # Fetch and print as xml