boxydog
82b48fcfa1
Fixes in files for ruff T201, RUF001, PLR2004, B904, SLOT000, PYI024, PIE800
2024-05-31 10:41:24 -05:00
boxydog
9b77a9027b
File fixes for ruff B007, RUF015, PLR1722
2024-05-31 08:48:44 -05:00
boxydog
4af40e8077
pre-commit filter auto-indents templates, css, js
2024-05-31 07:34:01 -05:00
boxydog
98bdd87dae
Apply pre-commit filters to the files in pelican/tests/output
2024-05-31 07:21:40 -05:00
boxydog
7577dd7603
More ruff fixes in files: stop ignoring C408, UP007, PLR5501, B006
2024-05-30 13:21:12 -05:00
boxydog
9d30c5608a
Code changes for more ruff checks
2024-05-30 12:21:52 -05:00
boxydog
0bd02c00c0
Ruff v0.4.6 auto-fixes
2024-05-30 10:53:38 -05:00
boxydog
6d8597addb
The ruff and ruff-format fixes
2024-05-30 09:08:16 -05:00
boxydog
1001dcb609
Fix test_deprecated_attribute failures in github tests
2024-05-29 16:36:20 -05:00
boxydog
d6a33f1d21
Medium post importer (from medium export)
2024-01-16 16:56:07 -06:00
Deniz Turgut
86d6898517
remove WRITE_SELECTED
...
Implementation is buggy and unreliable. Therefore, it is better to
remove the functionality until a robust implementation is added.
2023-11-12 19:43:26 +03:00
Justin Mayer
ecd598f293
Update code base for Python 3.8 and above
...
Result of: pipx run pyupgrade --py38-plus pelican/**/*.py
2023-11-12 13:53:02 +01:00
Paolo Melchiorre
6059675d55
Fix #3233 -- Simple theme classless semantic HTML
2023-11-11 14:10:08 +01:00
Deniz Turgut
e014e5b55b
add notmyidea font license
2023-11-04 01:00:51 +03:00
Deniz Turgut
451b094a94
remove social icons from notmyidea theme
...
redistribution of these icons may not be compatible with AGPL
2023-11-04 00:54:21 +03:00
Deniz Turgut
8a8b952ecb
preserve connection order in blinker
2023-11-03 01:13:12 +03:00
Deniz Turgut
feae8ef41c
Provide a plugin_enabled Jinja test for themes
2023-11-01 22:49:15 +03:00
Justin Mayer
a20cd8dda5
Merge pull request #3231 from getpelican/enforce-code-style
2023-10-30 19:49:58 +01:00
Lioman
4e438ffe60
Enable tests to validate dist build contents ( #3229 )
2023-10-30 16:04:44 +01:00
Deniz Turgut
f0aab11a2d
Force git subprocess in tests to use utf-8
2023-10-30 00:53:15 +03:00
Chris Rose
271f4dd68f
Strip trailing whitespace
2023-10-29 22:19:44 +01:00
Chris Rose
cabdb26cee
Apply code style to project via: ruff format .
2023-10-29 22:18:29 +01:00
Justin Mayer
cce1570135
Fix some comments in wheel-related test
2023-10-29 15:53:11 +01:00
Lioman
8b6d215934
migrate configuration to PEP621 compatible config
...
- adapt documentation
- add wheel tests to check wheel contents.
- adapt pipeline to use pdm
- adapt autopub config
- add scripts as shortcuts to invoke tasks
2023-10-29 11:59:58 +01:00
boxydog
fad2ff7ae3
Add unit test utilities temporary_locale and TestCaseWithCLocale ( #3224 )
2023-10-29 00:40:40 +02:00
Justin Mayer
3dce25ab23
Merge pull request #3151 from RealOrangeOne/feature/watchfiles
2023-10-28 23:23:44 +02:00
Justin Mayer
85bf98232d
Merge pull request #3148 from djramones/period-archives-context
2023-10-28 22:22:11 +02:00
Will Thong
8a7e01646b
Add rel='nofollow' to all external hardcoded links in templates ( #3162 )
2023-10-28 22:11:44 +02:00
Deniz Turgut
b8d5919cd2
expand period tests to be more specific
2023-10-28 22:11:11 +03:00
Jake Howard
631ac1bdb3
Cleanup imports
2023-10-28 17:17:14 +03:00
Jake Howard
61ca47c519
Use watchfiles as a file watching backend
...
This doesn't use polling unless absolutely necessarily, making it more efficient. It also reduces the amount of first-party code required, and simplifies working out which files are being watched.
2023-10-28 17:15:54 +03:00
Justin Mayer
6ed7395812
Merge pull request #3221 from avaris/importer-fixes
2023-10-28 16:10:47 +02:00
Deniz Turgut
83a8059d02
force timestamp conversion in tumblr importer to be UTC with offset and adjust tests
2023-10-28 16:50:34 +03:00
Justin Mayer
a20bbb55d6
Merge pull request #3044 from copperchin/fix-3042
2023-10-28 14:28:42 +02:00
Deniz Turgut
b6a9a8333b
skip tests that require git if git is not installed
...
and minor tweaks to subprocess handling
2023-10-28 14:57:33 +03:00
boxydog
9c87d8f3a3
Deal with broken embedded video links when importing from Tumblr ( #3218 )
...
Co-authored-by: boxydog <boxydog@users.noreply.github.com>
Co-authored-by: Will Thong <will@willthong.com>
2023-10-28 12:56:00 +02:00
boxydog
1404a2dbc3
Remove newline when importing Tumblr post photos ( #3215 )
...
Co-authored-by: Dan Frankowski <dfrankow@gmail.com>
2023-10-27 21:56:34 +02:00
Martin (mart-e)
48166bd687
Convert Wordpress caption to figure
...
In Wordpress, inserting image with a caption can look like:
[caption id="attachment_42" caption="Image Description"]<a ...><img ... /></a>[/caption]
[caption id="attachment_42"]<a ...><img ... /></a> Image Description[/caption]
[caption id="attachment_42"]<img ... > Image Description[/caption]
Replace by an HTML figure tag
2023-10-03 11:45:31 +02:00
Will Thong
2eeff62fd7
Replace pytz dependency in tests ( #3165 )
2023-08-15 20:07:39 +02:00
(GalaxyMaster)
b8bf5950b6
Adding missing tests for truncate_html_words() ( #2918 )
2023-07-12 11:28:26 +02:00
DJ Ramones
5214248344
Implement period_archives common context variable
...
Also, set default patterns for time-period *_ARCHIVE_URL settings.
2023-06-18 11:07:39 +08:00
Justin Mayer
1b360acafa
Merge pull request #3114 from mart-e/import-markdown-wp
2023-06-04 10:35:44 +02:00
FriedrichFroebel
7adcfc7938
Allow resetting memoized cache. Fixes #3110 .
2023-04-24 18:44:50 +02:00
Martin (mart-e)
219c01afb0
[IMP] pelican_import with gmf instead of markdown
...
The markdown import of pandoc is their own flavour of markdown. It for
instance uses fenced divs[1] which are not supported by
python-markdown. When importing content from Wordpress, there is
several issues as explained in discussion 3113[2]
This change follows a discussion with pandoc developer[3]
[1] https://pandoc.org/MANUAL.html#divs-and-spans
[2] https://github.com/getpelican/pelican/discussions/3113
[3] https://fosstodon.org/@pandoc/110105559949588768
Take the following Wordpress blog post sample:
```html
<p><!-- wp:paragraph --></p>
<p>Paragraph content</p>
<p><!-- /wp:paragraph --></p>
<p><!-- wp:image {"align":"center","id":3747,"sizeSlug":"full"} --></p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img src="https://test.com/test.jpg " alt="" class="wp-image-3747" title="Some title"/><br />
<figcaption><em>Some caption</em></figcaption>
</figure>
</div>
<p><!-- /wp:image --></p>
```
Before this commit:
was imported as
```md
`<!-- wp:paragraph -->`{=html}
Paragraph content
`<!-- /wp:paragraph -->`{=html}
`<!-- wp:image {"align":"center","id":3747,"sizeSlug":"full"} -->`{=html}
::: wp-block-image
<figure class="aligncenter size-full">
<img src="https://test.com/test.jpg " title="Some title"
class="wp-image-3747" /><br />
<figcaption><em>Some caption</em></figcaption>
</figure>
:::
`<!-- /wp:image -->`{=html}
```
After this change:
```md
<!-- wp:paragraph -->
Paragraph content
<!-- /wp:paragraph -->
<!-- wp:image {"align":"center","id":3747,"sizeSlug":"full"} -->
<div class="wp-block-image">
<figure class="aligncenter size-full">
<img src="https://test.com/test.jpg " title="Some title"
class="wp-image-3747" /><br />
<figcaption><em>Some caption</em></figcaption>
</figure>
</div>
<!-- /wp:image -->
```
Fixes #3113
2023-03-29 14:07:23 +02:00
Justin Mayer
385d5bf75e
Update functional test output
2023-03-27 10:02:07 +02:00
Ryan de Kleer
b10c7c699b
Fix false-positive in content gen. test failures
...
Assert equal dirs by return value of diff subprocess, rather than its output.
This prevents tests from failing when file contents are the same but the
file modes are different.
Fix #3042
2022-11-27 22:53:49 -08:00
Deniz Turgut
3937028c00
update unit test to avoid using deprecated locale.getdefaultlocale()
2022-10-26 23:52:38 +03:00
Ryan de Kleer
27f2c678cb
Use tmp dir for test output
...
`shutil.rmtree` would fail in `TestUtils.test_clean_output_dir` on some
filesystems if an application with a filewatcher had the pelican project
open while the test ran.
Using `tempfile.mkdtmp` for test directories circumvents this.
2022-09-16 22:59:54 -07:00
Tim Gates
6cac8237cc
docs: Fix a few typos
...
There are small typos in:
- docs/tips.rst
- pelican/tests/__init__.py
Fixes:
- Should read `module` rather than `modulole`.
- Should read `console` rather than `cosole`.
Signed-off-by: Tim Gates <tim.gates@iress.com>
2022-07-24 07:55:18 +10:00
manhhomienbienthuy
d5d792060c
Fix #2982 : Improve _HTMLWordTruncator ( #3002 )
2022-07-11 19:47:37 +02:00