Commit 0586132a85
Unsigned
Layout: unified · split
content/blog/2025-02-24-email-migration.org +12 −8
| @@ -145,18 +145,22 @@ it to. | ||
| 145 | 145 | For example, the header =X-Pm-Date: Fri, 07 Feb 2025 16:12:08 +0000= will be |
| 146 | 146 | split into a list as such: |
| 147 | 147 | |
| 148 | 0. X-Pm-Date: | |
| 149 | 1. Fri, | |
| 150 | 2. 07 | |
| 151 | 3. Feb | |
| 152 | 4. 2025 | |
| 153 | 5. 16:12:08 | |
| 154 | 6. +0000 | |
| 148 | #+begin_src python | |
| 149 | [ | |
| 150 | 'X-Pm-Date:', # 0 | |
| 151 | 'Fri,', # 1 | |
| 152 | '07', # 2 | |
| 153 | 'Feb', # 3 | |
| 154 | '2025', # 4 | |
| 155 | '16:12:08', # 5 | |
| 156 | '+0000' # 6 | |
| 157 | ] | |
| 158 | #+end_src | |
| 155 | 159 | |
| 156 | 160 | From this list, we select the fourth element (=2025=) and use that to build the |
| 157 | 161 | destination path. |
| 158 | 162 | |
| 159 | #+begin_src python | |
| 163 | ,#+begin_src python | |
| 160 | 164 | # _archive.py |
| 161 | 165 | import os |
| 162 | 166 | import glob |