Coder Social home page Coder Social logo

digimarks's Introduction

digimarks

PyPI version PyPI license Code Health Codacy Badge

Simple bookmarking service, using a SQLite database to store bookmarks, supporting tags and automatic title fetching.

Installation

From PyPI

Assuming you already are inside a virtualenv:

pip install digimarks

From Git

Create a new virtualenv (if you are not already in one) and install the necessary packages:

git clone https://github.com/aquatix/digimarks.git
cd digimarks
mkvirtualenv digimarks # or whatever project you are working on
pip install -r requirements.txt

Usage / example configuration

Copy settings.py from example_config to the parent directory and configure to your needs (at the least change the value of SYSTEMKEY).

Do not forget to fill in the MASHAPE_API_KEY value, which you [can request on the RapidAPI website](https://rapidapi.com/realfavicongenerator/api/realfavicongenerator).

Run digimarks as a service under nginx or apache and call the appropriate url's when wanted.

Url's are of the form https://marks.example.com/<userkey>/<action>

Bookmarklet

To easily save a link from your browser, open its bookmark manager and create a new bookmark with as url:

javascript:location.href='http://marks.example.com/1234567890abcdef/add?url='+encodeURIComponent(location.href);

Creating a new user

After having set up the `settings.py` as under Usage, you can add a new user, by going to this path on your digimarks server:

/<secretkey>/adduser

where secretkey is the value set in settings.SYSTEMKEY

digimarks will then redirect to the bookmarks overview page of the new user. Please remember the user key (the hash in the url), as it will not be visible otherwise in the interface.

If you for whatever reason would lose this user key, just either look on the console (or webserver logs) where the list of available user keys is printed on digimarks startup, or open bookmarks.db with a SQLite editor.

Server configuration

What's new?

See the Changelog.

Attributions

'M' favicon by Freepik.

digimarks's People

Contributors

aquatix avatar codacy-badger avatar jelmer avatar snyk-bot avatar

Stargazers

 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

Forkers

asirxing mnishig

digimarks's Issues

AttributeError: module 'settings' has no attribute 'MASHAPE_API_KEY'

I installed digimarks with README.rst instruction.
but, when I bookmark add, following Error occured at brower screen and log .

127.0.0.1 - - [28/Apr/2020 10:01:02] "POST /0b239ff2044ef51995db310acdba97a36973af73616cf424/adding HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/opt/ws/digimarks/p3/lib/python3.7/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/opt/ws/digimarks/p3/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File "/opt/ws/digimarks/p3/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/opt/ws/digimarks/p3/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/opt/ws/digimarks/p3/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/ws/digimarks/p3/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/ws/digimarks/p3/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/opt/ws/digimarks/p3/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/opt/ws/digimarks/p3/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/ws/digimarks/p3/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/ws/digimarks/digimarks.py", line 781, in addingbookmark
    bookmark = updatebookmark(userkey)
  File "/opt/ws/digimarks/digimarks.py", line 765, in updatebookmark
    bookmark.set_favicon()
  File "/opt/ws/digimarks/digimarks.py", line 412, in set_favicon
    self._set_favicon_with_realfavicongenerator(domain)
  File "/opt/ws/digimarks/digimarks.py", line 362, in _set_favicon_with_realfavicongenerator
    headers={'User-Agent': DIGIMARKS_USER_AGENT, 'X-Mashape-Key': settings.MASHAPE_API_KEY}
AttributeError: module 'settings' has no attribute 'MASHAPE_API_KEY'

and I add MASHAPE_API_KEY at settings.py like this

MASHAPE_API_KEY = '[MY-SECRET-API-KEY]'

Digimarks looks like run normaly.
My suggestion, description of MASHAPE_API_KEY add to README.rst

Redirect fail with digimarks behinde reverse proxy.

I installed digimarks server behind reverse proxy.

https:// ====> reverse proxt : http:// =====> digimarks

in case, digimarks fail redirect after bookmark adding, editing ....

workaround: these code put in before app.run()

if name == 'main':
# run the application
#----- from here
from werkzeug.contrib.fixers import ProxyFix
app.wsgi_app = ProxyFix(app.wsgi_app)
#----- to
app.run(host='0.0.0.0', port=9999, debug=True)

chrome extension

It would be great if there was a chrome extension for managing bookmarks that integrated with digimarks.

An alternative would be for digimarks to e.g. implement an existing API (del.icio.us?) so that existing extensions for that API can be used with digimarks.

Ensure Python 3 compatibility

Currently, digimarks sort of assumes Python 2, which is... well... not optimal. Ensure it works under Python 3.5/3.6 too, or maybe even only support Python 3.

unit tests

digimarks currently does not have any unit tests, which makes making refactoring/improvements harder.

Create UI overlay for bookmarklet

I think it will be cool to have a popup style bookmarklet with some javascript injected into the page instead of being redirected away from the page. The injected javascript can do the API calls

Allow people to create their own page

As you can already kind of do so by just randomly enter a URL and start adding bookmarks [1], allow people to create a page on their own.

Preferably by using something like https://github.com/trezor/python-mnemonic for more friendly url's, or offer the choice between that and a more secret random string.

This can easily be implemented by a button on the homepage of a digimarks installation.

[1] which is slightly buggy as you don't have a User object, so you can't create public tag pages

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.