Coder Social home page Coder Social logo

kostyaesmukov / synctogit Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 1.0 4.3 MB

Syncs Evernote® notes to a git repository in HTML.

Home Page: http://kostyaesmukov.github.io/SyncToGit/

License: MIT License

Python 60.77% JavaScript 32.12% Makefile 0.14% HTML 4.61% VBScript 0.10% Jinja 2.28%
backup-solution evernote git

synctogit's People

Contributors

kostyaesmukov avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

Forkers

bosconi

synctogit's Issues

ConfigParser.NoSectionError: No section: 'evernote'

Traceback (most recent call last):
  File "/Users/daniel/miniconda3/envs/synctogit/bin/synctogit", line 8, in <module>
    sys.exit(main())
  File "/Users/daniel/miniconda3/envs/synctogit/lib/python2.7/site-packages/synctogit/main.py", line 35, in main
    run(pargs)
  File "/Users/daniel/miniconda3/envs/synctogit/lib/python2.7/site-packages/synctogit/main.py", line 49, in run
    while _sync(git, evernote, config, pargs):
  File "/Users/daniel/miniconda3/envs/synctogit/lib/python2.7/site-packages/synctogit/main.py", line 67, in _sync
    config.set('evernote', 'token', base64.b64encode(token))
  File "/Users/daniel/miniconda3/envs/synctogit/lib/python2.7/site-packages/synctogit/Config.py", line 60, in set
    self.conf.set(section, key, value)
  File "/Users/daniel/miniconda3/envs/synctogit/lib/python2.7/ConfigParser.py", line 396, in set
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'evernote'

'error: unknown option `cached'

Hi

I'm running synctogit in a Ubuntu 22.04.4 machine, with git version 2.34.1.

Whem I call synctogit manually from terminal prompt it runs smoothly, but whem I call it from a bash script triggered by cron, I get:

Traceback (most recent call last):
  File "/usr/local/bin/synctogit", line 11, in <module>
    load_entry_point('synctogit==2.0.1', 'console_scripts', 'synctogit')()
  File "/usr/local/lib/python2.7/dist-packages/synctogit/main.py", line 35, in main
    run(pargs)
  File "/usr/local/lib/python2.7/dist-packages/synctogit/main.py", line 49, in run
    while _sync(git, evernote, config, pargs):
  File "/usr/local/lib/python2.7/dist-packages/synctogit/main.py", line 78, in _sync
    with git.transaction() as t:
  File "/usr/local/lib/python2.7/dist-packages/synctogit/GitTransaction.py", line 186, in __enter__
    self._check_repo_state()
  File "/usr/local/lib/python2.7/dist-packages/synctogit/GitTransaction.py", line 157, in _check_repo_state
    self._stash()
  File "/usr/local/lib/python2.7/dist-packages/synctogit/GitTransaction.py", line 151, in _stash
    if self.git.is_dirty(untracked_files=True):
  File "/usr/local/lib/python2.7/dist-packages/git/repo/base.py", line 608, in is_dirty
    len(self.git.diff('--cached', *default_args)):
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 466, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 934, in _call_process
    return self.execute(make_call(), **_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 718, in execute
    raise GitCommandError(command, status, stderr_value)
git.exc.GitCommandError: 'git diff --cached --abbrev=40 --full-index --raw' returned with exit code 129
stderr: 'error: unknown option `cached'
usage: git diff --no-index [<options>] <path> <path>

Which seens related to

def _stash(self):
    if self.git.is_dirty(untracked_files=True):
        self.git.stash('push', '-m', self._get_commit_message())

in GitTransaction.py

Is my perception correct? Do I need to adjust any settings?

Installation fails with package evernote==1.25.2

pip install synctogit fails (see below)

Environment: Ubuntu 20.04 LTS
Python 3.8.10
pip 20.0.2

pip install synctogit
Collecting synctogit
Downloading synctogit-2.0.1.tar.gz (35 kB)
Collecting oauth2==1.9.0.post1
Using cached oauth2-1.9.0.post1-py2.py3-none-any.whl (25 kB)
Collecting GitPython==2.0.8
Downloading GitPython-2.0.8.tar.gz (407 kB)
|████████████████████████████████| 407 kB 5.8 MB/s
Collecting defusedxml==0.4.1
Downloading defusedxml-0.4.1.tar.gz (48 kB)
|████████████████████████████████| 48 kB 5.4 MB/s
Collecting regex==2016.7.21
Downloading regex-2016.07.21.tar.gz (598 kB)
|████████████████████████████████| 598 kB 11.8 MB/s
Collecting evernote==1.25.2
Downloading evernote-1.25.2.tar.gz (141 kB)
|████████████████████████████████| 141 kB 10.2 MB/s
ERROR: Command errored out with exit status 1:
command: /home/sprickw/PycharmProjects/files_and_database/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ok46u2sb/evernote/setup.py'"'"'; file='"'"'/tmp/pip-install-ok46u2sb/evernote/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-ok46u2sb/evernote/pip-egg-info
cwd: /tmp/pip-install-ok46u2sb/evernote/
Complete output (6 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-ok46u2sb/evernote/setup.py", line 6
exec x
^
SyntaxError: Missing parentheses in call to 'exec'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

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.