From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: Re: org table with datestamp convert to csv and then xlsx or ods: problem
Date: Mon, 08 Jan 2018 15:04:29 +0100 [thread overview]
Message-ID: <877essxx8y.fsf@mat.ucm.es> (raw)
In-Reply-To: 87incc5vvi.fsf@nicolasgoaziou.fr
> Hello,
> Uwe Brauer <oub@mat.ucm.es> writes:
> None. The export to CSV looks correct and complete. Conversion to CSV
> does not pretend converting anything else, in particular timestamps, to
> another format.
Ok,
Now how could that be achieved? I seem not the only one missing that a
feature.
https://lists.gnu.org/archive/html/emacs-orgmode/2016-11/msg00398.html
So I googled and
I tried
https://stackoverflow.com/questions/23297422/org-mode-timestamp-format-when-exported
Like
(defun org-export-filter-timestamp-remove-brackets (timestamp backend info)
"removes relevant brackets from a timestamp"
(cond
((org-export-derived-backend-p backend 'latex)
(replace-regexp-in-string "[<>]\\|[][]" "" timestamp))
((org-export-derived-backend-p backend 'orgtbl-to-csv)
(replace-regexp-in-string "[<>]\\|[][]" "" timestamp))
((org-export-derived-backend-p backend 'ascii)
(replace-regexp-in-string "[<>]\\|[][]" "" timestamp))
((org-export-derived-backend-p backend 'html)
(replace-regexp-in-string "&[lg]t;\\|[][]" "" timestamp))))
(eval-after-load 'ox '(add-to-list
'org-export-filter-timestamp-functions
'org-export-filter-timestamp-remove-brackets))
(defun org-ascii-timestamp (timestamp _contents info)
(format-time-string
"%d.%m.%y"
(org-read-date nil t (org-timestamp-translate timestamp))))
(add-to-list 'org-export-filter-timestamp-functions
#'endless/filter-timestamp)
(defun endless/filter-timestamp (trans back _comm)
"Remove <> around time-stamps."
(pcase back
((or `jekyll `html)
(replace-regexp-in-string "&[lg]t;" "" trans))
(`latex
(replace-regexp-in-string "[<>]" "" trans))
(`ascii
(replace-regexp-in-string "[<>]" "" trans))
(`csv
(replace-regexp-in-string "[<>]" "" trans))))
But nothing helped.
Thanks
Uwe Brauer
next prev parent reply other threads:[~2018-01-08 14:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-07 16:51 org table with datestamp convert to csv and then xlsx or ods: problem Uwe Brauer
2018-01-08 13:21 ` Nicolas Goaziou
2018-01-08 14:04 ` Uwe Brauer [this message]
2018-01-08 14:32 ` Nicolas Goaziou
2018-01-08 14:59 ` Uwe Brauer
2018-01-08 15:04 ` Nicolas Goaziou
2018-01-08 15:15 ` Uwe Brauer
2018-01-08 15:38 ` Nicolas Goaziou
2018-01-08 16:29 ` Uwe Brauer
2018-01-08 19:51 ` Nicolas Goaziou
2018-01-08 22:11 ` Uwe Brauer
2018-01-08 22:11 ` Uwe Brauer
2018-01-08 23:36 ` Nicolas Goaziou
2018-01-09 8:22 ` Uwe Brauer
2018-01-09 8:23 ` Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877essxx8y.fsf@mat.ucm.es \
--to=oub@mat.ucm.es \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.