GithubHelp home page GithubHelp logo

fake-shaarli-server's Introduction

fake-shaarli-server

Python implementation of some of the Shaarli REST API

Just enough to convince the Shaarlier Android app it's a real server. Also (partially) works with python-shaarli-client.

This doesn't actual do anything and is essentially non-functional. It completely ignores security (JWT) tokens (it does not handle the deprecated username/password authentication option). Basically, don't use it ;) Use https://github.com/shaarli/Shaarli instead :)

Running

shaarli2linkding_proxy.py

Map from Shaarli REST API v1 into LinkDing REST API

Right now this only supports tag lookup and creating new entries (or overwritting existing) - which is enough for Shaarlier Android app to work properly (with the exception of lookup of existing bookmarks).

export LINKDING_TOKEN=secret  # REST API key/token from http://LinkDingServer/settings/integrations
export LINKDING_URI=http://LinkDingServer  # etc.
python shaarli2linkding_proxy.py

Testing

Testing with https://github.com/shaarli/python-shaarli-client, note examples below require https://github.com/clach04/python-shaarli-client/tree/callable_module See shaarli/python-shaarli-client#59

python -m shaarli_client.main -u http://localhost:8000 --secret SECRET get-info

# below require editing shaarli_client.ini - see https://python-shaarli-client.readthedocs.io/en/latest/user/configuration.html
python -m shaarli_client.main  get-info
python -m shaarli_client.main  get-tags

python -m shaarli_client.main  get-links
python -m shaarli_client.main  get-links --searchterm hello
python -m shaarli_client.main  get-links --searchterm hello --limit 2

python -m shaarli_client.main  post-link --title title --url http://something.com --description "cool stuff"
python -m shaarli_client.main  put-link --title title --url http://something.com 345

fake-shaarli-server's People

Contributors

clach04 avatar

Stargazers

David O'Trakoun avatar Loïc Carr avatar

Watchers

 avatar David O'Trakoun avatar  avatar

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.