Permalink
Browse files

python3 compatibility for import, closes #30 ...

... and a fix in pandoc conversion, that leads to weird line breaks

Also version bump to 0.3.5, maybe the last release from the 0.3 line.
  • Loading branch information...
posativ committed Jun 10, 2012
1 parent a6cd87b commit 0c20e1732c83b734bebca82584fbce0b5ab0e930
Showing with 53 additions and 44 deletions.
  1. +3 −2 CHANGES
  2. +22 −18 README.rst
  3. +1 −1 acrylamid/__init__.py
  4. +4 −4 acrylamid/lib/importer.py
  5. +1 −1 docs/conf.py
  6. +22 −18 docs/index.rst
View
@@ -15,9 +15,10 @@ Version 0.3
require TYPOGRAPHY_MODE = "a", see #36 (thanks to Mark)
- compilation summary and hide skip/identical by default
- deployments are now executed in a real shell environment
-- verified python 3 support XXX
+- verified python 3 support (via p3test.sh)
- templates are now configurable per view, #24
-- few bugfixes to core that induces new compilation :-/
+- use argparse instead of optparse
+- few bugfixes to core that induces new compilation :/
### 0.3.4
View
@@ -116,24 +116,28 @@ overview.
::
- %> acrylamid --help
- Usage: acrylamid <subcommand> [options] [args]
-
- Options:
- -q, --quiet less verbose
- -v, --verbose more verbose
- -h, --help show this help message and exit
- --version print version details
-
- Commands:
- init initializes base structure in DIR
- create (new) creates a new entry
- compile (co) compile blog
- view fire up built-in webserver
- autocompile automatic compilation and serving (short aco)
- clean (rm) remove abandoned files
- import import content from URL
- deploy run a given TASK
+ $ acrylamid --help
+ usage: acrylamid [-h] [-v] [-q] [-C] [--version] ...
+
+ positional arguments:
+
+ init initializes base structure in DIR
+ compile compile blog
+ view fire up built-in webserver
+ autocompile automatic compilation and serving
+ import import content from URL or FILE
+ new create a new entry
+ check run W3C or validate links
+ clean remove abandoned files
+ deploy run task
+ info short summary
+
+ optional arguments:
+ -h, --help show this help message and exit
+ -v, --verbose more verbose
+ -q, --quiet less verbose
+ -C, --no-color disable color
+ --version show program's version number and exit
All subcommands except `init` require a conf.py file.
View
@@ -16,7 +16,7 @@
# those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of posativ <info@posativ.org>.
-__version__ = '0.3.4'
+__version__ = '0.3.5'
__author__ = 'posativ <info@posativ.org>'
__url__ = 'https://github.com/posativ/acrylamid/'
@@ -56,7 +56,7 @@ def convert(data, fmt='markdown', pandoc=False):
else:
cmds = []
- p = ['pandoc', '--normalize', '-f', 'html', '-t', fmt, '--strict']
+ p = ['pandoc', '--normalize', '-f', 'html', '-t', fmt, '--strict', '--no-wrap']
cmds.insert(0, p) if pandoc else cmds.append(p)
if fmt == 'html':
@@ -71,7 +71,7 @@ def convert(data, fmt='markdown', pandoc=False):
try:
return system(cmd, stdin=data), fmt.lower()
except AcrylamidException as e:
- log.warn(e.message)
+ log.warn(e.args[0])
except OSError:
pass
else:
@@ -227,7 +227,7 @@ def fetch(url, auth=None):
with io.open(url, 'r', encoding='utf-8', errors='replace') as fp:
return u''.join(fp.readlines())
except OSError as e:
- raise AcrylamidException(e.message)
+ raise AcrylamidException(e.args[0])
req = Request(url)
if auth:
@@ -262,7 +262,7 @@ def parse(content):
except ImportError:
log.info('notice BeautifulSoup is required for WordPress import')
except InvalidSource as e:
- failed.append(e.message)
+ failed.append(e.args[0])
else:
raise AcrylamidException('unable to parse source')
View
@@ -19,7 +19,7 @@
copyright = u'2012, posativ'
version = '0.3'
-release = '0.3.4'
+release = '0.3.5'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
View
@@ -135,24 +135,28 @@ See :doc:`commands` for a detailed overview.
::
- %> acrylamid --help
- Usage: acrylamid <subcommand> [options] [args]
-
- Options:
- -q, --quiet less verbose
- -v, --verbose more verbose
- -h, --help show this help message and exit
- --version print version details
-
- Commands:
- init initializes base structure in DIR
- create (new) creates a new entry
- compile (co) compile blog
- view fire up built-in webserver
- autocompile automatic compilation and serving (short aco)
- clean (rm) remove abandoned files
- import import content from URL
- deploy run a given TASK
+ $ acrylamid --help
+ usage: acrylamid [-h] [-v] [-q] [-C] [--version] ...
+
+ positional arguments:
+
+ init initializes base structure in DIR
+ compile compile blog
+ view fire up built-in webserver
+ autocompile automatic compilation and serving
+ import import content from URL or FILE
+ new create a new entry
+ check run W3C or validate links
+ clean remove abandoned files
+ deploy run task
+ info short summary
+
+ optional arguments:
+ -h, --help show this help message and exit
+ -v, --verbose more verbose
+ -q, --quiet less verbose
+ -C, --no-color disable color
+ --version show program's version number and exit
All subcommands except `init` require a conf.py file.

0 comments on commit 0c20e17

Please sign in to comment.