| | 323 | |
| | 324 | (defun simple-hatena-group-setup () |
| | 325 | (interactive) |
| | 326 | "ディレクトリにはてなグループを追加する。" |
| | 327 | ;; hatena group(s) |
| | 328 | (simple-hatena-setup-group)) |
| | 329 | |
| | 330 | (defun simple-hatena-setup-group () |
| | 331 | (let |
| | 332 | ((groups (list)) |
| | 333 | (id simple-hatena-local-current-buffer-id)) |
| | 334 | (add-to-list |
| | 335 | 'groups (read-string |
| | 336 | (format "Pleas input create Hatena group for id:%s :" id))) |
| | 337 | |
| | 338 | (while (y-or-n-p |
| | 339 | (format |
| | 340 | "group '%s' found.\nsetup other group(s)? " |
| | 341 | (mapconcat 'identity |
| | 342 | groups "', `"))) |
| | 343 | (add-to-list |
| | 344 | 'groups (read-string |
| | 345 | (format |
| | 346 | "Pleas input create Hatena group for id:%s :" id)))) |
| | 347 | |
| | 348 | (dolist (group groups) |
| | 349 | (simple-hatena-setup-group-create-directory-and-file id group)))) |
| | 350 | |
| | 351 | (defun simple-hatena-setup-group-create-directory-and-file (id group) |
| | 352 | (simple-hatena-setup-create-directory-and-file |
| | 353 | (expand-file-name |
| | 354 | (format "%s/%s/group/%s/config.txt" |
| | 355 | simple-hatena-root id group)))) |