LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

Word-Processor File-Types for Scripting

Posted 05-29-2019 at 06:30 AM by Michael Uplawski
Updated 09-19-2020 at 01:46 AM by Michael Uplawski (SoftMaker Office 2021 has improved xml standard-compliance)

The Big Unification
Current Word-processors read and write different XML-based file-formats. The standards which are more or less implemented by these programs, are OOXML and/or OpenDocument. I write “more or less”, because for diverse reasons, Office-suites differ in the way that they compose documents of one certain type. The variations can result in a completely valid document or one that diverts from the standard and the existing schema-definitions (xsd). There is always the risk that
...
Attached Images
File Type: png sc_document.png (76.3 KB, 23 views)
File Type: png abiword_generated_ooxml.png (9.6 KB, 21 views)
Senior Member
Views 211 Comments 0 Michael Uplawski is offline
Old

download radio broadcasts in mp3 format

Posted 01-26-2019 at 07:11 AM by Michael Uplawski
Updated 03-09-2019 at 01:44 AM by Michael Uplawski (remark on general interest)

Edit: I just mention that the procedure used in the below script is generally applicable in any situation where you want to get a piece of “Web” while avoiding a downright Web-Browser and wherever you can replace it by curl or wget.

No this is not spectacular.

When I try to listen to a precise broadcast on France Culture (www.franceculture.fr), because I have missed it in the morning, I am confronted with a page that wants to open more than 25 connections to sites external...
Senior Member
Views 293 Comments 1 Michael Uplawski is offline
Old

Transform HTML to LQ markup or -down

Posted 10-13-2018 at 05:37 AM by Michael Uplawski
Updated 11-10-2018 at 12:32 AM by Michael Uplawski

Again, I have written a XSL stylesheet.

This time, it serves me to facilitate writing posts and blog entries, here on LinuxQuestions.org, by transforming HTML to the markdown-syntax supported by LQ.

Taken the html-version of a man-page, like for HTML2Index, which is generated automatically alongside the other file-formats (PDF and man), I can call an xsltprocessor, like xsltproc with the new stylesheet and get a text-version of the HTML-page, ready to be copied&pasted...
Attached Files
File Type: txt html2lq.xsl.txt (4.9 KB, 9 views)
Senior Member
Views 316 Comments 2 Michael Uplawski is offline
Old

(OOXML/XSL) Write man-pages in a modern text-processor

Posted 09-08-2018 at 12:56 AM by Michael Uplawski
Updated 09-08-2018 at 05:54 AM by Michael Uplawski (Corrections. Style sheet improved.)

On the topic of writing man-pages as reStructuredText, see also simple-write-man-pages-docutils-and-tweaks (in this blog).
Introduction
In short, I have written an XSL-stylesheet to transform the XML-code from an OOXML document (M$ Word® format docx or SoftMaker®'s tmdx) into a reStructuredText file.

The current edition produces enough formatting for a man-page, although some enhancements should allow the inclusion of tables.
Text-Processor Templates
In the original OOXML
...
Senior Member
Views 198 Comments 0 Michael Uplawski is offline
Old

Found the old replace command

Posted 08-18-2018 at 03:48 AM by Michael Uplawski
Updated 11-13-2021 at 12:45 AM by Michael Uplawski (Category and missing sarcasm added. Orthography.)

... funny.

Discover the Norman religion:

Code:
me@this_PC:~$ echo "We can't do nothing, face it!" | replace "can't" "do not want to"
We do not want to do nothing, face it!
But the command was not available anymore. Dummy me. I have written it myself a while ago!

The script:
Code:
#!/usr/bin/env ruby
# encoding UTF-8
#
# This utility reads text from STDIN (via a pipe) and replaces
...
Senior Member
Views 457 Comments 7 Michael Uplawski is offline

  



All times are GMT -5. The time now is 07:58 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration