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