Skip to content

Commit

Permalink
Merge pull request #5 from thombashi/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
thombashi committed Jun 19, 2016
2 parents 690521e + c32cdbe commit 85dff26
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 95 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,5 @@ docs/_build/
# PyBuilder
target/
desktop.ini
misc/README.md
misc/README_HEADER.rst
misc/readme_converter.py
sandbox/
upgrade.sh
21 changes: 16 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
language: python

env:
- TOXENV=py26
- TOXENV=py27
- TOXENV=py33
- TOXENV=py34
matrix:
include:
- python: 2.6
env: TOXENV=python2.6
- python: 2.7
env: TOXENV=python2.7
- python: 3.3
env: TOXENV=python3.3
- python: 3.4
env: TOXENV=python3.4
- python: 3.5
env: TOXENV=python3.5

os:
- linux
Expand All @@ -14,3 +21,7 @@ install:

script:
- tox

notifications:
slack:
secure: EHpNEhPxWbvByJouszVg5JIU9BBURFQnHlMEJDudWnK8i0hF37OYKkC8oSbvi2Hz+/bCW4eFStwuTu17RA9diUI6F4ZQ+H0OygI5NqlGSlty0sQpfpxOTSVlqGupKJtZRG5yeqzCVEdXYLZOQH8q54yUADxpjaPkdvCoOrcPB/xBe8vxpUc4uPtYQVeCJCOij0y+3nEwOOu/A8JBk0Uhx9690qKHzYwv3V93M4OjYeWntEcmcbJaLj+BCVV+DT3rPoUeweoZHwd/0euyKR/NmjR/y0uIsIkcjKpwDACaPIzzoQUD7VMf+91yebqI42t5ukg4fDArGE8jkQrRPsTKBdBP7n32n8PShWVypXR/CN/qYZvWwoVkuyYp2KudJIXm9SzWuW0sYjL4BaI9/sQs8iZfXOW2UJfErwNn5gybkxc/59hgtR955ceYWjKSm++KzG9AYb3c7MqY2HHWGdGxNHD6dv2tnTQJ1FUNC5wuOwmOsg0EjHD+o67zYuvOOsjA2EfgjFVqsWLBy7Uh9fQVBOUpb3NCFA0ZDK02xaBtuZSzhT2vCviUkRsvgIy51yzPt6ldeadKtogCUKrQU3U9M0R3ZkoJSZaN74ZHA33IFtCKfnIkZaoJ1w+DRGPLw8D31CI/dxIoeVUjsCYhDuPLxcF/L1x5GS/8tJHXcZEGK/c=
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sqlitebiter
=============
===========

.. image:: https://img.shields.io/pypi/pyversions/sqlitebiter.svg
:target: https://pypi.python.org/pypi/sqlitebiter
Expand All @@ -11,7 +11,7 @@ sqlitebiter
Summary
-------

sqlitebiter is a CLI tool to create a SQLite database from CSV/JSON/Excel/Google-Sheets.
sqlitebiter is a CLI tool to convert CSV/JSON/Excel/Google-Sheets to a SQLite database file.

Features
--------
Expand All @@ -23,16 +23,16 @@ Features
- `Google Sheets <https://www.google.com/intl/en_us/sheets/about/>`_

Usage
========
=====

.. image:: docs/gif/usage_example.gif

For more information
--------------------

More examples are available at
http://sqlitebiter.readthedocs.io/en/latest/pages/usage/index.html


Installation
============

Expand Down
8 changes: 6 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ build: false
environment:
matrix:
- PYTHON: "C:/Python27-x64"
- PYTHON: "C:/Python33-x64"
- PYTHON: "C:/Python34-x64"
- PYTHON: "C:/Python35-x64"

init:
Expand All @@ -18,3 +16,9 @@ install:

test_script:
- "%PYTHON%/python.exe setup.py test"

notifications:
- provider: Slack
auth_token:
secure: JyTQAtBzpPYiWK3eRTz/U+rvmAKopqIWE19ti4vSL/IRygV3jUVUkwET1VyTlrqOeYfNx3Kfcp7eUmHCHxFCgw==
channel: notifications
110 changes: 36 additions & 74 deletions docs/make_readme.py
Original file line number Diff line number Diff line change
@@ -1,97 +1,59 @@
#!/usr/bin/env python
# encoding: utf-8

import os
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""

import sys

import readmemaker


