shaarpy


Nameshaarpy JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/foxmask/shaarpy/
Summary"ShaarPy: Share your thoughts, links, ideas, notes. If you ever wanted Shaarli in python, that's it ^_*"
upload_time2024-08-03 16:13:31
maintainerNone
docs_urlNone
author폭스마스크
requires_python>=3.10
licenseWTFPL
keywords python django shaarli
VCS
bugtrack_url
requirements Django django-environ django-simple-search newspaper3k pypandoc rich pytz python-slugify Jinja2 psycopg2 lxml
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ShaarPy

<img src="https://github.com/foxmask/shaarpy/blob/main/docs/shaarpy.png" height="179" width="200"/>

Share Thoughts, Ideas, Links, Notes.

a 'Shaarli cloned' in Python/Django

![Main page](https://github.com/foxmask/shaarpy/blob/main/docs/shaarpy_home.png)

## Features


* microblogging
* Load Pelican blog markdown files

### Notes

- Create *notes* in **Markdown**

### Links

- Drop a URL and ShaarPy will grab the article page with **image** and **video** if the source website provides ones
<a href="https://github.com/foxmask/shaarpy/blob/main/docs/shaarpy_article.png"><img src="https://github.com/foxmask/shaarpy/blob/main/docs/shaarpy_article.png" alt="article with image" width="400"/></a>

### Tags

- Manage tags
- Tag Cloud

<a href="https://github.com/foxmask/shaarpy/blob/main/docs/tags_list.png"><img src="https://github.com/foxmask/shaarpy/blob/main/docs/tags_list.png" alt="tag cloud" width="400"/></a>

### Daily links history

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

<a href="https://github.com/foxmask/shaarpy/blob/main/docs/daily.png"><img src="https://github.com/foxmask/shaarpy/blob/main/docs/daily.png" alt="daily links" width="400"/></a>

### 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](https://syncthing.net/)"
- Import of  **Shaarli** exported bookmark, or even **FireFox** bookmarks
- you can export/import your data in **json**
- Import your Pelican blog markdown files

**export**

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

**import**

```bash
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](https://github.com/foxmask/shaarpy/blob/main/docs/bookmarklet.png)

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

## Links sync on mobile

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.

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


### original webpage

![Link of the website](https://github.com/foxmask/shaarpy/blob/main/docs/shaarpy_article_website.png)

### shaarpy grabbed link

![Link in shaarpy](https://github.com/foxmask/shaarpy/blob/main/docs/shaarpy_article.png)

### shaarpy link on mobile

![Shaarpy link on mobile](https://github.com/foxmask/shaarpy/blob/main/docs/article_mobile.png)

(I use "Epsilon Notes" for that)


## Installation

## :package: Installation

### Requirements

* Python from 3.10 3.11 3.12
* Django from 5.0
* pandoc

### Installation

pandoc

```bash
sudo apt install pandoc
```

create a virtualenv

```bash
python3 -m venv shaarpy
cd shaarpy
source bin/activate
```

install the project

```bash
git clone https://github.com/foxmask/shaarpy.git
cd shaarpy
```

##  :wrench: Settings

copy the sample config file

```bash
cp env.sample .env
```

and set the following values, for examples

```ini
# for meta
SHAARPY_NAME=Shaarpy
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
```

## :dvd: Database

setup the database

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

## :mega: Running the Server

### start the project

```bash
python manage.py runserver localhost:8001
```

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

### Test

```bash
python manage.py test
```

or

```bash
pytest
```
or

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


## DOCKER

build the image and run the container

```bash
sudo docker compose up --build -d
```

then, the first installation, do:

```bash
sudo docker compose exec web python manage.py migrate --noinput
sudo docker compose exec web python manage.py createsuperuser
```


## Logo

(logo, thanks to [https://pixabay.com/fr/users/clker-free-vector-images-3736/](https://pixabay.com/fr/vectors/serpent-python-vert-reptile-faune-312561/) )

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/foxmask/shaarpy/",
    "name": "shaarpy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "python django shaarli",
    "author": "\ud3ed\uc2a4\ub9c8\uc2a4\ud06c",
    "author_email": "foxmask+git@pm.me",
    "download_url": "https://files.pythonhosted.org/packages/01/ba/2eb8537f1588a1097a88dff563e607e6895217c2ca351ac043b93a6733d1/shaarpy-1.1.0.tar.gz",
    "platform": null,
    "description": "# ShaarPy\n\n<img src=\"https://github.com/foxmask/shaarpy/blob/main/docs/shaarpy.png\" height=\"179\" width=\"200\"/>\n\nShare Thoughts, Ideas, Links, Notes.\n\na 'Shaarli cloned' in Python/Django\n\n![Main page](https://github.com/foxmask/shaarpy/blob/main/docs/shaarpy_home.png)\n\n## Features\n\n\n* microblogging\n* Load Pelican blog markdown files\n\n### Notes\n\n- Create *notes* in **Markdown**\n\n### Links\n\n- Drop a URL and ShaarPy will grab the article page with **image** and **video** if the source website provides ones\n<a href=\"https://github.com/foxmask/shaarpy/blob/main/docs/shaarpy_article.png\"><img src=\"https://github.com/foxmask/shaarpy/blob/main/docs/shaarpy_article.png\" alt=\"article with image\" width=\"400\"/></a>\n\n### Tags\n\n- Manage tags\n- Tag Cloud\n\n<a href=\"https://github.com/foxmask/shaarpy/blob/main/docs/tags_list.png\"><img src=\"https://github.com/foxmask/shaarpy/blob/main/docs/tags_list.png\" alt=\"tag cloud\" width=\"400\"/></a>\n\n### Daily links history\n\n- See the links of the day and navigate throw the calendar to go back to your old links\n\n<a href=\"https://github.com/foxmask/shaarpy/blob/main/docs/daily.png\"><img src=\"https://github.com/foxmask/shaarpy/blob/main/docs/daily.png\" alt=\"daily links\" width=\"400\"/></a>\n\n### Tools\n\n- 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](https://syncthing.net/)\"\n- Import of  **Shaarli** exported bookmark, or even **FireFox** bookmarks\n- you can export/import your data in **json**\n- Import your Pelican blog markdown files\n\n**export**\n\n```bash\npython manage.py dumpdata --format json --indent 2 > fixtures/my_shaarpy_dump.json\n```\n\n**import**\n\n```bash\npython manage.py loaddata --format json  fixtures/my_shaarpy_dump.json\n```\n\n### Bookmarklet\n\nDrag the link you'll find under your profile, to the bookmark of the browser\n\n![Bookmarklet](https://github.com/foxmask/shaarpy/blob/main/docs/bookmarklet.png)\n\nNow you'are able to post a new link just be clicking this bookmarklet wherever you are on the web\n\n## Links sync on mobile\n\nIf 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.\n\nThen files are generated, you may found them on your mobile (thanks to syncthing for managing that task)\n\n\n### original webpage\n\n![Link of the website](https://github.com/foxmask/shaarpy/blob/main/docs/shaarpy_article_website.png)\n\n### shaarpy grabbed link\n\n![Link in shaarpy](https://github.com/foxmask/shaarpy/blob/main/docs/shaarpy_article.png)\n\n### shaarpy link on mobile\n\n![Shaarpy link on mobile](https://github.com/foxmask/shaarpy/blob/main/docs/article_mobile.png)\n\n(I use \"Epsilon Notes\" for that)\n\n\n## Installation\n\n## :package: Installation\n\n### Requirements\n\n* Python from 3.10 3.11 3.12\n* Django from 5.0\n* pandoc\n\n### Installation\n\npandoc\n\n```bash\nsudo apt install pandoc\n```\n\ncreate a virtualenv\n\n```bash\npython3 -m venv shaarpy\ncd shaarpy\nsource bin/activate\n```\n\ninstall the project\n\n```bash\ngit clone https://github.com/foxmask/shaarpy.git\ncd shaarpy\n```\n\n##  :wrench: Settings\n\ncopy the sample config file\n\n```bash\ncp env.sample .env\n```\n\nand set the following values, for examples\n\n```ini\n# for meta\nSHAARPY_NAME=Shaarpy\nSHAARPY_DESCRIPTION=Share thoughts, links ideas, notes\nSHAARPY_AUTHOR=FoxMaSk\nSHAARPY_ROBOT=index, follow\n# for MD generation, set a path eg /home/foxmask/MesNotes/links or leave it empty to not use this feature\nSHAARPY_LOCALSTORAGE_MD=\nSHAARPY_STYLE=blue\n\nSECRET=!DONTFORGETTOCHANGETHISVALUE!\n\n# for production environment, set it to the URL of your 'ShaarPy'\n# 1 set it to False\nDEBUG=False\n# 2 set it to the URL of your 'ShaarPy'\nALLOWED_HOSTS='127.0.0.1,localhost'\n# 3 set it to your own domain hosting shaarpy\nCSRF_TRUSTED_ORIGINS=https://*.mydomain.com\n\n# for database\nDB_ENGINE='django.db.backends.sqlite3'\nDB_NAME='db.sqlite3'\nDB_USER=''\nDB_PASSWORD=''\nDB_HOST=''\nDB_PORT=''\n\n# i18n/l10n\nTIME_ZONE='Europe/Paris'\nLANGUAGE_CODE='en-en'\nUSE_I18N=True\nUSE_TZ=True\n```\n\n## :dvd: Database\n\nsetup the database\n\n```bash\ncd shaarpy\npython manage.py migrate\npython manage.py createsuperuser\npython manage.py loaddata shaarpy/fixtures/my_shaarpy_data.json\n```\n\n## :mega: Running the Server\n\n### start the project\n\n```bash\npython manage.py runserver localhost:8001\n```\n\nthen, access the project with your browser http://127.0.0.1:8001/\n\n### Test\n\n```bash\npython manage.py test\n```\n\nor\n\n```bash\npytest\n```\nor\n\n```bash\ncoverage run --source='.' -m pytest\ncoverage report -m\n```\n\n\n## DOCKER\n\nbuild the image and run the container\n\n```bash\nsudo docker compose up --build -d\n```\n\nthen, the first installation, do:\n\n```bash\nsudo docker compose exec web python manage.py migrate --noinput\nsudo docker compose exec web python manage.py createsuperuser\n```\n\n\n## Logo\n\n(logo, thanks to [https://pixabay.com/fr/users/clker-free-vector-images-3736/](https://pixabay.com/fr/vectors/serpent-python-vert-reptile-faune-312561/) )\n",
    "bugtrack_url": null,
    "license": "WTFPL",
    "summary": "\"ShaarPy: Share your thoughts, links, ideas, notes. If you ever wanted Shaarli in python, that's it ^_*\"",
    "version": "1.1.0",
    "project_urls": {
        "Documentation": "https://github.com/foxmask/shaarpy/wiki",
        "Homepage": "https://github.com/foxmask/shaarpy/",
        "Source": "https://github.com/foxmask/shaarpy/",
        "Tracker": "https://github.com/foxmask/shaarpy/issues"
    },
    "split_keywords": [
        "python",
        "django",
        "shaarli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "80a7abdf77ea18738f66c49541ababe1178eb6308d25b15ee7c7c8c437ff4385",
                "md5": "8ef6e6e90ba2172ab157cbe8207c13cc",
                "sha256": "89a9653f8013afb508632420d934bf7b86a8a9f13378120c5b9794446005f341"
            },
            "downloads": -1,
            "filename": "shaarpy-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8ef6e6e90ba2172ab157cbe8207c13cc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 281626,
            "upload_time": "2024-08-03T16:13:27",
            "upload_time_iso_8601": "2024-08-03T16:13:27.926867Z",
            "url": "https://files.pythonhosted.org/packages/80/a7/abdf77ea18738f66c49541ababe1178eb6308d25b15ee7c7c8c437ff4385/shaarpy-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "01ba2eb8537f1588a1097a88dff563e607e6895217c2ca351ac043b93a6733d1",
                "md5": "971b947bcead8582f091e6a3b3888183",
                "sha256": "ef6346198a7864397e9873c99ca39bfa22492f045d62b0243fb33d8901080fd3"
            },
            "downloads": -1,
            "filename": "shaarpy-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "971b947bcead8582f091e6a3b3888183",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 267338,
            "upload_time": "2024-08-03T16:13:31",
            "upload_time_iso_8601": "2024-08-03T16:13:31.021316Z",
            "url": "https://files.pythonhosted.org/packages/01/ba/2eb8537f1588a1097a88dff563e607e6895217c2ca351ac043b93a6733d1/shaarpy-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-03 16:13:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "foxmask",
    "github_project": "shaarpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "Django",
            "specs": [
                [
                    "==",
                    "5.0.6"
                ]
            ]
        },
        {
            "name": "django-environ",
            "specs": [
                [
                    "==",
                    "0.11.2"
                ]
            ]
        },
        {
            "name": "django-simple-search",
            "specs": [
                [
                    "==",
                    "1.0.2"
                ]
            ]
        },
        {
            "name": "newspaper3k",
            "specs": [
                [
                    "==",
                    "0.2.8"
                ]
            ]
        },
        {
            "name": "pypandoc",
            "specs": [
                [
                    "==",
                    "1.13"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    "==",
                    "13.7.1"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": []
        },
        {
            "name": "python-slugify",
            "specs": []
        },
        {
            "name": "Jinja2",
            "specs": []
        },
        {
            "name": "psycopg2",
            "specs": []
        },
        {
            "name": "lxml",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "shaarpy"
}
        
Elapsed time: 0.32726s