From 74562bec98316aea458266d2dddd1583ff7cb797 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 20 Jun 2023 05:09:48 +0000 Subject: automatic import of python-django-simplemde --- .gitignore | 1 + python-django-simplemde.spec | 231 +++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 233 insertions(+) create mode 100644 python-django-simplemde.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..5a454a1 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/django-simplemde-0.1.4.tar.gz diff --git a/python-django-simplemde.spec b/python-django-simplemde.spec new file mode 100644 index 0000000..661322f --- /dev/null +++ b/python-django-simplemde.spec @@ -0,0 +1,231 @@ +%global _empty_manifest_terminate_build 0 +Name: python-django-simplemde +Version: 0.1.4 +Release: 1 +Summary: django-simplemde is a WYSIWYG markdown editor for Django +License: MIT +URL: https://github.com/onepill/django-simplemde +Source0: https://mirrors.aliyun.com/pypi/web/packages/4c/47/8542fdb6f3d599778bbaadc8d3898f700d1d43355a86d917d035d1ead03c/django-simplemde-0.1.4.tar.gz +BuildArch: noarch + + +%description +# A markdown editor(with preview) for Django +Use markdown editor https://github.com/sparksuite/simplemde-markdown-editor in django project, this project is inspired by https://github.com/douglasmiranda/django-wysiwyg-redactor/ + +# Getting started +* install django-simplemde +``` +pip install django-simplemde +``` + +* add 'simplemde' to INSTALLED_APPS. + +```python +INSTALLED_APPS = ( + # ... + 'simplemde', + # ... +) +``` + +# Using in models +```python +from django.db import models +from simplemde.fields import SimpleMDEField + +class Entry(models.Model): + title = models.CharField(max_length=250, verbose_name=u'Title') + content = SimpleMDEField(verbose_name=u'mardown content') +``` + +# SimpleMDE options +You could set SimpleMDE options in settings.py like this: + +```python +SIMPLEMDE_OPTIONS = { + 'placeholder': 'haha', + 'status': False, + 'autosave': { + 'enabled': True + } +} +``` + +Right now this plugin supports [SimpleMDE Configurations](https://github.com/sparksuite/simplemde-markdown-editor#configuration), but only the static ones(don't support js configurations like ```previewRender```) + +***for autosave option, you dont need to set it, this plugin will generate uniqueId with python's uuid.uuid4 automatically*** + +# Get SimpleMDE instance from DOM + +After SimpleMDE initialized, you could get SimpleMDE instance from dom element like this: + +```javascript +$('.simplemde-box')[0].SimpleMDE +``` + + +%package -n python3-django-simplemde +Summary: django-simplemde is a WYSIWYG markdown editor for Django +Provides: python-django-simplemde +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-django-simplemde +# A markdown editor(with preview) for Django +Use markdown editor https://github.com/sparksuite/simplemde-markdown-editor in django project, this project is inspired by https://github.com/douglasmiranda/django-wysiwyg-redactor/ + +# Getting started +* install django-simplemde +``` +pip install django-simplemde +``` + +* add 'simplemde' to INSTALLED_APPS. + +```python +INSTALLED_APPS = ( + # ... + 'simplemde', + # ... +) +``` + +# Using in models +```python +from django.db import models +from simplemde.fields import SimpleMDEField + +class Entry(models.Model): + title = models.CharField(max_length=250, verbose_name=u'Title') + content = SimpleMDEField(verbose_name=u'mardown content') +``` + +# SimpleMDE options +You could set SimpleMDE options in settings.py like this: + +```python +SIMPLEMDE_OPTIONS = { + 'placeholder': 'haha', + 'status': False, + 'autosave': { + 'enabled': True + } +} +``` + +Right now this plugin supports [SimpleMDE Configurations](https://github.com/sparksuite/simplemde-markdown-editor#configuration), but only the static ones(don't support js configurations like ```previewRender```) + +***for autosave option, you dont need to set it, this plugin will generate uniqueId with python's uuid.uuid4 automatically*** + +# Get SimpleMDE instance from DOM + +After SimpleMDE initialized, you could get SimpleMDE instance from dom element like this: + +```javascript +$('.simplemde-box')[0].SimpleMDE +``` + + +%package help +Summary: Development documents and examples for django-simplemde +Provides: python3-django-simplemde-doc +%description help +# A markdown editor(with preview) for Django +Use markdown editor https://github.com/sparksuite/simplemde-markdown-editor in django project, this project is inspired by https://github.com/douglasmiranda/django-wysiwyg-redactor/ + +# Getting started +* install django-simplemde +``` +pip install django-simplemde +``` + +* add 'simplemde' to INSTALLED_APPS. + +```python +INSTALLED_APPS = ( + # ... + 'simplemde', + # ... +) +``` + +# Using in models +```python +from django.db import models +from simplemde.fields import SimpleMDEField + +class Entry(models.Model): + title = models.CharField(max_length=250, verbose_name=u'Title') + content = SimpleMDEField(verbose_name=u'mardown content') +``` + +# SimpleMDE options +You could set SimpleMDE options in settings.py like this: + +```python +SIMPLEMDE_OPTIONS = { + 'placeholder': 'haha', + 'status': False, + 'autosave': { + 'enabled': True + } +} +``` + +Right now this plugin supports [SimpleMDE Configurations](https://github.com/sparksuite/simplemde-markdown-editor#configuration), but only the static ones(don't support js configurations like ```previewRender```) + +***for autosave option, you dont need to set it, this plugin will generate uniqueId with python's uuid.uuid4 automatically*** + +# Get SimpleMDE instance from DOM + +After SimpleMDE initialized, you could get SimpleMDE instance from dom element like this: + +```javascript +$('.simplemde-box')[0].SimpleMDE +``` + + +%prep +%autosetup -n django-simplemde-0.1.4 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-django-simplemde -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot - 0.1.4-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..cdb7b3d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +f08f17a9cc592a0f7c28012721193c82 django-simplemde-0.1.4.tar.gz -- cgit v1.2.3