🔗 🐍 share thoughts, ideas, links, notes.
Go to file
FoxMaSk 8c97f1e34e django 5 / getbootstrap 5.3 2023-12-04 22:03:14 +01:00
docs docker image #10 fixed 📦 2022-02-15 10:11:22 +01:00
shaarpy django 5 / getbootstrap 5.3 2023-12-04 22:03:14 +01:00
.dockerignore docker image #10 fixed 📦 2022-02-15 10:11:22 +01:00
.gitignore log 2022-02-05 21:39:55 +01:00
.gitlab-ci.yml add a pubDate node to the RSS Feeds 2022-05-30 18:51:29 +02:00
Dockerfile docker image #10 fixed 📦 2022-02-15 10:11:22 +01:00
LICENSE fix an error in the form with url :P 2022-01-29 21:07:35 +01:00
MANIFEST.in drop cache when logging out 2022-02-07 22:46:07 +01:00
README.md python3.11 django 4.2 and compliant with pelican 4.8 2023-06-02 16:55:24 +02:00
docker-compose.yml docker image #10 fixed 📦 2022-02-15 10:11:22 +01:00
manage.py first shot 2022-01-16 14:21:50 +01:00
pytest.ini fix an error in the form with url :P 2022-01-29 21:07:35 +01:00
requirements-conf-server.txt docker image #10 fixed 📦 2022-02-15 10:11:22 +01:00
requirements-dev.txt log 2022-02-05 21:39:55 +01:00
requirements.txt python3.11 django 4.2 and compliant with pelican 4.8 2023-06-02 16:55:24 +02:00
setup.cfg upd req 2022-10-25 14:40:46 +02:00
setup.py first shot 2022-01-16 14:21:50 +01:00
tox.ini fix an error in the form with url :P 2022-01-29 21:07:35 +01:00

README.md

ShaarPy

Share Thoughts, Ideas, Links, Notes.

a 'Shaarli cloned' in Python/Django

Have a look at https://shaarpy.foxmask.org/ for live instance

Main page

Features

Notes
  • Create notes in Markdown
  • Drop a URL and ShaarPy will grab the article page with image and video if the source website provides ones article with image
Tags
  • Manage tags
  • Tag Cloud

tag cloud

  • See the links of the day and navigate throw the calendar to go back to your old links

daily links

Tools
  • for each link added, a markdown file can be create in a folder that will be sync on your mobile with the help of "syncthing"
  • Import of Shaarli exported bookmark, or even FireFox bookmarks
  • you can export/import your data in json

export

python manage.py dumpdata --format json --indent 2 > fixtures/my_shaarpy_dump.json

import

python manage.py loaddata --format json  fixtures/my_shaarpy_dump.json

Bookmarklet

Drag the link you'll find under your profile, to the bookmark of the browser

Bookmarklet

Now you'are able to post a new link just be clicking this bookmarklet wherever you are on the web

If you don't host ShaarPy on a dedicated server, you can run it locally and sync the links in markdown file and sync them on mobile.

You're able to do that by settings the variable SHAARPY_LOCALSTORAGE_MD to a directory path in you .env file.

Then files are generated, you may found them on your mobile (thanks to syncthing for managing that task)

original webpage

Link of the website

Link in shaarpy

Shaarpy link on mobile

(I use "Epsilon Notes" for that)

Installation

📦 Installation

Requirements

  • Python from 3.8 to 3.11
  • Django from 4.0 to 4.2
  • pandoc

Installation

pandoc

sudo apt install pandoc

create a virtualenv

python3 -m venv shaarpy
cd shaarpy
source bin/activate

install the project

git clone https://git.afpy.org/foxmask/shaarpy
cd shaarpy

🔧 Settings

copy the sample config file

cp env.sample .env

and set the following values, for examples

# for meta
SHAARPY_NAME=ShaarPy FoxMaSk Links
SHAARPY_DESCRIPTION=Share thoughts, links ideas, notes
SHAARPY_AUTHOR=FoxMaSk
SHAARPY_ROBOT=index, follow
# for MD generation, set a path eg /home/foxmask/MesNotes/links or leave it empty to not use this feature
SHAARPY_LOCALSTORAGE_MD=
SHAARPY_STYLE=blue

SECRET=!DONTFORGETTOCHANGETHISVALUE!

# for production environment, set it to the URL of your 'ShaarPy'
# 1 set it to False
DEBUG=False
# 2 set it to the URL of your 'ShaarPy'
ALLOWED_HOSTS='127.0.0.1,localhost'
# 3 set it to your own domain hosting shaarpy
CSRF_TRUSTED_ORIGINS=https://*.mydomain.com

# for database
DB_ENGINE='django.db.backends.sqlite3'
DB_NAME='db.sqlite3'
DB_USER=''
DB_PASSWORD=''
DB_HOST=''
DB_PORT=''

# i18n/l10n
TIME_ZONE='Europe/Paris'
LANGUAGE_CODE='en-en'
USE_I18N=True
USE_TZ=True

📀 Database

setup the database

cd shaarpy
python manage.py migrate
python manage.py createsuperuser
python manage.py loaddata shaarpy/fixtures/my_shaarpy_data.json 

📣 Running the Server

start the project

python manage.py runserver localhost:8001

then, access the project with your browser http://127.0.0.1:8001/

Test

python manage.py test

or

pytest 

or

coverage run --source='.' -m pytest
coverage report -m

(logo, thanks to https://pixabay.com/fr/users/clker-free-vector-images-3736/ )