Skip to content

Instantly share code, notes, and snippets.

(defun vulpea-project-p ()
"Return non-nil if current buffer has any todo entry.
TODO entries marked as done are ignored, meaning the this
function returns nil if current buffer contains only completed
tasks."
(seq-find ; (3)
(lambda (type)
(eq type 'todo))
(org-element-map ; (2)
@jbinfo
jbinfo / scrapy_csv_exporter.md
Last active March 7, 2022 05:49
How to create a Scrapy CSV Exporter with a custom delimiter and order fields

Create a scrapy exporter on the root of your scrapy project, we suppose the name of your project is my_project, we can name this exporter: my_project_csv_item_exporter.py

from scrapy.conf import settings
from scrapy.contrib.exporter import CsvItemExporter

class MyProjectCsvItemExporter(CsvItemExporter):

    def __init__(self, *args, **kwargs):
 delimiter = settings.get('CSV_DELIMITER', ',')