Skip to content

Commit

Permalink
Merge pull request #5 from p141592/source_object
Browse files Browse the repository at this point in the history
Релиз базового функционала
  • Loading branch information
p141592 authored Sep 1, 2019
2 parents 4297cc7 + e403ee3 commit 4bb810a
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 35 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
venv
.env
.DS_Store
.vscode
.vscode
.egg-info
dist/
22 changes: 22 additions & 0 deletions formatter/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from formatter.source import BaseSource
from formatter.parser import Parser
from formatter.tree import BaseTree
from formatter.tree.nodes import Root, Document, Paragraph, Block, Line

__package_name__ = 'stformatter'
__version__ = '0.1.1'
__author__ = 'Baryshnikov Nikolay'
__author_email__ = 'root@k0d.ru'
__description__ = '''A Python formatter from formats like rst and markdown to the content tree'''
__url__ = 'https://github.com/p141592/stformatter'

__all__ = (
'BaseSource',
'Parser',
'BaseTree',
'Root',
'Document',
'Paragraph',
'Block',
'Line'
)
2 changes: 1 addition & 1 deletion formatter/parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from tree.nodes import Line, Root
from formatter.tree.nodes import Root


class Parser:
Expand Down
2 changes: 1 addition & 1 deletion formatter/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import requests
from marshmallow import Schema, fields

from exceptions import SourceNotFoundException, PathException, SourceUrlConnectFailed
from formatter.exceptions import SourceNotFoundException, PathException, SourceUrlConnectFailed


class BaseSource:
Expand Down
2 changes: 1 addition & 1 deletion formatter/tree/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import uuid

from tree.serializer import BaseNodeDBSerializator
from formatter.tree.serializer import BaseNodeDBSerializator


class BaseTree:
Expand Down
2 changes: 1 addition & 1 deletion formatter/tree/nodes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from tree import BaseTree
from formatter.tree import BaseTree


class Root(BaseTree):
Expand Down
1 change: 0 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pytest
psycopg2-binary
marshmallow==3.0.1
29 changes: 0 additions & 29 deletions requirements.pip
Original file line number Diff line number Diff line change
Expand Up @@ -31,35 +31,6 @@ pluggy==0.12.0 \
--hash=sha256:0825a152ac059776623854c1543d65a4ad408eb3d33ee114dff91e57ec6ae6fc \
--hash=sha256:b9817417e95936bf75d85d3f8767f7df6cdde751fc40aed3bb3074cbcb77757c \
# via pytest
psycopg2-binary==2.8.3 \
--hash=sha256:080c72714784989474f97be9ab0ddf7b2ad2984527e77f2909fcd04d4df53809 \
--hash=sha256:110457be80b63ff4915febb06faa7be002b93a76e5ba19bf3f27636a2ef58598 \
--hash=sha256:171352a03b22fc099f15103959b52ee77d9a27e028895d7e5fde127aa8e3bac5 \
--hash=sha256:19d013e7b0817087517a4b3cab39c084d78898369e5c46258aab7be4f233d6a1 \
--hash=sha256:249b6b21ae4eb0f7b8423b330aa80fab5f821b9ffc3f7561a5e2fd6bb142cf5d \
--hash=sha256:2ac0731d2d84b05c7bb39e85b7e123c3a0acd4cda631d8d542802c88deb9e87e \
--hash=sha256:2b6d561193f0dc3f50acfb22dd52ea8c8dfbc64bcafe3938b5f209cc17cb6f00 \
--hash=sha256:2bd23e242e954214944481124755cbefe7c2cf563b1a54cd8d196d502f2578bf \
--hash=sha256:3e1239242ca60b3725e65ab2f13765fc199b03af9eaf1b5572f0e97bdcee5b43 \
--hash=sha256:3eb70bb697abbe86b1d2b1316370c02ba320bfd1e9e35cf3b9566a855ea8e4e5 \
--hash=sha256:51a2fc7e94b98bd1bb5d4570936f24fc2b0541b63eccadf8fdea266db8ad2f70 \
--hash=sha256:52f1bdafdc764b7447e393ed39bb263eccb12bfda25a4ac06d82e3a9056251f6 \
--hash=sha256:5b3581319a3951f1e866f4f6c5e42023db0fae0284273b82e97dfd32c51985cd \
--hash=sha256:63c1b66e3b2a3a336288e4bcec499e0dc310cd1dceaed1c46fa7419764c68877 \
--hash=sha256:8123a99f24ecee469e5c1339427bcdb2a33920a18bb5c0d58b7c13f3b0298ba3 \
--hash=sha256:85e699fcabe7f817c0f0a412d4e7c6627e00c412b418da7666ff353f38e30f67 \
--hash=sha256:8dbff4557bbef963697583366400822387cccf794ccb001f1f2307ed21854c68 \
--hash=sha256:908d21d08d6b81f1b7e056bbf40b2f77f8c499ab29e64ec5113052819ef1c89b \
--hash=sha256:af39d0237b17d0a5a5f638e9dffb34013ce2b1d41441fd30283e42b22d16858a \
--hash=sha256:af51bb9f055a3f4af0187149a8f60c9d516cf7d5565b3dac53358796a8fb2a5b \
--hash=sha256:b2ecac57eb49e461e86c092761e6b8e1fd9654dbaaddf71a076dcc869f7014e2 \
--hash=sha256:cd37cc170678a4609becb26b53a2bc1edea65177be70c48dd7b39a1149cabd6e \
--hash=sha256:d17e3054b17e1a6cb8c1140f76310f6ede811e75b7a9d461922d2c72973f583e \
--hash=sha256:d305313c5a9695f40c46294d4315ed3a07c7d2b55e48a9010dad7db7a66c8b7f \
--hash=sha256:dd0ef0eb1f7dd18a3f4187226e226a7284bda6af5671937a221766e6ef1ee88f \
--hash=sha256:e1adff53b56db9905db48a972fb89370ad5736e0450b96f91bcf99cadd96cfd7 \
--hash=sha256:f0d43828003c82dbc9269de87aa449e9896077a71954fbbb10a614c017e65737 \
--hash=sha256:f78e8b487de4d92640105c1389e5b90be3496b1d75c90a666edd8737cc2dbab7
py==1.8.0 \
--hash=sha256:64f65755aee5b381cea27766a3a147c3f15b9b6b9ac88676de66ba2ae36793fa \
--hash=sha256:dc639b046a6e2cff5bbe40194ad65936d6ba360b52b3c3fe1d08a82dd50b5e53 \
Expand Down
30 changes: 30 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import os
import formatter as metadata
from setuptools import setup, find_packages

long_description = open('README.md').read()

setup(
name=metadata.__package_name__,
version=metadata.__version__,
author=metadata.__author__,
author_email=metadata.__author_email__,
description=metadata.__description__,
url=metadata.__url__,
license='BSD',
packages=find_packages(),
long_description=long_description,
test_suite='nose.collector',
install_requires=[
'marshmallow',
],
py_modules=['formatter'],
classifiers=[
'License :: OSI Approved :: BSD License',
],
entry_points={
'console_scripts': [
'formatter = formatter.main:main',
],
},
)

0 comments on commit 4bb810a

Please sign in to comment.