Add Commands #1

Closed
opened 2025-10-13 22:49:56 -04:00 by Cutieguwu · 2 comments
Owner

New commands should include:

update
Using a .lock or equivalent file, rebuild all posts with newer modification dates, and build new posts that are not yet tracked.

build
Using provided flags for a singular post directory, or individual post.md, meta.ron, template.html, and image dir, build that post.

refresh
Rebuild all tracked posts, images, or both.

clean
Remove target build directory and .lock or equivalent file.

update and build require additional arugments, including FALLBACK_META.

Structure something like:

enum Commands {
    Build {
        fallback_meta,
        meta,
        post_md,
        template_html,
    },
    Update {
        fallback_meta,
        post_tree,
    },
    Refresh (
        command: RefreshCommand
    ),
    Clean,
}

enum RefreshCommand {
    Image,
    Post,
    All, // Both of the above
}
New commands should include: `update` Using a `.lock` or equivalent file, rebuild all posts with newer modification dates, and build new posts that are not yet tracked. `build` Using provided flags for a singular post directory, or individual post.md, meta.ron, template.html, and image dir, build that post. `refresh` Rebuild all tracked posts, images, or both. `clean` Remove target build directory and `.lock` or equivalent file. `update` and `build` require additional arugments, including FALLBACK_META. Structure something like: ```rust enum Commands { Build { fallback_meta, meta, post_md, template_html, }, Update { fallback_meta, post_tree, }, Refresh ( command: RefreshCommand ), Clean, } enum RefreshCommand { Image, Post, All, // Both of the above } ```
Cutieguwu added the enhancement label 2025-10-13 22:49:56 -04:00
Cutieguwu self-assigned this 2025-10-13 22:49:56 -04:00
Author
Owner

I need to get a bit more familiar with clap-rs.

I need to get a bit more familiar with clap-rs.
Cutieguwu referenced this issue from a commit 2025-10-14 13:03:42 -04:00
Author
Owner

Completed in 3937777255.

Completed in 3937777255b826809c4049315308a3e6df6b2f28.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Cutieguwu/cutinews#1