PROJECT_NAME = "sqlitebiter"
VERSION = "0.4.0"
OUTPUT_DIR = ".."
README_WORK_DIR = "."
DOC_PAGE_DIR = os.path.join(README_WORK_DIR, "pages")


def get_usage_file_path(filename):
return os.path.join(DOC_PAGE_DIR, "examples", filename)
def write_examples(maker):
maker.set_indent_level(0)
maker.write_chapter("Usage")
maker.write_line_list([
".. image:: docs/gif/usage_example.gif",
])

maker.inc_indent_level()
maker.write_chapter("For more information")
maker.write_line_list([
"More examples are available at ",
"http://%s.readthedocs.io/en/latest/pages/%s/index.html" % (
PROJECT_NAME.lower(), maker.examples_dir_name),
])

def write_line_list(f, line_list):
f.write("\n".join(line_list))
f.write("\n" * 2)

def main():
maker = readmemaker.ReadmeMaker(PROJECT_NAME, OUTPUT_DIR)
maker.examples_dir_name = u"usage"

def write_usage_file(f, filename):
write_line_list(f, [
line.rstrip()
for line in
open(get_usage_file_path(filename)).readlines()
])
maker.write_introduction_file("badges.txt")

maker.inc_indent_level()
maker.write_chapter("Summary")
maker.write_introduction_file("summary.txt")
maker.write_introduction_file("feature.txt")

def write_examples(f):
write_line_list(f, [
"Usage",
"========",
"",
".. image:: docs/gif/usage_example.gif",
])
write_examples(maker)

write_line_list(f, [
"For more information",
"--------------------",
"More examples are available at ",
"http://%s.readthedocs.io/en/latest/pages/usage/index.html" % (
PROJECT_NAME),
"",
maker.write_file(
maker.doc_page_root_dir_path.joinpath("installation.rst"))

maker.set_indent_level(0)
maker.write_chapter("Documentation")
maker.write_line_list([
"http://%s.readthedocs.org/en/latest/" % (PROJECT_NAME.lower()),
])

return 0

def main():
with open(os.path.join(OUTPUT_DIR, "README.rst"), "w") as f:
write_line_list(f, [
PROJECT_NAME,
"=============",
"",
] + [
line.rstrip() for line in
open(os.path.join(
DOC_PAGE_DIR, "introduction", "badges.txt")).readlines()
])

write_line_list(f, [
"Summary",
"-------",
"",
] + [
line.rstrip() for line in
open(os.path.join(
DOC_PAGE_DIR, "introduction", "summary.txt")).readlines()
])

write_line_list(f, [
line.rstrip() for line in
open(os.path.join(
DOC_PAGE_DIR, "introduction", "feature.txt")).readlines()
])

write_examples(f)

write_line_list(f, [
line.rstrip() for line in
open(os.path.join(DOC_PAGE_DIR, "installation.rst")).readlines()
])

write_line_list(f, [
"Documentation",
"=============",
"",
"http://%s.readthedocs.org/en/latest/" % (PROJECT_NAME)
])

sys.stdout.write("complete\n")
sys.stdout.flush()
sys.stdin.readline()

if __name__ == '__main__':
sys.exit(main())
2 changes: 1 addition & 1 deletion docs/pages/introduction/summary.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sqlitebiter is a CLI tool to create a SQLite database from CSV/JSON/Excel/Google-Sheets.
sqlitebiter is a CLI tool to convert CSV/JSON/Excel/Google-Sheets to a SQLite database file.
4 changes: 2 additions & 2 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
click
dataproperty
DataProperty>=0.3.1
path.py
SimpleSQLite>=0.3.0
SimpleSQLite>=0.3.4
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
from __future__ import with_statement
import os.path
import setuptools
import sys

import sqlitebiter


REQUIREMENT_DIR = "requirements"

needs_pytest = set(['pytest', 'test', 'ptr']).intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []


with open("README.rst") as fp:
long_description = fp.read()

Expand Down Expand Up @@ -34,14 +39,16 @@
license="MIT License",
long_description=long_description,
packages=setuptools.find_packages(exclude=['test*']),
setup_requires=["pytest-runner"],
setup_requires=pytest_runner,
tests_require=tests_require,

classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 2",
Expand Down
3 changes: 1 addition & 2 deletions sqlitebiter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

VERSION = "0.1.0"
VERSION = "0.1.1"
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{26,27,33,34}
envlist = python{2.6,2.7,3.3,3.4,3.5}

[testenv]
deps =
Expand Down

0 comments on commit 85dff26

Please sign in to comment.