off-topic@nashikouen

a fun place, with pears! now downsized..
[Return] [bottom] [Catalog]
Posting mode: Reply
submition rules
  • Allowed file types are: .jpg, .png, .gif, .webp, .mp4, .mov, .webm, .mp3, .wav, .ogg, .flac, .swf, .swf
  • maximum files: 3
  • maximum upload size: 40.00 MB
  • duplicate files are not allowed
  • posts will be displayed in UTC time
  • max comment size is 8048 characters
  • tripcodes are enabled
  • BBCode is enabled
  • [ download ] 38.48 KB (474x355) th-2464435792.jpg

    What would be the optimal language to use if I'd want to automate the process of adding a new post to my html blog?

    curl.
    make a post and just open browser debugger and copy curl request.
    from there you would just change the post content. for images.. well idk. but yeah the shell

    and set up cron for how often you want it to post.

    this is /unix/ you should know how to do this..

    >What would be the optimal language to use if I'd want to automate the process of adding a new post to my html blog?

    so like, what are you actually doing?

    are you manually writing whole HTML pages and want them to be auto-uploaded to the site when the folder changes?
    that'd be a fairly simple shell script, you'd likely use inotifywait (on Linux, don't ask me anything about *BSD) to wait for changes and then sftp them to the server

    are you looking to use a static site generator where you write HTML snippets for entries and everything gets cobbled together into a set of pages with headers/footers/navigation/theming?
    you could roll your own and my lazy ass would also make that a shell script that basically just uses something like "for f in ./entries/*.part; do cat header.part $f footer.part > "$f".html", maybe with something thrown in the middle to handle page navigation programmatically
    where header/footer.part are just like, the HTML you put before/after your conten
    and if you don't feel like that, there are a buuunch of static site generators, pick one

    is this not a static site and you want to generate pages serverside? php, period, it is literally made for the job

    really though, if you just want language recs here, I will genuinely just say bash and python 100% of the time
    python annoys me but it's easy and generally just works
    part of me wants to learn tcl becuase it's like shell scripting but more cross platform, has a built-in GUI library, and is allegedly more self-consistent vs just using the infinitely expanding amount of bashisms with bonkers syntax while also expecting everyone to have a GNU userland lol (there are an awful lot of shell scripts I've written that will absolutely not work on a system that isn't literally "GNU/Linux" lol, although since my Windows systems all run WSL it doesn't matter and I can use them there)

    Assuming you mean you have a blog with plain html pages, you probably want a static site generator. There are many and most of them use markdown for the content and yaml for the metadata.
    I guess you could write your own static site generator with python, and then use something like nginx to serve the generated static files.

    [top]
    Delete Post: []
    Password:



    - you are running KotatsuBBS. a clear and easy to read image board software -