commit 37d0c543d708223cd7a587327c42089dc9dd1d57
parent 21cff969f3f853d1775d0dbf3aa19fc30ba0fa56
Author: Daniel Moch <daniel@danielmoch.com>
Date: Sun, 2 Sep 2018 14:05:32 -0400
Clean up licensing
Diffstat:
16 files changed, 99 insertions(+), 244 deletions(-)
diff --git a/LICENSE b/LICENSE
@@ -21,3 +21,86 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+-------------------------------------------------------------------------------
+
+Portions of this software are adapted from sncli by Eric Davis:
+
+** The MIT License **
+
+Copyright (c) 2014 Eric Davis (edavis@insanum.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+Dude... just buy me a beer. :-)
+
+-------------------------------------------------------------------------------
+
+Portions of nextcloud_note.py are adapted from simplenote.py by Daniel
+Schauenberg:
+
+Copyright (c) 2011 Daniel Schauenberg
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-------------------------------------------------------------------------------
+
+Portions of notes_db and utils modules are adapted from the
+corresponding module in nvpy by Charl P. Botha:
+
+Copyright (c) 2012, Charl P. Botha
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the <organization> nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL CHARL P. BOTHA BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/nncli b/nncli
@@ -1,56 +1,7 @@
#!/usr/bin/env python3
-#
-# The MIT License (MIT)
-#
-# Copyright (c) 2018 Daniel Moch
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-
-#
-# ** The MIT License **
-#
-# Copyright (c) 2014 Eric Davis (edavis@insanum.com)
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-# Dude... just buy me a beer. :-)
-#
+# -*- encoding: utf-8 -*-
from nnotes_cli import nncli
if __name__ == '__main__':
nncli.main()
-
diff --git a/nnotes_cli/__init__.py b/nnotes_cli/__init__.py
@@ -1,3 +1,5 @@
+# -*- encoding: utf-8 -*-
+
try:
from . import version
__version__ = version.version
diff --git a/nnotes_cli/clipboard.py b/nnotes_cli/clipboard.py
@@ -1,7 +1,8 @@
+# -*- encoding: utf-8 -*-
+
import os
from distutils import spawn
-
class Clipboard(object):
def __init__(self):
self.copy_command = self.get_copy_command()
diff --git a/nnotes_cli/config.py b/nnotes_cli/config.py
@@ -1,29 +1,4 @@
-#
-# The MIT License (MIT)
-#
-# Copyright (c) 2018 Daniel Moch
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-
-# Copyright (c) 2014 Eric Davis
-# Licensed under the MIT License
+# -*- encoding: utf-8 -*-
import os, sys, urwid, collections, configparser, subprocess
diff --git a/nnotes_cli/nextcloud_note.py b/nnotes_cli/nextcloud_note.py
@@ -1,41 +1,4 @@
-#
-# The MIT License (MIT)
-#
-# Copyright (c) 2018 Daniel Moch
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-
-# Copyright (c) 2014 Eric Davis
-# This file is *slightly* modified from simplynote.py.
-
# -*- coding: utf-8 -*-
-"""
- nextcloud_note.py
- ~~~~~~~~~~~~~~
-
- Python library for accessing the NextCloud Notes API (v0.2)
-
- Modified from simplnote.py
- :copyright: (c) 2011 by Daniel Schauenberg
- :license: MIT, see LICENSE for more details.
-"""
import urllib.parse
from requests.exceptions import RequestException, ConnectionError
diff --git a/nnotes_cli/nncli.py b/nnotes_cli/nncli.py
@@ -1,29 +1,4 @@
-#
-# The MIT License (MIT)
-#
-# Copyright (c) 2018 Daniel Moch
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-
-# Copyright (c) 2014 Eric Davis
-# Licensed under the MIT License
+# -*- encoding: utf-8 -*-
import os, sys, getopt, re, signal, time, datetime, shlex, hashlib
import subprocess, threading, logging
diff --git a/nnotes_cli/notes_db.py b/nnotes_cli/notes_db.py
@@ -1,33 +1,4 @@
-#
-# The MIT License (MIT)
-#
-# Copyright (c) 2018 Daniel Moch
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-
-# Copyright (c) 2014 Eric Davis
-# This file is *heavily* modified from nvpy.
-
-# nvPY: cross-platform note-taking app with simplenote syncing
-# copyright 2012 by Charl P. Botha <cpbotha@vxlabs.com>
-# new BSD license
+# -*- encoding: utf-8 -*-
import os, time, re, glob, json, copy, threading
from . import utils
diff --git a/nnotes_cli/temp.py b/nnotes_cli/temp.py
@@ -1,6 +1,4 @@
-
-# Copyright (c) 2014 Eric Davis
-# Licensed under the MIT License
+# -*- encoding: utf-8 -*-
import os, json, tempfile
diff --git a/nnotes_cli/user_input.py b/nnotes_cli/user_input.py
@@ -1,6 +1,4 @@
-
-# Copyright (c) 2014 Eric Davis
-# Licensed under the MIT License
+# -*- encoding: utf-8 -*-
import urwid
diff --git a/nnotes_cli/utils.py b/nnotes_cli/utils.py
@@ -1,33 +1,4 @@
-#
-# The MIT License (MIT)
-#
-# Copyright (c) 2018 Daniel Moch
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-
-# Copyright (c) 2014 Eric Davis
-# This file is *heavily* modified from nvpy.
-
-# nvPY: cross-platform note-taking app with simplenote syncing
-# copyright 2012 by Charl P. Botha <cpbotha@vxlabs.com>
-# new BSD license
+# -*- encoding: utf-8 -*-
import datetime, random, re
diff --git a/nnotes_cli/view_help.py b/nnotes_cli/view_help.py
@@ -1,6 +1,4 @@
-
-# Copyright (c) 2014 Eric Davis
-# Licensed under the MIT License
+# -*- encoding: utf-8 -*-
import re, urwid
diff --git a/nnotes_cli/view_log.py b/nnotes_cli/view_log.py
@@ -1,6 +1,4 @@
-
-# Copyright (c) 2014 Eric Davis
-# Licensed under the MIT License
+# -*- encoding: utf-8 -*-
import urwid
diff --git a/nnotes_cli/view_note.py b/nnotes_cli/view_note.py
@@ -1,6 +1,4 @@
-
-# Copyright (c) 2014 Eric Davis
-# Licensed under the MIT License
+# -*- encoding: utf-8 -*-
import time, urwid
from . import utils
diff --git a/nnotes_cli/view_titles.py b/nnotes_cli/view_titles.py
@@ -1,6 +1,4 @@
-
-# Copyright (c) 2014 Eric Davis
-# Licensed under the MIT License
+# encoding: utf-8 -*-
import re, time, datetime, urwid, subprocess
from . import utils, view_note
diff --git a/setup.py b/setup.py
@@ -1,29 +1,4 @@
-#
-# The MIT License (MIT)
-#
-# Copyright (c) 2018 Daniel Moch
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-
-# Copyright (c) 2014 Eric Davis
-# Licensed under the MIT License
+# -*- encoding: utf-8 -*-
from setuptools import setup
import nnotes_cli