Change? OMG!
For a while now, I’ve been thinking about moving my blog from Hugo & PaperMod to BSSG.
Both are Static Site Generators, both use Markdown, both are Open Source. But as far as I can tell, the frontmatter of the documents differs between the two systems. This would mean that I’d have to at least check each and every md file by hand before moving it from Hugo to BSSG.
The main content of my blog, i. e. the posts and fixed pages which I wrote by hand, would not be an issue. Currently about 50 files to review and adjust. But I have also moved all my posts from Instagram and Pixelfed over, using a quick’n’dirty Visual Basic script to convert exported HTML into separate files. Hundreds of posts containing one or more images, a few hashtags and maybe a short comment.
I could rewrite that script to accommodate BSSG, but what about the next switch to a new platform a few years down the road?
How do you, fellow bloggers out there, handle this problem?
Should I create all my posts in some kind of basic format and write a translator script to create the final md file with the correct frontmatter? Should I learn Python or Rust and convert the current Hugo style files to BSSG input? And speaking for programming languages: which one should I learn, Python or Rust?
So many questions. :-)
teilten dies erneut
andyc
Als Antwort auf zeitverschreib [friendica] • • •Interesting. Currently going down the same route. As for converting the pesky Front Matter, well it seemed right and proper to use bash and sed.
# Delete all 'Comments' lines.
# Join up multiple categories into single Categories line.
# Finally convert Categories to Tags
for file in *.md
do
echo "Processing $file..."
sed --in-place '/^comments: true/d' $file
sed --in-place '/^categories:/ {N;s/\n.*-//;}' $file
sed --in-place 's/^categories:/tags:/' $file
done
zeitverschreib [friendica] mag das.
frague59 ⏚
Als Antwort auf zeitverschreib [friendica] • • •I'll say use #python, as it is **MUCH** simpler to perform such a basic tasks, like text formartting / YAML extraction / formatting...
zeitverschreib [friendica] mag das.
emeralit
Als Antwort auf zeitverschreib [friendica] • • •Michał Fita
Als Antwort auf zeitverschreib [friendica] • • •If you want to learn any just to do that conversion task?
None.
In any other case... I'd bet on both.
#Rust is great for final software where productivity matters as well as quality.
#Python is great for some one liners in the Python shell for quick and dirty solutions, you can write bigger tools as well, but I found #Rust quickly becomes more efficient tool of choice as it's much harder to leave tiny mistakes into the run time.
zeitverschreib [friendica] mag das.
zeitverschreib [friendica]
Als Antwort auf Michał Fita • •Michał Fita
Als Antwort auf zeitverschreib [friendica] • • •zeitverschreib [friendica] mag das.
The Last Psion | Alex
Als Antwort auf Michał Fita • • •zeitverschreib [friendica] mag das.
Michał Fita
Als Antwort auf The Last Psion | Alex • • •Dude Germo
Als Antwort auf Michał Fita • • •@michalfita @thelastpsion That you did not hear of it does not mean that it is not used for commercial software.
I use it for almost 40 years (Turbo pascal, Delphi, FreePascal) and keep using it
Commercial and other
Michał Fita
Als Antwort auf Dude Germo • • •Did I read it correctly?
Dude Germo
Als Antwort auf Michał Fita • • •@michalfita @thelastpsion
YES
And i took some time to read the original question and Freepascal would be a good choice. I use it a lot for conversion between systems/formats.
The Last Psion | Alex
Als Antwort auf Dude Germo • • •Michał Fita
Als Antwort auf Dude Germo • • •@Germo @thelastpsion OK, great. I'm putting you on my list of people who make money from project in #FreePascal.
_It actually makes me kind of happy as Pascal was my language for years as teenager; then let me pass Algorithms and Data Types course with flying colours (going back to it after 4 year break then)._
Sp Eq
Als Antwort auf zeitverschreib [friendica] • • •zeitverschreib [friendica] mag das.