Code Monkey home page Code Monkey logo

ever2simple's Introduction

Moon

ever2simple's People

Contributors

austinjp avatar claytron avatar tiangolo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ever2simple's Issues

TypeError: initial_value must be unicode or None, not str

just installed using pip as instructed and tried with the following error.

ever2simple Notes.enex > simplenote.json
Traceback (most recent call last):
File "/usr/local/bin/ever2simple", line 8, in
load_entry_point('ever2simple==1.0a1', 'console_scripts', 'ever2simple')()
File "/Library/Python/2.7/site-packages/ever2simple/core.py", line 16, in main
converter.convert()
File "/Library/Python/2.7/site-packages/ever2simple/converter.py", line 73, in convert
notes = self.prepare_notes(xml_tree)
File "/Library/Python/2.7/site-packages/ever2simple/converter.py", line 43, in prepare_notes
created_string = parse(note.xpath('created')[0].text)
File "/Library/Python/2.7/site-packages/dateutil/parser.py", line 698, in parse
return DEFAULTPARSER.parse(timestr, *_kwargs)
File "/Library/Python/2.7/site-packages/dateutil/parser.py", line 302, in parse
res = self._parse(timestr, *_kwargs)
File "/Library/Python/2.7/site-packages/dateutil/parser.py", line 350, in _parse
l = _timelex.split(timestr)
File "/Library/Python/2.7/site-packages/dateutil/parser.py", line 144, in split
return list(cls(s))
File "/Library/Python/2.7/site-packages/dateutil/parser.py", line 44, in init
instream = StringIO(instream)
TypeError: initial_value must be unicode or None, not str

Problem with ever2simple: from html2text import _html2text

I followed instructions, installed into a virtualenv, etc. and got error
==== Error 1
from html2text import _html2text
ImportError: cannot import name _html2text
==== Error 1
so i changed the line to: import html2text
and changed line 85 to: html2plain = html2text.html2text(None, "")
and got a different error
==== Error 2
File "/lib/python2.7/site-packages/ever2simple/html2text.py", line 234, in feed
data = data.replace("</' + 'script>", "")
AttributeError: 'NoneType' object has no attribute 'replace'
==== Error 2
So it doesn't like the None in line 85 of your convertor?
I changed it to str: html2plain = html2text.html2text(str, "")
and got...
==== Error 3
File "lib/python2.7/site-packages/ever2simple/html2text.py", line 234, in feed
data = data.replace("</' + 'script>", "")
TypeError: replace() takes at least 2 arguments (1 given)
==== Error 3
of course that doesn't even begin to address the fact that what I really need is a CSV...
but any help or suggestions would be appreciated. Thanks.

UTF-8 Problem

On Mac

MacBook-Pro-de-Christopher:data chris$ ever2simple --output everout/ cmannnotes.enex
Traceback (most recent call last):
File "/usr/local/bin/ever2simple", line 9, in
load_entry_point('ever2simple==2.0', 'console_scripts', 'ever2simple')()
File "/Library/Python/2.7/site-packages/ever2simple/core.py", line 21, in main
converter.convert()
File "/Library/Python/2.7/site-packages/ever2simple/converter.py", line 80, in convert
notes = self.prepare_notes(xml_tree)
File "/Library/Python/2.7/site-packages/ever2simple/converter.py", line 63, in prepare_notes
converted_text = self._convert_html_markdown(title, raw_text)
File "/Library/Python/2.7/site-packages/ever2simple/converter.py", line 91, in _convert_html_markdown
html2plain.feed(text)
File "/Library/Python/2.7/site-packages/html2text/init.py", line 142, in feed
HTMLParser.HTMLParser.feed(self, data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/HTMLParser.py", line 117, in feed
self.goahead(0)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/HTMLParser.py", line 163, in goahead
k = self.parse_endtag(i)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/HTMLParser.py", line 401, in parse_endtag
self.handle_endtag(elem)
File "/Library/Python/2.7/site-packages/html2text/init.py", line 191, in handle_endtag
self.handle_tag(tag, None, 0)
File "/Library/Python/2.7/site-packages/html2text/init.py", line 474, in handle_tag
link_url(self, a['href'], title)
File "/Library/Python/2.7/site-packages/html2text/init.py", line 440, in link_url
title = ' "{0}"'.format(title) if title.strip() else ''
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 11: ordinal not in range(128)

Feature request: Handing inline images

It understandable that the output is plain text, but is it possible to output the inline images as well?

Markdown supports images inline, and can do two things:

  1. A local reference to an "images" or "attachments" folder
  2. BASE64 encoding in the image tag

Python 3 support

installed fine using pip - but when executed ran into following error :

$ ever2simple
Traceback (most recent call last):
  File "/usr/local/bin/ever2simple", line 7, in <module>
    from ever2simple.core import main
  File "/usr/local/lib/python3.5/site-packages/ever2simple/core.py", line 18
    print 'File does not exist: %s' % filepath
                                  ^
SyntaxError: Missing parentheses in call to 'print'

Executing on windows

Hi,
I have been able to install on my windows using Python 2.7 and pip but I am not able to find the exe or to make it work.
There are these two folders:
c:\Python27\Lib\site-packages\ever2simple
c:\Python27\Lib\site-packages\ever2simple-2.0-py2.7.egg-info
But when trying to launch them it does not work.
Did I miss any steps?

Thanks!

Cannot find file

Hi!
I was able to install your app and run it, however, it seems to not accept any arguments to the file or filepath the the enex file. I've attempted relative paths, and full qualified paths, with and without quoted identifiers... no luck
Any ideas on why this is failing? Thanks in advance!
Command:
C:\Users\Username\Desktop\Python>ever2simple DeveloperOuttake.enex
Output:
Traceback (most recent call last):
File "c:\program files\python37\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\program files\python37\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Program Files\Python37\Scripts\ever2simple.exe_main
.py", line 5, in
File "c:\program files\python37\lib\site-packages\ever2simple\core.py", line 18
print 'File does not exist: %s' % filepath
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('File does not exist: %s' % filepath)?

Error on converting

When i try this with Python 2.7.2 on Windows 7 64bit with a fresh exported .enex file:

ever2simple Evernote.enex -o simplenote -f dir

i get this error:

Traceback (most recent call last):
File "D:\tools\Python27\Scripts\ever2simple-script.py", line 9, in
load_entry_point('ever2simple==2.0', 'console_scripts', 'ever2simple')()
File "d:\tools\python27\lib\site-packages\ever2simple\core.py", line 21, in main
converter.convert()
File "d:\tools\python27\lib\site-packages\ever2simple\converter.py", line 80, in convert
notes = self.prepare_notes(xml_tree)
File "d:\tools\python27\lib\site-packages\ever2simple\converter.py", line 52, in prepare_notes
note_dict['createdate'] = created_string.strftime(self.date_fmt)
ValueError: Invalid format string

the format of the created-nodes is 20160324T131701Z in my enex file

ImportError while running.

Just installed successfully and got this error while running the app

❯ ever2simple notes.enex > simplenote.json
Traceback (most recent call last):
  File "/usr/local/bin/ever2simple", line 9, in <module>
    load_entry_point('ever2simple==1.1', 'console_scripts', 'ever2simple')()
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources/__init__.py", line 552, in load_entry_point
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources/__init__.py", line 2672, in load_entry_point
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources/__init__.py", line 2345, in load
  File "build/bdist.macosx-10.10-x86_64/egg/pkg_resources/__init__.py", line 2351, in resolve
  File "/usr/local/lib/python2.7/site-packages/ever2simple/core.py", line 3, in <module>
    from ever2simple.converter import EverConverter
  File "/usr/local/lib/python2.7/site-packages/ever2simple/converter.py", line 8, in <module>
    from lxml import etree
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/lxml/etree.so, 2): Symbol not found: _lzma_auto_decoder
  Referenced from: /usr/local/lib/python2.7/site-packages/lxml/etree.so
  Expected in: flat namespace
 in /usr/local/lib/python2.7/site-packages/lxml/etree.so

Error processing spaces

I got this:
Could not parse XML
Entity 'nbsp' not defined, line 214643, column 90

This is what appears there:
&nbsp;

Bug in core.py - no parenthesis for print statements

I installed ever2simple using pip, but got this when I tried to run it:

print 'File does not exist: %s' % filepath
      ^

SyntaxError: Missing parentheses in call to 'print'. Did you mean print('File does not exist: %s' % filepath)?

This is in the code.py file. I don't know git well enough to edit the file and then install it.

Thanks,
Julie

Can't install via pip

$ pip install -U ever2simple
Downloading/unpacking ever2simple
  Could not find a version that satisfies the requirement ever2simple (from versions: 1.0a1, 1.0a2, 1.0a3)
Cleaning up...
No distributions matching the version for ever2simple

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.