0

About-Dings-Project

} I am a Blog about the Dings-Project.

Table of Contents

Day-118: Politics and Religion

Blog-Chain-Time 2023.11.25-15:56 in Tübingen

Topics: Hypothesis, Racism

While I just want to start a complicated Work for my Dings-Project, that I’ve been putting off for a long Time, a good Friend calls me to discuss some Issues with his current Plans.

After that we come to the Subject of the Israel-Conflict, where my Colleague recommends the Interview Matés-on-Israel-Palestinei, where the Jewish Dr-Gabor_Maté talks to Hanna, who is his Daughter.

Like many of my Friends the Doctor questions the Objectivity of our Mainstream-Media, which for Simplicity I would like to narrow down as follows:

Besides that he really takes a hard Line with his own People and amongst other Things poses the following three Hypotheses:

Not sure if all is 100% correct, but one Thing is clear to me - Racism from whichever Side most of the Time is Bad and instead we should better work together for a GoodLife4All:

Let's do it!

Blog-Chain-Time 2023.11.23-19:00 in Tübingen

Topics: Politics, Religion

After a Talk with My-Black-Forest-Friend on the current Israel-Conflict, he sends me a Link to a YouTube-Video [5] with a Statement of the American Ex-Admiral John_Kirby:

Israel is not trying to wipe the Palestinian People off their Map.

This Opinion then compared by Katy_Halper with a Speech [1] of Netanjahu from End of October 2023:

“You must remember what Amalek has done to you” says our Holy Bible.
We do remember and we are fighting.

I find out, that this is a Quote [2] of the Book-of-Deuteronomy, where it is written:

Don’t forget what Amalek did to you on the Road after you left Egypt, how he attacked you when you were tired, barely able to put one Foot in front of another […]. When GOD, your God, gives you Rest from all the Enemies that surround you in the inheritance-land GOD, your God, is giving you to Possess, you are to wipe the Name of Amalek from off the Earth. Don’t forget!

The Amalek were Nomadic-People, who are said to have had a lot of Trouble with the Israeli-People and probably (as planned by God) got wiped out because of that:

Dead Thing

Nevertheless in his Speach Mr-Netanjahu seems to equate the still living Palestinians with the dead Amalek and this is then used by Katy_Halper as a Proof for the Contradiction to the Statement of John_Kirby, which I would summarize to the following Claim:

Mr-Kirby is wrong, because Mr-Netanjahu (indirectly) says: Israel is trying to wipe the Palestinian People off their Map.

After doing some Research on the cited Text in the Internet, I look again into My-Bible, that I read a lot as a Teen-Ager and later used in many Discussions with My-Jehovah’s-Witnesses:

Used Thing

In the First-Book-of-Samuel as well as in the Second-Book-of-Mose I then find two clear Statements [3,4], what our (good) God had in Mind for that (bad) Amalek and because this also could be a Proof of My-God-is-Bad-Hypothethis, I want to hear a second Opinion of Our-Bible-Expert, who has been a Teacher for Religion.

In a long and interesting Talk I learn a lot about the History of the Israeli-People, but I can’t elicit a clear Statement from him about the real Meaning of those problematic Passages.

Nevertheless the Time was worth it, because I got some new Information for My-Doctorial-Thesis, where I finally plan to find out The-Truth - Even if this will be not an easy Task:

Complicated Thing

Footnotes

[0] Debunking Zionist LIES: https://youtube.com
[1] Uneindeutigkeit als Taktik: https://taz.de
[2] Deuteronomy: https://www.bible.com
[3] My-Bible-Samuel-1-15-2
[4] My-Bible-Exodus-17-4 \

Day-116: The Local-Web-App

Blog-Chain-Time 2023.10.30-00:27 in Tübingen

Topics: Ernst-Bloch-Choir, Local-Web-App

As the informed Follower of the Dings-Project knows, I already experienced with different Technologies [0,1] to implement Apps that runs on various Computer-Systems.

For our Program Noch-und-noch-nicht-fertig-werden my Choir-Friend has prepared with Musecore many Mp3-Files for the Learning in the different Vocal-Groups.

Since in our Choir most of the Members are not very experienced with Computers and some of them are already overwhelmed by the Download form our Ernst-Bloch-Web-Site, in Order to make Easy-Life with Computers possible, I upload the Scores together with the Mp3-Files to Google-Drive.

To save Bandwidth, Time, Money and Energy, I also send a short Description, how to make Files offline - Even if this is quite tedious:

Work for Environment!

Though this looks like an acceptable Solution, nevertheless My-Bass-Colleague, who is also our Web-Master, points out to me, that Sorting by Vocal-Groups might meet more the User-Needs.

This brings me to the Idea (again) to write an App, where the Files can be sorted according different Criterias like Song-Title or Voice-Group.

But this Time I want to write a real Multi-Platform-App, that really runs on every Computer-Device. I had the Idea already half a Year ago to use Java-Script and include all Data into a single Html-File, which easily can be downloaded to Local-Storage and then be run in every Web-Browser.

I want to use a single File, because Goolge and Apple make it really hard for the User to install local Web-Sites with mulitple Files on their Smart-Phones or Tablets - “Honi soit qui mal y pense”.

Though this sounds somehow obvious, up to now I never heard of such Kind of Apps and therefore - just to be sure - I document the Idea again [2] as a Dings-Patent under the Name Local-Web-App-Patent.

If such Apps become widespread, good Speculators go Short with Stocks from Google or Apple and good Investors put their Resources into the Dings-Project:

Think Green!

Footnotes

[0] Kivy on iOS and Windows
[1] Kivy on Android
[2] Zero-Wave-Device-Patent

Day-112: Theory vs. Reality

Blog-Chain-Time 2023.10.19-20:50 at the Piccolo

Topics: Music, Women, Reality

Because of a lot of Traffic, I arrive a little bit late at the Piccolo, where currently the Gig of My-Singing-Teacher takes Place and almost as planned, already at the Entrance I meet My-Artist-Friend - Sometimes I really wonder, if such Coincidences in Theory are Synchronisities in Reality.

But as really planned, I am also pleased to see My-Alt-Choir-Buddy and her Friend - As is known, with the Former I already worked a lot on the Theory of our Pythagorean-Topic.

We sing together with our Coach the second Encore and the very last Addition is then a Solo-Performance again, where at one Point I really got the Impression, that the Voice of my female Teacher almost sounds like a Saxophon - Which cannot be The-Truth of course in Reality.

Because it was a really nice Conclusion for my Day, I thankfully buy from our mobile Florist three nice Roses for three really nice Women, who fortunately really like Flowers and of course the most beautiful One goes to our great Singing-Sax:

Chapeau, Odilia!

Blog-Chain-Time 2023.10.17-19:45 in Tübingen

Topics: Zero-Wave-Device-Patent, TüDoKop, Women

On our regular TüDoKop-Round I report about My-Patent and the Plan of using a Block-Chain to prevent Others from Stealing the Idea.

After my Friends give me the Advice to better pay for a Patent-Lawyer, I respond that Konrad_Zuse once has said [3], that these are the only Ones, who would earn Money with Patents.

Although this might be true, perhaps I really should to be more careful with such sensitive Things, as also My-Little-Teacher told me around one Hour later:

Thanks Mandy!

Blog-Chain-Time 2023.10.16-04:30 in Tübingen

Topics: Zero-Wave-Device-Patent, Nicole, Women

While working out the Description for my Zero-Wave-Device-Patent, I define a lot of new Concepts around the Wave-Theory.

I have long bared my Teeth at the Term Phase and then first get even more confused by a Tip from the funny Sara.

A little bit later, on a Smoking-Round, I must think again on my Nicole and ask via WhatsApp, if Everything is Ok. She responds, that I woke her up, because she forgot to switch off the Smart-Phone.

Almost exactly at that Time in the Bus-Station for our Line-Seventeen, I finally get the decisive Inspiration for my Phase-Problem:

Sleep well, Nicole!

Blog-Chain-Time 2023.10.15-15:25 on a Smoking-Round

Topics: Zero-Wave-Theory

I meet Prof. Dr. Reinhard again and ask him, if he now has some Time for a short Conversation. Unfortunately he currently seems to have a Problem with his Voice and therefore refuses to talk.

After I mention, that I might have a Solution for his Problem, he responds with some Anger, that it is not him, but instead it is me, who has a Problem.

Not sure, if that Statement is related to my Zero-Wave-Theory or perhaps meant in a somehow broader Context.

Blog-Chain-Time 2023.10.13-19:12 in Tübingen

Topics: Zero-Wave-Theory, Zero-Wave-Device-Patent

Because I find the Invention of Zero-Wave-Device very promising, I now file a Draft for my very first Dings-Patent:

But what could be a Solution for a Proof, that I really have been The-First, who had this great Idea?

Because up to now I have not yet implemented my own Version, for the Time being I use the Git-System, where Sha1-Check-Sums ensure the Consistency of Git-Commits.

My “Git-Block-Chain” can be downloaded by Everybody using with the following Git-Clone-Command to checkout the Zero-Repository:

$ git clone git@github.com:All-Dings/0.git

This creates a Directory “0”, hat contains the complete History for this Repository:

$ ls
0

After the Checkout it is possible to regulary get the latest Updates by first changing into the Zero-Directory …

$ cd 0

… and then issuing the Git-Pull-Command:

$ git pull
remote: Enumerating objects: 4, done.
remote: Total 3 (delta 1), reused 3 (delta 1), pack-reused 0
From github.com:All-Dings/777
   2e70928..fafe410  Master     -> origin/Master
Updating 2e70928..fafe410
 test | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 test

With the Git-Log-Command you can inspect the History of the different Git-Commits:

commit 5c973ec27e7220239eb55efc50c153f6b0f140b0
Author: Michael Holzheu <michael@holzheu.de>
Date:   Sat Oct 14 20:15:13 2023 +0200

    Add Zero-Wave-Device-Patent

In case I would change Entries in the History, this Command will fail:

$ git pull
hint: You have divergent branches and need to specify how to reconcile them.
fatal: Need to specify how to reconcile divergent branches.

So for now this is a pragmatic Solution for the Proof of my Work at a given Time and since 2023.04.08 with My-IBM-Room-Mate-Friend I have at least one Person, who already regularily verfies the Zero-Repository.

But of course Everybody else is also invited to become a Witness for The-Truth in the Dings-Project.

Blog-Chain-Time 2023.10.12-15:40 in Tübingen

Topics: Zero-Wave-Theory, Invention

In Front of the Home-Door I meet our Head-Of-House and seize the Opportunitiy to show her my latest Sinus-Plot. She agrees that my Zero-Wave-Theory sounds reasonable.

After my Complaint, that up to now even the best Experts could not provide a good Explanation for this rather simple Question, she suggests to speak with Crocodile-Dundee, who even owns a Diploma in Physics.

Coincidentally some Minutes later I meet him on a Smoking-Round and we come up with two possible Truths for the missing Energy, namely Elimination or Transformation.

In Order to save our beloved Engergy-Conservatoin-Law, I already defined the Former as Transformation into Zero-Engery, which is carried by Zero-Things. For the Latter my Friend suggests to use the standard Physics-Excuse, namely Trasformation into Heat.

Still not 100% sure about Light-Waves [2], but at least for Sound-Waves, we now have two reasonable Theories:

  1. Transformation into Heat-Energy
  2. Transformation into Zero-Energy

Depending on The-Truth, we now can build a Device either for Heating or Cooling, where especially the second Option sounds very promising for fighting our Global-Warming.

But for this Case I give to Consideration, that the Zero-Particles might be channeled somehow into a Parallel-Universe, where they are transformed again into Heat-Energy and then we would unintentionally produce Global-Warming for our Alien-Friends, Damn!

Fortunately my Neighbour-Friend calms me down a bit with the Argument, that the Energy could also be sent to an Dead-Universe without Violation of any Ethic-Rules.

Either cool or not, here the first Concept-Drawing for the Function of my new Invention:

Zero-Wave-Device

Blog-Chain-Time 2023.10.11-18:00 in Tübingen

Topics: Zero-Wave-Theory

After a good Meal at the Morra-Imbiss and a theological Conversation with Heisam, on my Way back Home I meet again My-Python-Neighbour, who is by the Way a retired Physics-Teacher.

He speaks to me about the Problem with the Zero-Waves and says that with the Superposition an Interferrence arises, where the (missing) Engery goes and therefore the Energy-Conservation-Law is not violated.

I still have some Doubts and try to explain my View of Things with a “Cigarette-Drawing” on the Walk-Way. I also argue, that there are already Applications of my Zero-Wave-Theory, like Anti-Sound for loud Trucks or Noise-Cancellation in Head-Sets.

For an Explanation of this Technology, here a more accurate Version of my Side-Walk-Plot:

Sinus-Wave-Superposition

Blog-Chain-Time 2023.10.04-19:51 in Tübingen

Topics: Pythagorean-Comma

After the last Choir-Rehearsal I had a longer Discussion with my Female-Choir-Friend about the old [1] Story of the Pythagorean-Comma. As reported, the Problem seems to be, that the Pure-Fiths do not fit 100% to the Pure-Octaves.

Today I get an E-Mail, where is written, that she calculated the Frequence-Ratio of the 15 Fiths in 7 Octaves using a Frequency-Table:

Aus einer Tabelle habe ich 1,498… berechnet

Sounds reasonable, but better double-check: My Music-Tiger wants to squeeze 12 Fiths into 7 Pure-Ocataves and as all good Mathematicians already know, the Ratio for the Fiths must be $\sqrt[12]{2^7}$.

I enter the Formula into My-Old-Pocket-Calculator and interestingly get a slightly different Result, than my female Choir-Colleague:

First Calculation

Strange, I don’t know the Woman like that, because until now she seemed quite reliable to me. Therefore I write back a short Reply to my dear Music-Sister:

Komisch, ich bin auf 1,499 gekommen, vielleicht ein Rundungs-Fehler?

Then I interrupted my daily Work on the Dings-Project to figure out the Problem. So my Math-Champion wants to put 12 Fiths F into 7 Ocataves O, which can be expressed by the following Equation:

\[F^12 = O^7\]

Since my Music-Star wants to keep the Octaves with the Ratio 2:1, we substitue $O$ with $\frac{2}{1} = 2$:

\[F^12 = 2^7\]

As we already know, the Exponentiation by Seven can be expanded into a seven-fold continued Multiplication:

\[F^12 = 2 * 2 * 2 * 2 * 2 * 2 * 2\]

The Associative-Property of the Multiplication allows us, to use Brackets for making it a bit easier:

\[F^12 = (2*2) * (2*2) * (2*2) * 2\]

Then we calculate the Sub-Terms:

\[F^12 = 4 * 4 * 4 * 2\]

Let’s add one last Bracket:

\[F^12 = (4 * 4) * 4 * 2\]

Now we get the Following:

\[F^12 = 16 * 4 * 2\]

High Numbers are Pain-in-the-Ass for the Brain, so use the a Property of our Positional-Notation to make our Life simpler:

\[F^12 = (10 + 6) * 4 * 2\]

Then we use the nice Distributive-Feature of our Real-Numbers, but Watch out Boy - don’t forget the Brackets:

\[F^12 = (10*4 + 6*4) * 2\]

The Rest we do with Mental-Arithmetic:

\[F^12 = (40 + 24) * 2\]

We all know that $4 + 2 = 6$ and $0 + 4 = 4$, therefore:

\[F^12 = 64 * 2\]

We all know that $60 * 2 = 120$ and $4 * 2 = 8$, therefore:

\[F^12 = 128\]

The very last Step is for more advanced Mathematicians, where we apply Exponentiation with $\frac{1}{12}$ on both Sides of the Equation:

\[(F^12)^{\frac{1}{12}} = (128)^{\frac{1}{12}}\]

Finally we shorten the Fraction on the Left and get:

\[F = 128^{\frac{1}{12}} = \sqrt[12]{128}\]

The Rest is “Just Doing”, therefore we use a Pocket-Caculater for that, but a least this Time I double-check with the virtual Calculator from My-Mac-Book:

Second Calculation

Strange, this means 2:1 against the Table of my Music-Fairy:

Win for the Man/Machine?

But oh Boy, don’t be naive - Since we all know Mens-Rule-Nr-1, the Mistake must be on our Side and because this is a really hard Nut, this Time I definitely need really competent Help. So Tomorrow let’s ask my Mens-Colleague Bert, because Today it has already become quite late:

Don't forget: Ask Bert!

Blog-Chain-Time 2023.10.05-10:00 in Tübingen

Topics: Pythagorean-Comma

The next Day I get up very early for Traing with My-Tennis-Teacher. Afterwards I meet three Women, who look like other Versions to three of my known Choir-Colleagues, crazy.

At the Delhi-Palace my dear Asha gives me the Advice to put Focus in my Project on The-Bad-Stuff because the Good-Stuff is done by Others. I don’t know if I understood her correctly, because she sometimes misses the right German Words.

After my Indian-Charu expresses her Concern, that I am doing too many Projects in parallel, I try to reassure her with the Argument that this Work will support my real Goal and in the End Everything will go very quickly.

We also briefly talk about Men in India, who I have already heard Sometimes do not treat their Women very well, Asha’s means, especially the Native Ones.

This reminds me to a funny Conversation about replacing Men with Machines, that I had recently with a cute Blonde off our Choir-Rehersal:

Better use a Machine?

But let’s focus on our Main-Topic: Because of Rule-1 it is clear, that my ϕοκκινγ (Calculating)-Machines have Problems, therefore now I want to do really all manually.

While eating My-Favourite-Indian-Meal I make a few Calculations in my Head and come to the Conclusion that I am able to reduce our Calculation-Problem to $\sqrt{2}$, which after all can be measured with Geometry and is related to the famous Pythagorean-Theorem, the every diligent Lerner knows by Heart:

\[a^2 + b^2 = c^2\]

But before I come back on that, I first buy some Equipment in a Stationery-Shop, that I then transport with my Bicycle to the Bus-Station:

Tools for School

At the Bus-Station I have short Discussion with a young Woman about Politics and we came up with the Idea to use the Schimpf-Eck as a Speakers-Corner. But before we can do that, we should definitely ask Mr-Palmer for more Traffic-Mitigation.

Blog-Chain-Time 2023.10.05-14:00 in Tübingen

Topics: Pythagorean-Comma

Back at Home I finally manage it to read the last E-Mail from my Friend from Bottom-Up, were she first makes a Confession:

Hatte meine Tabelle falsch gelesen.

Of course this must be a White-Lie to make me feel better - such a nice Cupcake. We all know that Rule-1 is Truth-by-Definition, which now reminds me to a Discussion about 1:N-Relations, I had this Afternoon mit my dear Fellow-Occupant.

Then I read further and get to know, that My-Female-Choir-Friend now also did a Verification with her Personal-Computer:

Nun habe ich in Excel nachgerechnet: F = (2^7)^(1/12) = 1,498307076877

Well, of course we know that there are old Versions of Excel that produced wrong Results and oh Boy, we all remember the really nasty Pentium-FDIV-Bug from 1994 - But what is the Likelihood, that my Friend is really affected by those Threats?

And BTW, since serveral Years I get more and more the Impression that our Development is going into the wrong Direction, namely from The-Better to The-Worse. A good Example is this 20-Year old and still comfortable Running-Shoe, as seen Today in the early Evening:

Old but still Good!

But Safety-First, so let’s nevertheless do my planned Measurement. Although my new Baby and I have been really careful, the Operation still gets a bit messy - Obviously we need more physical Training:

Sloddy Work

But probably good enough, so now we can do Everything with Manual-Operation and without the Help of such silly Machines - So back to our last Equation:

\[F = 128^{\frac{1}{12}}\]

So first let’s apply on both Sides the Exponentiation an Exponent of Two:

\[F^2 = {128^{\frac{1}{12}}}^2\]

An Exponentiation-Function is defined by its Base and the Parameter of the Function is called the Exponent and as all good Mathematicians already know, our Exponentiation with Exponent 2 can be replaced by a Multiplication with 2 in the Exponent:

\[F^2 = 128^{\frac{1}{12} * 2} = 128^{\frac{1 * 2}{12}} = 128^{\frac{2}{12}}\]

Now we can simplify the Fraction in the Exponent by a Division by the Greatest-Common-Divisor:

\[F^2 = 128^{\frac{2}{12}} = 128^{\frac{\frac{2}{2}}{\frac{12}{2}}} = 128^{\frac{1}{6}}\]

Ok cool, now we eliminate the Exponent on the left Side by Exponentiation with $\frac{1}{2}$:

\[F^{2*\frac{1}{2}} = 128^{\frac{1}{6} * \frac{1}{2}}\]

Oehm, this somehow looks familiar, but thank Good, as every good Informatic-Student already knows by Heart, we fortunately can rewrite the Binary-Number 128 as Follows:

\[F = 128^\frac{1}{12} = (2 * 2 * 2 * 2 * 2 * 2 * 2)^\frac{1}{12} = ({2^7})^\frac{1}{12}\]

With the already successfully applied Mechanism, we further simplify that:

\[F = ({2^7})^\frac{1}{12} = 2^{7*\frac{1}{12}} = 2^{\frac{7}{12}}\]

Oehm …

Blog-Chain-Time 2023.10.06-04:00 in Tübingen

Topics: Pythagorean-Comma

What the Φοκκ, obviously I made a Mistake in the Indian-Restaurant, because I cannot reduce the Term $2^{\frac{7}{12}}$ to $\sqrt{2}$, sorry my Bad. But no Problem, because all good Mathematicians know, we can use Newton’s–Method for getting an Approximation for the Root-Function.

Ohm, how is the simple Formuala expressed in LaTeX? As already mentioned, my Skills are a bit rusty here and there, but thanks God I have My-Good-Old-Latex-Book:

Good-Old Book

Here a Good-Man with Patience is able find the TeX-Symbols, that are required for the Translation to the beautiful Mathematics-Symbols:

\[x_{n + 1} = x_n - \frac{f(x_n)}{f'(x_n)}\]

Because it is already late, I ask Chat-Gpt to do the Work for me, but without applying the “Potenz-Regel”:

def zwölfte_wurzel_berechnen(zahl, genauigkeit=1e-6, max_iterationen=100):
    # Initialisiere den Schätzwert mit der Hälfte der Zahl
    schätzwert = zahl / 2.0

    for i in range(max_iterationen):
        # Verwende die Newton-Raphson-Formel, um den nächsten Schätzwert zu berechnen
        nächster_schätzwert = (11 * schätzwert**12 + zahl) / (12 * schätzwert**11)

        # Überprüfe, ob die gewünschte Genauigkeit erreicht wurde
        if abs(nächster_schätzwert - schätzwert) < genauigkeit:
            return nächster_schätzwert

        schätzwert = nächster_schätzwert

    # Falls die gewünschte Genauigkeit nicht erreicht wurde, gebe den letzten Schätzwert aus
    return schätzwert

# Eingabe der Zahl, deren 12. Wurzel berechnet werden soll
zahl = float(input("Bitte geben Sie eine Zahl ein: "))

# Berechnung der 12. Wurzel
ergebnis = zwölfte_wurzel_berechnen(zahl)

# Ausgabe des Ergebnisses
print(f"Die 12. Wurzel von {zahl} ist etwa {ergebnis}")

Then I run the Program and thank God, finally the AI and the Interpreter of Python come (at least almost …) to the same Result as my My-Female-Choir-Friend:

✔ ~/All-Dings/777/2023.10.05-Wurzelberechnung [Master|…1126] 
07:33 $ python3 Chat-Gpt-Without-Potenz.py
Bitte geben Sie eine Zahl ein: 128
Die 12. Wurzel von 128.0 ist etwa 1.498307076876681

Blog-Chain-Time 2023.10.06-04:45 in Tübingen

Topics: Pythagorean-Comma

Finally let’s summarize in a Table, what Results we have seen up to now:

Method Result
Frequency-Table 1,498…
Pocket-Calculator 1,4993071
Macbook-Calculator 1,499307076876681
Excel 1,498307076877
Chat-Gpt-Newton 1.498307076876681

You think, this cannot be The-Truth? Stay tuned, because we have the best Working-Tier ever in Town:

Working-Tier

PS: As some Readers might already have recognized, my female Colleague has just re-inventend the Equal-Temperament.
PPS: I forgot to ask Bert, damn!

Blog-Chain-Time 2023.10.04-16:30 in Tübingen

Topics: Zero-Wave-Theory

I meet my Python-Neighbour again, who comes from India and studied Theoretical-Physics. I ask him about the Paradox, that I recently discussed [0] with My-Professor-Friend.

Two identical Lasers with 180 Degree Phase-Shift in Theory eliminate each other and the resulting Energy is Zero. My Neighbour agrees, after he briefly calculated the Following in his Head:

\[e^{x} * e^{-x} = e^{x - x} = e^{0} = 1\]

After I give Consideration to the Fact that this would violate the Conservation-of-Energy, he suggest to invent a New-Thing, that in my new Zero-Wave-Theory I call now Zero-Wave or Zero-Particle. Perhaps it can’t be measured, but at least it is able to carry the missing Energy and therefore reconciles Theory with Reality again.

I definitely should ask our local Theory-Expert Professor-Hugo-Reinhard (again), who is said to let only The-Best come through.

Perhaps this Idea is good enough for him and we can win together yet another important Nobel-Prize for Germany, like it e.g. recently has been achieved by Klaus_Ferdinand_Hasselman.

Footnotes

[0] Beginnings of Zero-Wave-Theory
[1] Pythagorean-Comma
[2] Electro-Magnetic-Transformation
[3] https://youtu.be

Day-109: The Don’t-Waste-App

Blog-Chain-Time 2023.07.29-18:54 in Tübingen

Topics: Dings-Objects, Programming

After our Waste-Disposal-Adventure I come up with the Idea of programming a new Quiz-App about the German Waste-Deposit-System, especially regarding the Deposit-Bottles.

The Framework for Apps is based on so called Dings-Objects, which are already available since I introduced the Dings-Sip-Toggle. And for our new Baby I will use exactly the same basic Mechanisms.

Besides that, I take over the proven Design of my good-old Vogelquiz and also reuse some of its Media-Files.

Nevertheless, it took me a whole 5 Days of hard Work for being able to now proudly present the second App in the Dings-System, Ta-Da:

The Don't-Waste-App

Day-108: Bausparen with Friends

Blog-Chain-Time 2023.07.21-20:00 with my Banker-Friend

Topics: Economics, Jokes, Programming

In Germany there is an old Joke about the Swabians: What is the first Word that a Swabian Baby is able to say?

\[Answer = \mathrm{Bauuuspaaarvertrag!}\]

And besides other interesting Stuff that was the Topic of a Meeting with my Banker-Friend, who is also am Member of our Doppel-Kopf-Crew. He explained me the Concept of this Bauspar-Vertrag with a simple Example:

Let’s assume I want to buy a Tiny-House for 100.000 Euro and can save for this Goal 10.000 Euro each Year, with simple Mathematics we can calculate my Personal-Wait-Time PWT until I can put the required Money on the Table:

\(PWT = \frac{100.000\;\mathrm{Euro}}{10.000\;\mathrm{\frac{Euro}{Year}}} = 10\;\mathrm{Years}\){#10820:0}

But if I have a Friend, who wants to do the same Thing, we can join our Efforts and pool the Money: After 5 Years we have together 100.000 Euro and the frist one can buy his House:

\(10.000\;\frac{\mathrm{Euro}}{\mathrm{Year * Friend}} * 5\;\mathrm{Years} * 2\;\mathrm{Friends}\) \(= 100.000\;\mathrm{Euro}\)

After another 5 Years also the second one gets his House. So interstingly by this “Financial-Trick” compared to my Personal-Wait-Time (0) the Average-Wait-Time (1) has been reduced from 10 Years to 7,5 Years:

\(AWT = \frac{5 + 10\;\mathrm{Years}}{2} = 7,5\;\mathrm{Years}\){#10821:1}

In Order to see, how this Concept scales, I write a small Python-Program that does the Calculation from 1 to 4 Friends:

# Define Constants
COSTS_PER_HOUSE      = 100000 # We can buy a House for 100.000 Coins
MONEY_PER_YEAR       = 10000  # Every Friend can save 10.000 Coins each Year
MAXIMUM_YEAR_COUNT   = 10     # In 10 Years all Houses are built
MAXIMUM_FRIEND_COUNT = 4      # Maximum Number of Friends that pool the Money

# Calculate the Sum of Years to buy all Houses
def Calculate_Wait_Time_Sum(Friends_Count):
        Wait_Time_Sum = 0
        Saved_Money = 0
        Houses = 0
        # Let's see, what we can build in 10 Years
        for Year in range(1, MAXIMUM_YEAR_COUNT + 1):
                # Calculate the saved Money per Year
                Saved_Money += Friends_Count * MONEY_PER_YEAR
                # Buy Houses with the saved Money
                while Saved_Money >= COSTS_PER_HOUSE:
                        Houses += 1
                        Saved_Money -= COSTS_PER_HOUSE
                        Wait_Time_Sum += Year
                        print(f" House %2d baught after %2d Years" % (Houses, Year))
        return Wait_Time_Sum

# Print the Results for the different Friend-Counts
def Print_Results():
        for Friends_Count in range(1, MAXIMUM_FRIEND_COUNT + 1):
                print("============ %2d Friends ============" % Friends_Count)
                Wait_Time_Sum = Calculate_Wait_Time_Sum(Friends_Count)
                print(" ==> Average Time per House: %4.1f Years" % (Wait_Time_Sum / Friends_Count))

Print_Results()

If you want to try out the Program by your own, copy/paste the upper Code to your favourite Python-Interpreter [0] and play with it, or you just trust me that the Output is as follows:

============  1 Friends ============
 House  1 bought after 10 Years
 ==> Average Time per House: 10.0 Years
============  2 Friends ============
 House  1 bought after  5 Years
 House  2 bought after 10 Years
 ==> Average Time per House:  7.5 Years
============  3 Friends ============
 House  1 bought after  4 Years
 House  2 bought after  7 Years
 House  3 bought after 10 Years
 ==> Average Time per House:  7.0 Years
============  4 Friends ============
 House  1 bought after  3 Years
 House  2 bought after  5 Years
 House  3 bought after  8 Years
 House  4 bought after 10 Years
 ==> Average Time per House:  6.5 Years
============  5 Friends ============
 House  1 bought after  2 Years
 House  2 bought after  4 Years
 House  3 bought after  6 Years
 House  4 bought after  8 Years
 House  5 bought after 10 Years
 ==> Average Time per House:  6.0 Years

Obviously this Concept works better the more Friends are involved, but when we increase the Number, it turns out that (at least with my simple Program) the average Wait-Time converges asymptotically towards 5,5 Years:

Click here for Details

Although I studied Economics myself, up to now the Idea of this Financial-Product was not clear to me, which is really shameful. One Explanation could be the questionable Quality of our Academic-System, the Other that back then I just was not interested in the Topic and therefore forgot it again.

Footnotes

[0] Online-Python: https://programiz.com

Day-105: Singing & Dings-Day

Blog-Chain-Time 2023.07.16-22:10 in Tübingen

Topics: Dings-Day, Decisions

Up to now I counted the Dings-Days as Day-Number from the Beginning of this Project. But since in the last Weeks it happend more and more often that I did not update the Project publicly for several Days, I decide to change the Procedure and define the Dings-Day as follows:

A Dings-Day is a Day, where something worth mentioning is published for the Dings-Project.

So from now on the Counter is always increased by one, regardless of how long ago the last Publication was made and therefore Today we have Number 105.

Blog-Chain-Time 2023.07.16-20:29 in Tübingen

Topics: Music, Physics

Several Days ago I re-started my Singing-Lessions with my New-Singing-Teacher, this Time it is a Woman. Because I told her that I would like to sing at Site, we first covered the Topic Solmization, where the Musical-Notes are assigned to the following eight Syllables:

Do Re Mi Fa Sol La Ti Do

In order to train the different Intervals, I sing the Major-Scale from the Root “Do” to some Tone and then directly back to the Root-Tone again.

In another Exercise we try to get more Over-Tones into my Voice. First I sing an “U”, then an “Ü” and finally an “I”. For the latter I notice a Ringing in my Head.

The main Reason is that the Nasal-Cavity is also a Resonance-Body that can be set into Vibration and then creates the Over-Tones. Here as an Example the Frequency-Spectrum of the Tone “U” and the Tone “Ü”:

Over-Tone Test

Day-104: Science & TeX

Blog-Chain-Time 2023.07.07-15:02 in Tübingen

Topics: Test

If you want to try the new Label/Anchor Reference-Mechanism for Math-Formulas you can click on this Reference (0).

Blog-Chain-Time 2023.07.07-14:01 in Tübingen

Topics: TeX, Dings-Tool, History

For my last Blog-Entry I introduced into the Dings-Project the Markup-Language TeX, which allows to render especially Mathematical-Symbols in a very beatiful Way.

TeX has been invented between the 1970th and 80th by the Computer-Legend Donald_Knuth and then it was used in the early 80th by Leslie_Lamport to implement his Lamport-TeX or shortly LaTeX. The latter is the most widespread today and also I have used it extensively e.g. for my Studien-Arbeit in 1995/96:

Regler zur Robotersteuerung

Here is a short TeX Code-Fragment for an Equation, …

$$ H = \sqrt[12]{2} \approx 1,0595 $$

… which is then rendered as:

\[H = \sqrt[12]{2} \approx 1,0595\]

A single “$” starts and ends the Math-Mode for TeX and a double “$$” is used for centered unlabled Math-Equations. Fortunately the Pandoc-Tool allows us to use these Formulas also in Markdown-Files.

From the different Pandoc-Options for translating TeX into Html I use the --mathml Option that, as the Name indicates, produces MathMl as Output.

The upper Example is translated then into the following Mathematical-Markup-Language:

<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
 <semantics>
  <mrow>
   <mi>H</mi><mo>=</mo>
   <mroot>
    <mn>2</mn>
    <mn>12</mn>
   </mroot>
   <mo>=</mo>
   <mn>1</mn><mo>,</mo><mn>0595</mn>
  </mrow>
  <annotation encoding="application/x-tex"> H = \sqrt[12]{2} = 1,0595 </annotation>
  </semantics>
</math>

As we already saw, the rendered Result already looks quite nice, but unfurtunately there is no Support for Labeling and Referencing the Equations. Therefore I extend the Dings-Tool once more and introduce a new Syntax for appending an Anchor and Label:

$$ TeX-Expression $${#ANCHOR:LABEL}

For a nice Formatting I use a Html-Table with three Columns, putting the Equation in the middle and the Anchor to the right. I also add new Css-Classes, like “TeX-Table” or “TeX-Tr” to the Dings-Css-File.

The following Example …

$$ H = \sqrt[12]{2} \approx 1,0595 $${#10480:0}

… is then translated into this Html-Code, …

<table class="TeX-Table">
  <tr class="TeX-Tr">
   <td class="TeX-Td-Left">
     <a id="10480"/>
   </td>
   <td class="TeX-Td-Equation">
     <math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>H</mi><mo>=</mo><mroot><mn>2</mn><mn>12</mn></mroot><mo></mo><mn>1</mn><mo>,</mo><mn>0595</mn></mrow><annotation encoding="application/x-tex"> H = \sqrt[12]{2} \approx 1,0595 </annotation></semantics></math>
   <td class="TeX-Td-Right">(0)</td>
  </tr>
</table>

… that is finally rendered as:

\(H = \sqrt[12]{2} \approx 1,0595\){#10480:0}

Now that the All-Dings-Project is prepared for professional scientific Work, I am very excited about interesting Things that can still be explored.

Day-101: Heimat-Programm & Pythagorean-Comma (again)

Blog-Chain-Time 2023.07.04-23:00 in Tübingen

Topics: Music, Mathematics, Pythagorean-Comma

Because after on our Journey to Freiburg, I was not 100% sure, if my Thoughts about the Pythagorean-Comma were correct, I want to try a Mathematics-Proof now.

According to Wikipedia [0] the Pythagorean-Comma is 23,46 Cent and in the Equal-Temperament one Cent is defined as one hundredth of a Half-Tone.

Since in this System one Half-Tone is exactly one twelfth of an Octave [1], we have to apply to be Base-Frequency BF twelve Times the Multiplication of the Frequency-Ratio of H in order to reach the Octave O:

\[BF * H * H * ... * H * H = O\]

Because we choose $Base$-$Frequency=1$ and we already know that the Frequency-Ratio of the Octave is 2:1 or simply 2, we can write this as:

\[H * H * ... * H * H = 2\]

Using the Exponentiation we can formulate this also much shorter as:

\[H^12 = 2\]

In order to calculate H, we have to apply Exponentiation with $\frac{1}{12}$ on both Sides:

\[(H^{12})^{\frac{1}{12}} = 2^{\frac{1}{12}}\]

After shortening the Fraction $12*\frac{1}{12} = 1$ and replacing $2^{\frac{1}{12}}$ with the more common Root-Writing $\sqrt[12]{2}$, we get the following Frequency-Ratio for our Half-Tone:

\[H = \sqrt[12]{2} \approx 1,0595\]

As mentioned at the Beginning, according to Wikipedia the Pythagorean-Comma is 23,46 Cent and in the Equal-Temperament one Cent is defined as one hundredth of a Half-Tone, so one could naively assume that we now can calculate Comma-Expected CE as:

\[CE = 23,46 * \frac{1}{100} * H\]

Unfortunately it is not such simple, because in our Case we don’t have a linear System. Therefore the Calculation of the Frequence-Ratio for the Half-Tone was the wrong way, sorry by bad. Instead the Frequency-Ratio FR of CT Cents can be calculated [2] with:

\[FR = 2^{\frac{CT}{1200\, Cent}}\]

The Reason for the 1200 Cent is the Octave again, that is exactly 12 Have-Tones, or $12 * 100\, Cent = 1200\, Cent$, so $2^{\frac{1200\, Cent}{1200\, Cent}} = 2^1 = 2$, which is - as we already know - the Frequency-Ratio 2:1 of our Ocatave.

So now let’s calculate the Frequency-Ratio for the Pythagorean-Comma with 23,46 Cent:

\(CE = 2^{\frac{23,46\, Cent}{1200\, Cent}} \approx 1,0136\){#10141:1}

If we look at our Results for the Target-Frequencies of 12 Fiths ($1,5^{12}$) and 7 Octaves ($2^7$), our self-calculated Pythagorean-Comma CC can be determinded by:

\(CC = \frac{1,5^{12}}{2^{7}} = \frac{129,75}{128,00} \approx 1,0136\){#10142:2}

Since (1) and (2) result in the same Value, my Calculation seems to be correct and even more Digits behind the Comma look also quite promising:

Pythagorean-Comma Comparison

But I still don’t have the Feeling to really have understood this Music-System completely, so probably it takes a little bit more Time until I can say “q. e. d.” with enough Confidence.

Footnotes

[0] Pythagorean-Comma (de): https://de.wikipedia.org/wiki/Pythagoreisches_Komma
[1] Half-Tone (de): https://de.wikipedia.org/wiki/Halbton#Gleichstufig_temperierter_Halbton
[2] Cent to Frequency-Ratio (de): https://de.wikipedia.org/wiki/Cent_(Musik)#Cent_in_Frequenzverh%C3%A4ltnis

Blog-Chain-Time 2023.07.04-14:03 in Tübingen

Topics: Choir

After the Concert in Freiburg, I have got the Desire to continue again with the Project-Heimat [0]: Last Year our Ernst-Bloch-Choir-Conductor reviewed my Recordings for our Heimat-Programm.

In several Hours Work I fix all the Findings and re-send the Result with the Claim, that now 99,9% of all Music-Scores and Recordings should be correct.

Then I got the Reply that she quickly looked into the Song Gemeinsam and found three Errors, dammit …

Footnotes

[0] Projekt-Heimat: https://www.holzheu.de/projekt-heimat-mir-im-sueden

Day-97: Embedding Dings-Files

Blog-Chain-Time 2023.06.30-21:31 in Tübingen

Topics: Rendering-Process, Dings-Tool

Today I upgrade the Rendering-Process of the Dings-Tool by adding Support for embedding Dings-Files in Markdown-Files. For the Time being I use the same Syntax as Markdown does for Images:

 ![CAPTION](MEDIA_FILE)

When the Dings-Tool generates an Html-Page, it replaces this Text with appropiate Html-Code. For Example the Markdown-Code …

 ![Updated Rendering Process](400000034.jpg)

… is converted into the following Html-Code, …

<figure>
<a href="400000034.html">
  <img src="400000034.jpg" alt="Updated Rendering Process" style="100%;"/>
</a>
<figcaption>
  <a href="400000034.html">Updated Rendering Process</a>
</figcaption>
</figure>

… which then produces this rendered Output:

Updated Rendering Process

The nice Thing is that now you can click on the Image or the Caption for navigating to the original Dings-File. At the Moment this works for Jpeg-Image-Files, Mp3-Sound-Files and Mp4-Video-Files.

Day-91: Pythagorean-Comma

Blog-Chain-Time 2023.06.24-12:30 on my Way to Freiburg

Topics: Pythagorean-Comma

While I am driving with my Choir-Colleages for our Performance to Freiburg, I use the Time to investigate the Pythagorean-Comma, that describes a Problem of our Music-System:

If we go up 12 Fiths in the Musical-Scale, we hit the same Note as if we go up 7 Octaves.

But when we add the Frequency-Intervals, we come to a slightly different Result. For an Octave the Frequency doubles and for a Fifth the Frequency is multiplied by 1,5.

For calculating the Result, I write a small Python-Program, …

def Calc_Frequency(Interval, Factor, Count):
        Frequency = 1
        for Step in range(0, Count + 1):
                print(f"{Step:2d} {Interval}: {Frequency:6.2f}")
                Frequency = Frequency * Factor

Calc_Frequency("Fifhs  ", 1.5, 12)
Calc_Frequency("Octaves", 2, 7)

… that leads to the following Output:

 0 Fifhs  :   1.00
 1 Fifhs  :   1.50
 2 Fifhs  :   2.25
 3 Fifhs  :   3.38
 4 Fifhs  :   5.06
 5 Fifhs  :   7.59
 6 Fifhs  :  11.39
 7 Fifhs  :  17.09
 8 Fifhs  :  25.63
 9 Fifhs  :  38.44
10 Fifhs  :  57.67
11 Fifhs  :  86.50
12 Fifhs  : 129.75

 0 Octaves:   1.00
 1 Octaves:   2.00
 2 Octaves:   4.00
 3 Octaves:   8.00
 4 Octaves:  16.00
 5 Octaves:  32.00
 6 Octaves:  64.00
 7 Octaves: 128.00

Of course we can calculate the same with simple Mathematics:

$1,5^{12} - r2^7 = 129,75 - 128,00 = 1,75$

But to be honest, I’m not 100% clear on the whole Problem yet, so a little more Research is probably required.

Day-76: Responsive Web-Design

Blog-Chain-Time 2023.06.09-23:58 in Tübingen

Topics: Web-Design, Favicon

Finally I added the Dings-Favicon that will be shown as Web-Site Logo in many Web-Browsers.

Blog-Chain-Time 2023.06.09-21:32 in Tübingen

I spent the last Days working on the Web-Design of the Dings-Html-Pages. Because my Goal is to use as much of the Screen-Real-Estate as possible, I have to apply some Techniques from Responsive-Web-Design:

I implement a Side-Bar for the Navigation within one Web-Page and a Top-Bar for Naviation within the whole Web-Site.

Initially the Side-Bar should show the Table-Of-Contents of the displayed Page, which I automatically extract from the Markdown-File with a new Sub-Command of the Dings-Tool.

For clean Reading I also want to be able to dynamically disable the Side-Bar. Because this Setting should be valid for the whole Web-Session and should not change when moving to a different Page, I use a Cookie to save the Selection-State.

In order to get the maximum Screen-Size for Reading I also make the Top-Bar disappear, when the User scrolls down.

For Example to dynamically build all this for the Dings-File 23.md, I simply use the new Sub-Command of the Dings-Tool:

$ Dings-Tool Html Generate 23.md -o 23.html

The first Step of the Build-Process extracts the Side-Bar-Content (TOC) from the Markdown-File:

Step 1

Then the new Side-Bar-Content is integrated into the Dings-Html-Template, which produces the Pandoc-Html-Template:

Step 2

Finally the Pandoc-Tool is called with the new Pandoc-Html-Template and the original Markdown-File, which then generates the completed Html-File:

Step 3

To realize all this was a lot of Trial-and-Error Work, again it was more Hacking than Programming, but in the End I am halfway satisfied with the Result:

Responsive Web-Design

Day-70: Hash-Functions

Blog-Chain-Time 2023.06.03-23:02 in Tübingen

Topics: Hash-Function, Performance, Test

For the Measurement of the Performance of the different Hash-Functions I write a small Python-Program that runs each Hash-Algorithm 32 Times on 1024 KiB of random Input-Data, so in total 512 Mebi-Bytes or 512 Mega-Bytes plus 48.576 Bytes are processed.

Then I run this Program on four different Platforms:

Python does not implement the Hash-Functions by its own, but instead uses Standard-Libraries for that. For the latter three Setups under Ubuntu-Linux the Open-SSL Library is used, …

root:~# openssl version
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022

… and Mac-OS helps itself with the Libre-SSL:

$ openssl version
LibreSSL 2.8.3

For Completeness I also implemented the Digit-Sum in Python

class Csum_Class:
        def hexdigest(Self, Max_Byte = 0):
                Hex_String = hex(Self.Hash_Value)
                if Max_Byte == 0:
                        return Hex_String
                else:
                        return Hex_String[2:Max_Byte * 2]

class Add_Py(Csum_Class):
        def __init__(Self, Data):
                Data_Size = Bm.Byte(len(Data))
                Self.Hash_Value = 0
                for Byte_Nr in range(0, int(Data_Size.to_Byte())):
                        Self.Hash_Value += int(Data[Byte_Nr])

… and in C that can be called from my Python-Program:

import Dings_Lib_C

class Add_C(Csum_Class):
        def __init__(Self, Data):
                Self.Hash_Value = Dings_Lib_C.Adder_Csum(bytearray(Data))
static PyObject* Adder_Csum(PyObject* self, PyObject *args)
{
        unsigned long Csum = 0;
        unsigned char *Buf;
        Py_buffer Buffer;
        PyObject *Bytes;
        int i;

        if (!PyArg_ParseTuple(args, "O|b", &Bytes))
                return NULL;

        if (PyObject_GetBuffer(Bytes, &Buffer, PyBUF_WRITABLE) < 0)
                return NULL; 

        Buf = Buffer.buf;
        for(i=0; i < Buffer.len; i++) {
                Csum += Buf[i];
        }
        PyBuffer_Release(&Buffer);
        return Py_BuildValue("l", Csum);
}

To make a nice Presentation of the Experiment I use the Matplotlib, that allows to render my Data as a Bar-Chart. As Metric for the Performance-Data I show how much Mebi-Bytes per Second each Hash-Algorithm can process.

Hash-Performance

From the resulting Diagram, I find five Observations interesting respectively surprising:

  1. My Python-Adder-Function is terribly slow.
  2. The C-Adder-Function is slow on Ubuntu.
  3. In most Cases the Mac-Book seems to be much faster that my Surface-Book.
  4. SHA-384 and SHA-512 run much faster on Mac-Book under Ubuntu.
  5. For MD5 we don’t see a Speedup on Mac-Book.

Because there are a lot of Variables and Layers, it is hard to prove the real Reasons for these Observations, but nevertheless I would like to make some Hypothesis:

The interpreted Python is just much slower than compiled C, although I would not have expected such a huge Impact.

On my Surface-Book probably the CPU and on Mac-Book the GPU is used, which is optimized for Hash-Generation. One Indication for this Claim is Observation 5, where I assume that the MD5-Algorithm runs on the CPU for all Platforms.

For Observation 3 my Hpyothesis is that Open-SSL provides GPU-Support, whereas Libre-SSL uses the CPU.

Besides the really bad Pyhton-Performance at least one last Mystery remains: Why is the C-Adder-Function so fast on the native Mac-Book?

Blog-Chain-Time 2023.06.03-23:02 in Tübingen

Topics: Hash-Functions

The last Days I have dealt with the Topic Hash-Functions: In Informatics you find them everywhere, for Example Git uses SHA-1 or Bitcoin utilizes SHA-256, which is one Member of the SHA-2-Family.

The Algorithms mentioned have been developed by the NSA and standardized by the NIST. Both Institutions are located in the USA.

Hash-Functions are used to reduce big Numbers to small Ones. A simple Secimen for an Hash-Algorithm is the Digit-Sum, where for Example the Number 4711 is mapped to the Number 13.

A Problem of Hash-Sums are the so called Hash-Collisions: Since the Input-Set is bigger than the Output-Set it is unavoidable that there are two Input-Numbers that map to the same Output-Number.

Here an Example for our Digit-Sum, where the Numbers 4711 and 1003 lead both to the Number 13:

Digit-Sum(4711) = 13 (4 + 7 + 1 + 1)
Digit-Sum(1003) = 13 (1 + 0 + 0 + 1)

One Quality of a Hash-Algorithm is its Collision-Resistence, which is the Likelihood that this happens.

Day-67: Serialization

Blog-Chain-Time 2023.05.31-23:02 in Tübingen

Topics: Serialization, Test

Since some Days I am pondering about how to store my own Meta-Data and my prefered Solution for that is Json. In order to convert hierarchical Data-Structures into a linear Representation, in Informatics a Process called Serialization is used.

It would be perfect if I could directly save and load my Python-Classes with such a Process. To explore the Possibilites, I write a small Test-Programm, where I use Dictionaries, Lists and Classes:

import json as Json

class Object_Json_Encoder_Class(Json.JSONEncoder):
        def default(Self, o):
                return o.__dict__

class Point_Class():
        def __init__(Self, x, y):
                Self.x = int(x)
                Self.y = int(y)

def Print_Dict(Dict):
        for Key in Dict:
                Value = Dict[Key]
                Type = str(type(Value))
                print(f"Key={Key}")
                print(f"  Type='{Type}'")
                print(f"  Value={Value}")

Point = Point_Class(1,2)

Test_Dict_Code = {
        "My_Integer": 4711,
        "My_String": "Test",
        "My_Point": Point,
        "My_Point_List": [ Point, Point ],
        "My_String_List": ["aa", "bb", "cc"]
}

Test_Json_String = Json.dumps(Test_Dict_Code, cls=Object_Json_Encoder_Class)
Test_Dict_Json = Json.loads(Test_Json_String)

Print_Dict(Test_Dict)
Print_Dict(Test_Dict_Json)

After running the Thing, I see the following Output:

Key=My_Integer
  Type='<class 'int'>'
  Value=4711
Key=My_String
  Type='<class 'str'>'
  Value=Test
Key=My_Point
  Type='<class '__main__.Point_Class'>'
  Value=<__main__.Point_Class object at 0x1031c6990>
Key=My_Point_List
  Type='<class 'list'>'
  Value=[<__main__.Point_Class object at 0x1031c6990>, <__main__.Point_Class object at 0x1031c6990>]
Key=My_String_List
  Type='<class 'list'>'
  Value=['aa', 'bb', 'cc']
Key=My_Integer
  Type='<class 'int'>'
  Value=4711
Key=My_String
  Type='<class 'str'>'
  Value=Test
Key=My_Point
  Type='<class 'dict'>'
  Value={'x': 1, 'y': 2}
Key=My_Point_List
  Type='<class 'list'>'
  Value=[{'x': 1, 'y': 2}, {'x': 1, 'y': 2}]
Key=My_String_List
  Type='<class 'list'>'
  Value=['aa', 'bb', 'cc']

Obviously some Information is lost in the Transformation-Process: The original Dictionary still knows the correct “Point_Class” Data-Type, …

Key=My_Point
  Type='<class '__main__.Point_Class'>'
  Value=<__main__.Point_Class object at 0x1031c6990>

… whereas the Dictionary that has been created from the Json-String claims that the Data-Type is a Dictionary:

Key=My_Point
  Type='<class 'dict'>'
  Value={'x': 1, 'y': 2}

And that’s not a Wonder, because the Json-String does no longer contain this Information:

{
  "My_Integer": 4711,
  "My_String": "Test",
  "My_Point": {
    "x": 1,
    "y": 2
  },
  "My_Point_List": [
    {
      "x": 1,
      "y": 2
    },
    {
      "x": 1,
      "y": 2
    }
  ],
  "My_String_List": [
    "aa",
    "bb",
    "cc"
  ]
}

Day-64: Meta-Data

Blog-Chain-Time 2023.05.29-00:32 in Tübingen

Topics: Git-Hub, Problem

Since the Afternoon, I experienced a lot of Problems with Git-Hub, which slowed me down significantly:

Git-Hub Problem

But to be fair, this is an Exception and normally it works quite well.

Blog-Chain-Time 2023.05.28-21:47 in Tübingen

Topics: Meta-Data, Sound

With Py-Exif-Tool I already could read some Meta-Data of Mp3-Files, but it is not possible to write Data. Fortunately I found Mutagen:

✔ ~/All-Dings/777/Test/2023.05.28-Music-Tag [Master ↑·1|…53759] 23:23
$  pip3 install mutagen

With that I was able to read Mpeg-Info, I could read/write Id3-Data and I also learnt that iXML exists.

Blog-Chain-Time 2023.05.28-21:47 in Tübingen

Topics: Meta-Data

Today I search for Meta-Data-Libraries and for Images and find Exif and Py-Exif-Tool:

✘-1 ~/All-Dings/777/Test/2023.05.28-Exif [Master|…53761] 20:00
$ pip3 install exif pyexiftool

With some Lines of Code I now can read and write the Exif-Meta-Data of Jpg-Files.

Day-63: Pattern-Recognition

Blog-Chain-Time 2023.05.27-16:55 with Nicole

Topics: Pattern-Recognition

Today I search for free Pattern-Recognition-Libraries and find OpenCV, Tensor-Flow as well as DeepFace:

✘-1 ~/All-Dings/777/Test/2023.05.27-Open-CV [Master|…53752] 19:24
$ pip3 install opencv-python
✘-1 ~/All-Dings/777/Test/2023.05.27-Open-CV [Master|…53757] 19:43
$ pip3 install tensorflow
✔ ~/All-Dings/777/Test/2023.05.27-Open-CV [Master|…53757] 19:43
$ pip3 install deepface

The Result of some Lines of Python-Code is IMHO really impressive:

Face-Recognition

Day-61: Kivy on iOS and Windows

Blog-Chain-Time 2023.05.25-16:55 in Tübingen

Topics: Kivy, Windows, Dings-App

So now let’s switch to Windows, where I first have to create a virtual Environment again (important):

$ python -m venv My-App
$ cd My-App

Then I build the Py-Installer-Spec-File:

~/My-App$ python -m PyInstaller --onefile --name Dings-App ..\..\Dings_App\main.py

Then I add some Lines to the Config-File, that the App-Files and Libraries are included in the EXE-File:

~/My-App$ diff -Nau Dings_App.spec.orig Dings_App.spec
--- Dings_App.spec.orig	2023-05-25 21:20:40.000000000 +0200
+++ Dings_App.spec	2023-05-25 21:19:58.000000000 +0200
@@ -1,4 +1,5 @@
 # -*- mode: python ; coding: utf-8 -*-
+from kivy_deps import sdl2, glew
 
 
 block_cipher = None
@@ -27,6 +28,8 @@
     a.binaries,
     a.zipfiles,
     a.datas,
+    *[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)],
+    Tree('..\\..\\Dings_App\\'),
     [],
     name='Dings_App',
     debug=False,

Then I finally build the Executable-File …

~/My-App$ python -m PyInstaller .\Dings_App.spec

… and run the App on Windows:

~/My-App$ .\dist\Dings_App.exe

Kivy works (somehow)

Blog-Chain-Time 2023.05.25-16:55 in Tübingen

Topics: Kivy, iOS, iPad, Dings-App

Today I want to run the Dings-App on iOs, therefore I first install the kivy-ios Package:

~/All-Dings$ pip3 install kivy-ios

Then I create a Build-Directory:

~/All-Dings$ mkdir kivy-build

Next I use the Tool-Chain-Command to build required Libraries and Stuff:

~/All-Dings/kivy-build$ toolchain build python3 kivy openssl

After that I have to install the required Python-Modules for my App:

~/All-Dings/kivy-build$ toolchain pip install pygments docutils

Then I create the X-Code Project with the Tool-Chain-Command:

~/All-Dings/kivy-build$ toolchain create Dings_App ~/All-Dings/777/Dings_App/

Note, that for this Step only the required Files should be in the Dings_App Directory, e.g. remove the .buildozer Directory before.

Finally I start X-Code with the Open-Command, …

~/All-Dings/kivy-build$ open dings_app-ios/dings_app.xcodeproj/

… and then run the App on my iPad:

Kivy on iPad

Day-60: Kivy on Android

Blog-Chain-Time 2023.05.24-23:29 in Tübingen

Topics: Multi-Platform-Development

Now the Question is what Options I have to program for Android, iOS, Windows and Linux. Up to now I know three Candidates:

The first two I already tried, so perhaps I will check out Flutter next?

Blog-Chain-Time 2023.05.24-22:32 in Tübingen

Topics: Kivy, Android

After I connected my Android-Smartphone with USB to the Mac-Book, I could debug the Problems …

✔ ~/All-Dings/777/Dings_App [Master|✚ 2…109699] 22:35
$ export PATH=$PATH:~/.local/bin && buildozer android debug deploy run logcat

… and finally managed to run a Kivy-App:

Kivy Success

It looks quite easy to programm Kivy, but the resulting App feels a bit slow. Besides that I am missing a Html-Widget. Well, at least there is a RST-Widget.

Day-59: Day with Kivy

Blog-Chain-Time 2023.05.24-00:51 in Tübingen

Topics: Kivy, Summary

My first Day with Kivy leaves me with mixed Feelings. The Features look very promising, but building Apps for the different Platforms seems to be not so easy as I initially thought.

Blog-Chain-Time 2023.05.23-21:54 in Tübingen

Topics: Kivy, Buildozer, iOS

So now let’s try to setup my Mac for building an iOS-Package:

(kivy_venv) ✔ ~/All-Dings/777/Test/2023.05.23-Kivy/Pong [Master|…9155] 21:35
$ brew install pkg-config sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer autoconf automake
(kivy_venv) ✔ ~/All-Dings/777/Test/2023.05.23-Kivy/Pong [Master|…18691] 22:03
$  brew link libtool
Warning: Already linked: /opt/homebrew/Cellar/libtool/2.4.7
To relink, run:
  brew unlink libtool && brew link libtool
(kivy_venv) ✔ ~/All-Dings/777/Test/2023.05.23-Kivy/Pong [Master|…19380] 22:03
$ pip install Cython==0.29.33
Collecting Cython==0.29.33
  Downloading Cython-0.29.33-py2.py3-none-any.whl (987 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 987.3/987.3 kB 3.8 MB/s eta 0:00:00
Installing collected packages: Cython
  Attempting uninstall: Cython
    Found existing installation: Cython 0.29.34
    Uninstalling Cython-0.29.34:
      Successfully uninstalled Cython-0.29.34
Successfully installed Cython-0.29.33
(kivy_venv) ✘-1 ~/All-Dings/777/Test/2023.05.23-Kivy/Pong [Master|…33251] 22:06
$ pip install kivy-ios
(kivy_venv) ✘-1 ~/All-Dings/777/Test/2023.05.23-Kivy/Pong [Master|…33251] 22:08
$ toolchain build kivy

Blog-Chain-Time 2023.05.23-21:50 in Tübingen

Topics: Kivy, Buildozer, Docker

After three hours work on Mac and on Windows, I gave up the Idea to build the APK using a Docker-Image.

Blog-Chain-Time 2023.05.23-17:40 in Tübingen

Topics: Kivy, Buildozer, Android, APK

After I followed the Instructions to create the Pong-App, I want to create an Android APK-Package. So let’s first install the Builddozer Packaging-Tool:

(kivy_venv) ✘-1 ~/All-Dings/777/Test/2023.05.23-Kivy/Pong [Master|…8] 17:45
$ python3 -m pip install --upgrade pip buildozer
Requirement already satisfied: pip in /Users/michael-holzheu/All-Dings/111/kivy_venv/lib/python3.11/site-packages (23.1.2)
Collecting buildozer
  Downloading buildozer-1.5.0-py3-none-any.whl (86 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.9/86.9 kB 1.9 MB/s eta 0:00:00
Collecting pexpect (from buildozer)
  Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.0/59.0 kB 3.4 MB/s eta 0:00:00
Collecting virtualenv (from buildozer)
  Using cached virtualenv-20.23.0-py3-none-any.whl (3.3 MB)
Collecting sh (from buildozer)
  Downloading sh-2.0.4-py3-none-any.whl (38 kB)
Collecting ptyprocess>=0.5 (from pexpect->buildozer)
  Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting distlib<1,>=0.3.6 (from virtualenv->buildozer)
  Using cached distlib-0.3.6-py2.py3-none-any.whl (468 kB)
Collecting filelock<4,>=3.11 (from virtualenv->buildozer)
  Using cached filelock-3.12.0-py3-none-any.whl (10 kB)
Collecting platformdirs<4,>=3.2 (from virtualenv->buildozer)
  Using cached platformdirs-3.5.1-py3-none-any.whl (15 kB)
Installing collected packages: ptyprocess, distlib, sh, platformdirs, pexpect, filelock, virtualenv, buildozer
Successfully installed buildozer-1.5.0 distlib-0.3.6 filelock-3.12.0 pexpect-4.8.0 platformdirs-3.5.1 ptyprocess-0.7.0 sh-2.0.4 virtualenv-20.23.0

Then I create a Buildozer-Spec-File

(kivy_venv) ✔ ~/All-Dings/777/Test/2023.05.23-Kivy/Pong [Master|…8] 17:47
$ buildozer init
File buildozer.spec created, ready to customize!

… and cutomize it:

(kivy_venv) ✔ ~/All-Dings/777/Test/2023.05.23-Kivy/Pong [Master|…10] 17:49
$ diff -Nau buildozer.spec.orig buildozer.spec
--- buildozer.spec.orig	2023-05-23 17:48:48.000000000 +0200
+++ buildozer.spec	2023-05-23 17:49:11.000000000 +0200
@@ -1,13 +1,13 @@
 [app]
 
 # (str) Title of your application
-title = My Application
+title = Pong
 
 # (str) Package name
-package.name = myapp
+package.name = pong
 
 # (str) Package domain (needed for android/ios packaging)
-package.domain = org.test
+package.domain = apps.holzheu.de
 
 # (str) Source code where the main.py live
 source.dir = .

To build an Android-APK-Package I have to install the Cython-Tool first:

(kivy_venv) ✘-1 ~/All-Dings/777/Test/2023.05.23-Kivy/Pong [Master|…10] 18:00
$ python3 -m pip install --upgrade cython
Collecting cython
  Downloading Cython-0.29.34-py2.py3-none-any.whl (988 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 988.1/988.1 kB 8.2 MB/s eta 0:00:00
Installing collected packages: cython
Successfully installed cython-0.29.34

Then I build the Android-Package with the Bildozer-Tool, …

(kivy_venv) ✔ ~/All-Dings/777/Test/2023.05.23-Kivy/Pong [Master|…10] 18:00
$ buildozer android debug deploy run

… which seems to be a very long an complicated Procedure, …

# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Search for Git (git)
#  -> found at /usr/bin/git
# Search for Cython (cython)
#  -> found at /Users/michael-holzheu/All-Dings/111/kivy_venv/bin/cython
# Search for Java compiler (javac)
#  -> found at /usr/bin/javac
# Search for Java keytool (keytool)
#  -> found at /usr/bin/keytool
# Install platform
# Run ['git', 'clone', '-b', 'master', '--single-branch', 'https://github.com/kivy/python-for-android.git', 'python-for-android']
# Cwd /Users/michael-holzheu/All-Dings/777/Test/2023.05.23-Kivy/Pong/.buildozer/android/platform
Cloning into 'python-for-android'...
# Run ['/Users/michael-holzheu/All-Dings/111/kivy_venv/bin/python3', '-m', 'pip', 'install', '-q', 'appdirs', 'colorama>=0.3.3', 'jinja2', 'sh>=1.10, <2.0; sys_platform!="nt"', 'pep517', 'toml', 'packaging']
# Cwd None
# Android ANT is missing, downloading
# Downloading https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.4-bin.tar.gz
# Run ['tar', 'xzf', 'apache-ant-1.9.4-bin.tar.gz']
# Cwd /Users/michael-holzheu/.buildozer/android/platform/apache-ant-1.9.4
# Apache ANT installation done.
# Android SDK is missing, downloading
# Downloading https://dl.google.com/android/repository/commandlinetools-mac-6514223_latest.zip
# Unpacking Android SDK
# Run ['unzip', '-q', '/Users/michael-holzheu/.buildozer/android/platform/android-sdk/commandlinetools-mac-6514223_latest.zip']
# Cwd /Users/michael-holzheu/.buildozer/android/platform/android-sdk
# Android SDK tools base installation done.
# Recommended android's NDK version by p4a is: 25b
# Android NDK is missing, downloading
# Downloading https://dl.google.com/android/repository/android-ndk-r25b-darwin.zip
# Unpacking Android NDK
# Run ['unzip', '-q', '/Users/michael-holzheu/.buildozer/android/platform/android-ndk-r25b-darwin.zip']
# Cwd /Users/michael-holzheu/.buildozer/android/platform
# Rename /Users/michael-holzheu/.buildozer/android/platform/android-ndk-r25b to /Users/michael-holzheu/.buildozer/android/platform/android-ndk-r25b
# Android NDK installation done.
# Installing/updating SDK platform tools if necessary
# Run ['/Users/michael-holzheu/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager', '--sdk_root=/Users/michael-holzheu/.buildozer/android/platform/android-sdk', 'platform-tools']
# Cwd /Users/michael-holzheu/.buildozer/android/platform/android-sdk

...

… that finally hangs in an Endless-Loop:

# Waiting for application to start.
# Waiting for application to start.
# Waiting for application to start.

But at least the APK-Package seems to have been built:

(kivy_venv) ✔ ~/All-Dings/777/Test/2023.05.23-Kivy/Pong [Master|…52203] 18:23
$ find . | grep apk
./bin/pong-0.1-arm64-v8a_armeabi-v7a-debug.apk

I can also install the Package on My-S22-Ultra, but unfortunately it crashes.

Blog-Chain-Time 2023.05.23-15:46 in Tübingen

Topics: Kivy, Layouts

As I already know form my Android-Development of our Bird-Quiz-App also Kivy provides different Layouts for Positioning and Scaling Widgets, for Example:

Blog-Chain-Time 2023.05.23-15:19 in Tübingen

Topics: Kivy, Properties, Observer-Pattern

Kivy provides Properties that can notify Subscribers about Change-Events using the Observer-Pattern:

class MyClass(EventDispatcher):
    numeric_var = NumericProperty(1)

Blog-Chain-Time 2023.05.23-14:51 in Tübingen

Topics: Kivy, Test

With the following Command I run the first Demo:

(kivy_venv) ✘-2 ~/All-Dings/111 [Rendering L|✚ 1…2] 14:52
$ python3 kivy_venv/share/kivy-examples/demo/showcase/main.py

The Web-Page shows a simple Demo Program, …

(kivy_venv) ✔ ~/All-Dings/777/Test/2023.05.23-Kivy [Master|…8] 14:59
$ cat Test-1.py
import kivy
kivy.require('2.1.0') # replace with your current kivy version !

from kivy.app import App
from kivy.uix.label import Label


class MyApp(App):

    def build(self):
        return Label(text='Hello world')


if __name__ == '__main__':
    MyApp().run()

… that can be simply run with:

(kivy_venv) ✔ ~/All-Dings/777/Test/2023.05.23-Kivy [Master|…8] 14:59
$ python3 Test-1.py 

Blog-Chain-Time 2023.05.23-14:27 in Tübingen

Topics: Kivy, Installation

Today I want to try the Python-Framework Kivy that can be used to write Apps for Android, iOS, Linux, macOS, and Windows. First I install the required Packages with the PiP Package-Manager:

✘-127 ~/All-Dings/111 [Rendering L|✚ 1…2] 14:27 $ python3 -m pip install --upgrade pip setuptools virtualenv
Requirement already satisfied: pip in /opt/homebrew/lib/python3.11/site-packages (23.1.2)
Requirement already satisfied: setuptools in /opt/homebrew/lib/python3.11/site-packages (67.6.1)
Collecting setuptools
  Downloading setuptools-67.8.0-py3-none-any.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 9.5 MB/s eta 0:00:00
Collecting virtualenv
  Downloading virtualenv-20.23.0-py3-none-any.whl (3.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 24.9 MB/s eta 0:00:00
Collecting distlib<1,>=0.3.6 (from virtualenv)
  Downloading distlib-0.3.6-py2.py3-none-any.whl (468 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.5/468.5 kB 19.2 MB/s eta 0:00:00
Collecting filelock<4,>=3.11 (from virtualenv)
  Downloading filelock-3.12.0-py3-none-any.whl (10 kB)
Collecting platformdirs<4,>=3.2 (from virtualenv)
  Downloading platformdirs-3.5.1-py3-none-any.whl (15 kB)
Installing collected packages: distlib, setuptools, platformdirs, filelock, virtualenv
  Attempting uninstall: setuptools
    Found existing installation: setuptools 67.6.1
    Uninstalling setuptools-67.6.1:
      Successfully uninstalled setuptools-67.6.1
Successfully installed distlib-0.3.6 filelock-3.12.0 platformdirs-3.5.1 setuptools-67.8.0 virtualenv-20.23.0

Then I craete a Python-Virtual-Environment:

✔ ~/All-Dings/111 [Rendering L|✚ 1…2] 14:29
$ python3 -m virtualenv kivy_venv
created virtual environment CPython3.11.3.final.0-64 in 231ms
  creator CPython3Posix(dest=/Users/michael-holzheu/All-Dings/111/kivy_venv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/michael-holzheu/Library/Application Support/virtualenv)
    added seed packages: pip==23.1.2, setuptools==67.7.2, wheel==0.40.0
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

To activate the Virtual-Environment, I issue the following Command:

✔ ~/All-Dings/111 [Rendering L|✚ 1…2] 14:37
$ source kivy_venv/bin/activate
(kivy_venv) ✔ ~/All-Dings/111 [Rendering L|✚ 1…2]

Then Kivy is installed:

(kivy_venv) ✔ ~/All-Dings/111 [Rendering L|✚ 1…2] 14:38
$ python -m pip install "kivy[base]" kivy_examples
Collecting kivy[base]
  Downloading Kivy-2.2.0-cp311-cp311-macosx_10_9_universal2.whl (10.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.0/10.0 MB 23.1 MB/s eta 0:00:00
Collecting kivy_examples
  Downloading Kivy_examples-2.2.0-py2.py3-none-any.whl (10.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.1/10.1 MB 26.3 MB/s eta 0:00:00
Collecting Kivy-Garden>=0.1.4 (from kivy[base])
  Downloading Kivy_Garden-0.1.5-py3-none-any.whl (4.6 kB)
Collecting docutils (from kivy[base])
  Downloading docutils-0.20.1-py3-none-any.whl (572 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 572.7/572.7 kB 21.4 MB/s eta 0:00:00
Collecting pygments (from kivy[base])
  Downloading Pygments-2.15.1-py3-none-any.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 21.7 MB/s eta 0:00:00
Collecting pillow (from kivy[base])
  Using cached Pillow-9.5.0-cp311-cp311-macosx_11_0_arm64.whl (3.1 MB)
Collecting requests (from kivy[base])
  Downloading requests-2.31.0-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 5.1 MB/s eta 0:00:00
Collecting charset-normalizer<4,>=2 (from requests->kivy[base])
  Downloading charset_normalizer-3.1.0-cp311-cp311-macosx_11_0_arm64.whl (121 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.7/121.7 kB 9.8 MB/s eta 0:00:00
Collecting idna<4,>=2.5 (from requests->kivy[base])
  Downloading idna-3.4-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 6.1 MB/s eta 0:00:00
Collecting urllib3<3,>=1.21.1 (from requests->kivy[base])
  Downloading urllib3-2.0.2-py3-none-any.whl (123 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.2/123.2 kB 8.7 MB/s eta 0:00:00
Collecting certifi>=2017.4.17 (from requests->kivy[base])
  Downloading certifi-2023.5.7-py3-none-any.whl (156 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 157.0/157.0 kB 13.6 MB/s eta 0:00:00
Installing collected packages: urllib3, pygments, pillow, idna, docutils, charset-normalizer, certifi, requests, Kivy-Garden, kivy_examples, kivy
Successfully installed Kivy-Garden-0.1.5 certifi-2023.5.7 charset-normalizer-3.1.0 docutils-0.20.1 idna-3.4 kivy-2.2.0 kivy_examples-2.2.0 pillow-9.5.0 pygments-2.15.1 requests-2.31.0 urllib3-2.0.2

Day-57: Dings-Web-Server

Blog-Chain-Time 2023.05.21-23:25 in Tübingen

Topics: Web-Server, Dings-Tool

I implemented a tiny Web-Server for the Dings-Tool:

✔ ~/All-Dings/111/Day-57 [Master|✚ 2…2] 23:24
$ python3 300020001.py server
INFO:root:Server started http://localhost:8000

Day-52: Dings-File-System

Blog-Chain-Time 2023.05.16-21:29 in Tübingen

Topics: Number-Files, Dings-Files

I decided to rename the Number-Files to Dings-Files.

Blog-Chain-Time 2023.05.17-01:02 in Tübingen

Topics: Dings-File-System

I added the initial Code for the Dings-File-System.

Day-50: Diff-Tools

Blog-Chain-Time 2023.05.14-13:13 in Tübingen

Topics: Diff-Tools

I make a little Research on the Variatiy of available Diff-Tools:

What I find especially nice is the following Invocation of colordiff:

$ colordiff -y <(xxd a.jpg) <(xxd b.jpg)
00000000: ffd8 ffe0 0010 4a46 4946 0001 0101 012c  ......JFIF | 00000000: ffd8 ffe0 0010 4a46 4946 0001 0102 001c  ......JFIF
00000010: 012c 0000 ffe1 28c4 4578 6966 0000 4949  .,....(.Ex | 00000010: 001c 0000 ffe1 3b04 4578 6966 0000 4949  ......;.Ex
00000020: 2a00 0800 0000 0000 0e00 0000 0900 fe00  *.........   00000020: 2a00 0800 0000 0000 0e00 0000 0900 fe00  *.........
00000030: 0400 0100 0000 0100 0000 0001 0400 0100  ..........   00000030: 0400 0100 0000 0100 0000 0001 0400 0100  ..........
00000040: 0000 0001 0000 0101 0400 0100 0000 c000  ..........   00000040: 0000 0001 0000 0101 0400 0100 0000 c000  ..........
00000050: 0000 0201 0300 0300 0000 8000 0000 0301  ..........   00000050: 0000 0201 0300 0300 0000 8000 0000 0301  ..........
00000060: 0300 0100 0000 0600 0000 0601 0300 0100  ..........   00000060: 0300 0100 0000 0600 0000 0601 0300 0100  ..........

Blog-Chain-Time 2023.05.14-15:00 in Tübingen

Topics: Diff-Libs

For Python I found the following Diff-Libraries:

Day-49: Privacy and Version-Control

Blog-Chain-Time 2023.05.13-14:17 in Tübingen

Topics: Http, Privacy

I make do some Research, how to restrict Access for specific Web-Pages and got the following working using three Http-Config-Files:

✔ ~/All-Dings/777/Test/2023.05.13-Htaccess [Master|…16] 16:06
$ ls .ht*
.htaccess	.htgroups	.htpasswd

The Http-Access-File:

✔ ~/All-Dings/777/Test/2023.05.13-Htaccess [Master|…16] 15:47
$ cat .htaccess 
AuthName "Dings Login-Bereich"
AuthType Basic
AuthUserFile /mnt/webxy/htdocs/All-Dings/.htpasswd
AuthGroupFile /mnt/webxy/htdocs/All-Dings/.htgroups

<FilesMatch "Test-Michael-1.0\.txt|Test-Michael-1.1\.txt"> 
Require user Michael-1
</FilesMatch>

<Files Test-Team-Michael-1-2.txt>
Require group Team-1
</Files>

<Files Test-Team-Michael-2.txt>
Require group Team-1
# Require not user Michael-1 # Does not work on Strato
</Files>

The Http-Passwd-File:

✔ ~/All-Dings/777/Test/2023.05.13-Htaccess [Master|…16] 15:50
$ cat .htpasswd 
Michael-1:$apr1$dANZDyxw$mwiJmK8Z1K0s.Jt1nWqv00
Michael-2:$apr1$F1et4FEs$vohf01TacMIMpPdSYwdf80
Michael-3:$apr1$F1et4FEs$vohf01TacMIMpPdSYwdf80

The Http-Groups-File:

✔ ~/All-Dings/777/Test/2023.05.13-Htaccess [Master|…16] 15:47
$ cat .htgroups 
Team-1: Michael-1 Michael-3

Unfortunately there seems to be no Way for Logout a User after Login.

Blog-Chain-Time 2023.05.13-23:52 in Tübingen

Topics: Version-Control-System

Because I am toying with the Idea of creating my own Version-Control-System for the Dings-System, I write the required Python-Code for converting the old Git-History into new Dings-Commits.

Day-42: Makefile-Day

Blog-Chain-Time 2023.05.05-22:10 in Tübingen

Topics: Makefile

I worked the whole Day on my Makefiles in order to clean-up the Rendering-Process a little bit, so now with the following Commands the Project can be locally rendered into the Directory Day-42:

$ git clone https://github.com/All-Dings/111.git
$ git submodule update --init
$ export Dings_Day=Day-42
$ make workdir
$ make render

Day-41: Image Rendering Part-1

Blog-Chain-Time 2023.05.04-19:01 in Tübingen

Topics: Prize, Diligence, Saying

While chatting with Thomas on a Html-Issue, I whined about the Complexity of getting a nice Layout for all the possible Devices like PCs, Smart-Phones, Tablet-Devices, and so on.

After he sent me as Reply the German-Saying “Ohne Fleiß kein Preis!”, I used the Opportunety to show him my Diligence with the Unix-Wc-Command:

✔ ~/All-Dings/111/0 [Master|…6] 19:00
$ ls *.md | wc -l
    1149

Blog-Chain-Time 2023.05.04-22:05 in Tübingen

Topics: Image-Magicks, Graphics-Magick, Gimp-Fu-Script

Today I make a short Programming-Break and look for Options how to efficiently handle Images in my Project, I investigate three Options:

The Gimp-Tool is already installed on my Mac and fortunately also the two Others can be installed Out-of-the-Box:

✔ ~/All-Dings/111/0 [Master ↓·14|…4] 22:04
$ history | grep brew
 1610  brew install graphicsmagick
 1616  brew install imagemagick

Graphics-Magick comes with the Gm-Tool …

✔ ~/All-Dings/111/0 [Master ↓·14|…4] 22:10
$ gm -help
GraphicsMagick 1.3.40 2023-01-14 Q16 http://www.GraphicsMagick.org/
Copyright (C) 2002-2023 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Usage: gm help command [options ...]

Where commands include:
      batch - issue multiple commands in interactive or batch mode
  benchmark - benchmark one of the other commands
    compare - compare two images
  composite - composite images together
    conjure - execute a Magick Scripting Language (MSL) XML script
    convert - convert an image or sequence of images
       help - obtain usage message for named command
   identify - describe an image or image sequence
    mogrify - transform an image or sequence of images
    montage - create a composite image (in a grid) from separate images
       time - time one of the other commands
    version - obtain release version

… and Image-Magicks with the Magick-Tool:

✘-1 ~/All-Dings/111/0 [Master ↓·14|…4] 22:12
$ magick -help
Usage: magick tool [ {option} | {image} ... ] {output_image}
Usage: magick [ {option} | {image} ... ] {output_image}
       magick [ {option} | {image} ... ] -script {filename} [ {script_args} ...]
       magick -help | -version | -usage | -list {option}

Blog-Chain-Time 2023.05.05-02:07 in Tübingen

Topics: Image-Magicks, Rendering

For the Time being I decided to use the Image-Magicks-Tool and included it to my Rendering-Process:

diff --git a/300000004.make b/300000004.make
index 414683d..feccd1a 100644
--- a/300000004.make
+++ b/300000004.make
@@ -9,16 +9,24 @@ Md_File_List = $(wildcard *.md)
 Html_File_List := $(subst .md,.html,$(Md_File_List)) index.html
 Html_File_List := $(addprefix ${Dings_Day}/, $(Html_File_List))
 
+Jpg_File_List := $(wildcard *.jpg)
+Jpg_File_List := $(addprefix ${Dings_Day}/, $(Jpg_File_List))
+
 define Markdown_to_Html
        pandoc --standalone --template 300000002.htm $(1) -o $(2)
        sed -i '' -E 's/(href="[0-9]+)\.md/\1\.html/g' $(2)
        sed -i '' -E 's#<body>#<body><pre class="console"><code>Warning: Although I give my very Best, Mistakes are still possible.</code></pre>#g' $(2)
 endef
 
-all: Git_Sub_Module_Init Html_Files
+define Render_Jpg_File
+       magick convert $(1) -resize 800 -quality 80 $(2)
+endef
+
+all: Git_Sub_Module_Init Html_Files Jpg_Files
        echo "All_Things_Make_File:${Dings_Day}"
 
 Html_Files: $(Dings_Day) $(Html_File_List) ${Dings_Day}/300000014.css
+Jpg_Files: $(Dings_Day) $(Jpg_File_List)
 
 Git_Sub_Module_Init:
        git submodule update --init
@@ -37,7 +45,10 @@ ${Dings_Day}/300000014.css: 300000014.css
 ${Dings_Day}/%.html: %.md 300000004.make 300000014.css 300000002.htm
        $(call Markdown_to_Html, $<, $@)
 
+${Dings_Day}/%.jpg: %.jpg 300000004.make
+       $(call Render_Jpg_File, $<, $@)
+
 clean:
-       rm -f $(Html_File_List)
+       rm -f $(Html_File_List) $(Jpg_File_List)
 
 .PHONY: all clean

Day-40: Dings-Tool Hacking

Blog-Chain-Time 2023.05.03-19:33 in Tübingen

Topics: Python, Programming-Study

I took the Debugging of a Problem as an Opportunity to start a Programming-Study, where I want to collect noteworthy Observations regarding Programming-Languages.

In my second interesting Case these two Lines …

def Help(Self):
    Command_Name = Self.Command_Name()

… lead to the following Error:

Traceback (most recent call last):
  File "/Users/michael-holzheu/All-Dings/111/0/300020001.py", line 166, in <module>
    Main()
  File "/Users/michael-holzheu/All-Dings/111/0/300020001.py", line 164, in Main
    Sub_Command.Parse_Options(Argument_List);
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michael-holzheu/All-Dings/111/0/Dings.py", line 582, in Parse_Options
    Self.Help()
  File "/Users/michael-holzheu/All-Dings/111/0/Dings.py", line 599, in Help
    Command_Name = Self.Command_Name()
                   ^^^^^^^^^^^^^^^^^^^
TypeError: 'str' object is not callable

The Reason is that in my Class a Class-Variable Command_Name is defined …

## Command Base-Class
class Command:
        Command_List = {}
        Command_Name = ""

… and also an Object-Method with the same Name:

def Command_Name(Self):
    return To_Mixed_Case(Self.Name.replace('_', ' '))

Interestingly the following similar Code …

class Dings:
        My_Class_Variable = "Test"
        def __init__(Self):
                print("Init")
        def My_Class_Variable(Self):
                print("Should this work?")
        def Do_It(Self):
                print(Self.My_Class_Variable)
                Self.My_Class_Variable()

## Create Object
My_Dings = Dings()
## Call Function directly (OK)
My_Dings.My_Class_Variable()
## Call Function within Class (FAIL)
My_Dings.Do_It()

… only produces a Warning:

Init
Should this work?
<bound method Dings.My_Class_Variable of <__main__.Dings object at 0x1025c0350>>
Should this work?

Blog-Chain-Time 2023.05.04-00:21 in Tübingen

Topics: Dings-Tool, Hacking

I worked the whole Day on the Dings-Tool, but since I am still a Beginner in Python, it was more Hacking than Programming. Well at least I got it somehow working.

Day-39: Dings-Tool

Blog-Chain-Time 2023.05.03-01:01 in Tübingen

Topics: Dings-Tool

Spent the whole Day on Coding the Command-Line-Parsing for the Dings-Tool and I am a bit frustrated, that it takes such a long Time for such a relatively easy Task.

Day-38: Dings-Lib Classes

Blog-Chain-Time 2023.05.31-18:43 in Tübingen

Topics: Dings-Lib, Inheritance, Class-Hierarchy

I extend the Code once again and use the Concepts Inheritance from the Object-oriented-Paradigm, both Perl and Python have Support for that.

Three Sub-Classes e.g. Code_To_Markdown are defined for the old Base-Class Code_To_Markdown.

BTW, Class-Hieraries, like all other Trees in the Informatics-System, are normally shown with the Root on Top:

                          +--------------------+
                          |                    |
                          |  Code_To_Markdown  |
                          |                    |
                          +---------+----------+
                                    |
          +-------------------------+--------------------------+
          |                         |                          |
          v                         v                          v
+--------------------+    +--------------------+     +--------------------+
|                    |    |                    |     |                    |
| Python_To_Markdown |    |  Perl_To_Markdown  |     |   Css_To_Markdown  |
|                    |    |                    |     |                    |
+--------------------+    +--------------------+     +--------------------+

Here a Code-Snipped from the Perl-Version:

# Convert Python-Code ot Markdown
package Python_To_Markdown;
use base 'Code_To_Markdown';

sub new {
        my $Class = shift;
        my $Self = $Class->SUPER::new(@_);

        $Self->{'Reg_Exp_Heading'} = '^' . '#+' . ' ' . '.*';
        $Self->{'Reg_Exp_Comment'} = '^' . '"""' . '\s*';
        return $Self;
}

And here the corresponding Python Variant:

# Convert Python-Code ot Markdown
class Python_To_Markdown(Code_To_Markdown):
        def __init__(Self):
                Self.Reg_Exp_Heading = re.compile('^' + '#+' + ' ' + '.*')
                Self.Reg_Exp_Comment = re.compile('^' + '"""' + '\s*')
                super().__init__()

I use the Class-Hierarchy for Sharing the Method Process_Line() of the Base-Class that then calls the specific Methods of its Sub-Classes:

def Process_Line(Self, Line, Line_Number):
        Line = Line.rstrip()
        if Self.State == Self.States.Init:
                Self.Handle_State_Init(Line)
        elif Self.State == Self.States.Heading:
                Self.Handle_State_Heading(Line)
        elif Self.State == Self.States.Code:
                Self.Handle_State_Code(Line)
        elif Self.State == Self.State.Comment:
                Self.Handle_State_Comment(Line)
        return Self.State

Day-37: Programming-Paradigm

Blog-Chain-Time 2023.04.30-23:21 in Tübingen

Topics: Dings-Lib, Programming-Paradigm, Programming-Class

Today I extended my Dings-Lib with some Code that follows the Object-oriented-Paradigm, both Perl and Python have Support for that.

I defined a new Class Code_To_Markdown together with a Constructor and some Methods like e.g. Process_End().

Here a Code-Snipped from the Perl-Version:

package Code_To_Markdown;

sub new($)
{
        my $Class = $_[0];
        my $Self = {
                'State' => Init,
                'Reg_Exp_Heading' => '^' . '#+' . ' ' . '.*',
                'Reg_Exp_Comment' => '^' . '"""' . '\s*',
        };
        bless $Self, $Class;
        return $Self;
}

sub Process_End($)
{
        my $Self = $_[0];
        if ($Self->{State} == Code) {
                printf "```\n";
        }
}

[8> Snip ]

sub Language_To_Markdown_Test()
{
        my $To_Markdown = new Code_To_Markdown();
        $To_Markdown->Convert("$Dings_Directory/300010010.py");
}

And here the corresponding Python Variant:

## Class Code-To-Markdown
class Code_To_Markdown:
        def __init__(Self):
                Self.States = Enum('States', ['Init', 'Heading', 'Comment', 'Code'])
                Self.State = Self.States.Init
                Self.Reg_Exp_Heading = re.compile('^' + '#+' + ' ' + '.*')
                Self.Reg_Exp_Comment = re.compile('^' + '"""' + '\s*')

        def Process_End(Self):
                if Self.State == Self.States.Code:
                        print("```")
[8> Snip ]

### Test
def Language_To_Markdown_Test():
        To_Markdown = Code_To_Markdown()
        File_Path = os.path.join(Dings_Directory, "300010010.py")
        To_Markdown.Convert(File_Path)

Day-36: Programming

Blog-Chain-Time 2023.04.30-04:43 in Tübingen

Topics: Python, Perl, References, UTF-8

Finally I managed to read all the References between Number-Files in Python as well as in Perl. With Perl I needed the following Lines of Code in order to enable the UTF-8-Support:

binmode(STDOUT, "encoding(UTF-8)");
use open ':std', ':encoding(UTF-8)';

Day-35: Programming & Privacy

Blog-Chain-Time 2023.04.28-15:10 in Tübingen

Topics: Dings-Lib, Python, Bug, Type-Inference, Sorting, Programming-Study

While completing my Functions for Reading and Printing all my Dings, I notice that my Code does not sort the Number-Files correctly:

✔ ~/All-Dings/111/0 [Master ↑·1|✚ 4…5] 18:20
$ python3 300010010.py
[Snip]
9300006 "Hyper-Link"
99 "Coincidence"
9999997 "Informatics-Famous-Human"
9999998 "Informatics-Student"
9999999 "Informatics-System"

First I assumed the Problem is in the Python-Sorted-Function and then with the Help of Chat-GPT even wrote my own Quick-Sort-Function:

## Quick-Sort for List of Dictionary
def Quicksort_List_of_Dictionary(List, Key):
        Element_Count = len(List) 
        if Element_Count <= 1:
                return List
        Pivot = List[Element_Count // 2][Key]
        Left = [Element for Element in List if Element[Key] < Pivot]
        Middle = [Element for Element in List if Element[Key] == Pivot]
        Right = [Element for Element in List if Element[Key] > Pivot]
        return Quicksort_List_of_Dictionary(Left, Key) + Middle + Quicksort_List_of_Dictionary(Right, Key)

Unfortunately the Problem was not solved by simply replacing the Sorting-Function. After over one Hour of Debugging I the found the Problem in the following Code:

## Read Data of a Number-File
def Read_Number_File(File_Name):
        with open(os.path.join(Dings_Directory, File_Name), 'r') as File:
                First_Line = File.readline()
        Name = Name_Regex.sub(r'\1', First_Line)
        Number = Number_Regex.sub(r'\1', File_Name)

        ### Define new [Dictionary](/0/250000018.html) for Number-File
        Number_File = {}
        Number_File['Number'] = Number
        Number_File['Name'] = Name.strip()
        return Number_File

Besides of my own Ignorance, the Reason for the Bug is located in the Type-Inference-Feature of Python, which automatically concludes that Number_File['Number'] is a String.

The Compare-Operators for Strings use Alphabetic-Order and therefore regarding Sorting the Following is a true Statement:

9300006 < 99 <  9999997

The Bug-Fix for the Problem is to use the Cast-Operator so that Python knows that each Number should be interpreted as Integer-Type:

✔ ~/All-Dings/111/0 [Master|✚ 1…6] 18:40
$ git diff
diff --git a/300010010.py b/300010010.py
index 0b404be..a3e20d4 100644
--- a/300010010.py
+++ b/300010010.py
@@ -49,7 +49,7 @@ def Read_Number_File(File_Name):
 
        ### Define new [Dictionary](/0/250000018.html) for Number-File
        Number_File = {}
-       Number_File['Number'] = Number
+       Number_File['Number'] = int(Number)
        Number_File['Name'] = Name.strip()
        return Number_File

Now my World looks whole again:

✔ ~/All-Dings/111/0 [Master|✚ 1…6] 18:40
$ python3 300010010.py
[Snip]
88 "My-Fellow-Occupant"
99 "Coincidence"
100 "The Big "Cleanup" Day"
[Snip]

Blog-Chain-Time 2023.04.28-17:07 in Tübingen

Topics: Privacy, Todo

While debugging the Python-Problem, my Artist-Friend calls me and we have a long Discussion about my Project. In particular the Fact that currently all Information is public scares my Colleague.

I understand his Problem, but of course this is Nothing new: Big Companies like Google or Facebook already store Loads of Information and most likely create more or less anonymous User-Profiles.

The Difference is that my User-Profiles are public and with all the Connections Everybody can get potential dangerous Information.

Although I normally ask People, if I am allowed to create a Number-File like e.g. for My-Tennis-Win-Friend, there are also implicite Profiles:

For Example after reading my Bus-Driver-Story someone could find in real Life the young Man, who compared the Mood of the People in Tübingen and Reutlingen. Since there are not many Bus-Drivers in Tübingen that are 22 Years old, the Search is probably not very difficult.

Therefore in the worst Case Information of my Project could be harmful.

Because I don’t have a good Answer to that Problem up to now, I put the Topic Privacy to my Todo-List and take it upon myself to be as careful as possible for the Time being.

Blog-Chain-Time 2023.04.28-21:38 in Tübingen

Topics: Programming, Python, Perl, Regular-Expression, Compatibility

Let’s come back to the Topic Programming again: I have now two Implementations of the same Algorithm. In Theory with the same Input the same Output should produced by the Perl- and the Python-Program, so let’s give it a Try:

✔ ~/All-Dings/111/0 [Master ↓·41|✚ 1…4]  21:37
$ perl 300010011.pl > out.perl
✔ ~/All-Dings/111/0 [Master ↓·41|✚ 1…5] 21:37
$ python3 300010010.py  > out.python

Then we use the Unix-Diff-Command to ensure that the two Output-Files have the same Content:

✔ ~/All-Dings/111/0 [Master ↓·41|✚ 1…6] 21:37
$ diff out.perl out.python
1,1021c1,2041
< 0 "Michael_Holzheu"
< 1 "Clash of Clans Erster Geburtstag "
< 2 "Clash of Clans: Erster Geburtstag"

[8<Snip>8]

---
> 0 "Michael_Holzheu
> "
> 1 "Clash of Clans Erster Geburtstag 
> "
> 2 "Clash of Clans: Erster Geburtstag

[8<Snip>8]

All Lines marked with < belong to out.perl and those with > to out.python. It looks like that the Pyton-Output contains one additional New-Line at the End.

I extract the Dings-Name from a Number-File using Regular-Expressions and BTW, at leasst Chat-GPT claims that the Concepts for those Expressions have been developed in the 1950s by Stephen_Cole_Kleene.

So let’s look first at the Perl Version, …

my $Heading_Regex = qr/^#\s+(.*)$/;

… and then at the Python Variant:

Name_Regex = re.compile(r'^#\s+(.*)$')

Besides of the surrounding Stuff, both Lines are identical and the extracted Regular-Expression is as Follows:

^#\s+(.*)$

Looks like that the Implementations of Regular-Expressions are different in Perl and Python, to prove that I extract the Code into two Test-Files:

✔ ~/All-Dings/Test 23:27
$ cat regex-test.pl
my $Heading_Regex = qr/^#\s+(.*)$/;
my $File_Name = "0.md";
open my $File, '<', $File_Name;
$First_Line = <$File>;
printf("\"%s\"\n", $First_Line);
$First_Line =~ /$Heading_Regex/;
printf("\"%s\"\n", $1);
✔ ~/All-Dings/Test 23:27
$ cat regex-test.py
import re

Name_Regex = re.compile(r'^#\s+(.*)$')
with open("0.md", 'r') as File:
	First_Line = File.readline()
print(f'"{First_Line}"')
Name = Name_Regex.sub(r'\1', First_Line)
print(f'"{Name}"')

Then I run both against my 0.md-File:

✔ ~/All-Dings/Test 23:29
$ head -3 0.md
# Michael_Holzheu

<img src="0.jpg" alt="Michael_Holzheu" style="width:256px; height: 256px;"/>

And the Result is the Proof:

✔ ~/All-Dings/Test 23:31
$ perl regex-test.pl > out.perl
✔ ~/All-Dings/Test 23:31
$ python3 regex-test.py > out.python
✔ ~/All-Dings/Test 23:31
$ diff out.perl out.python 
3c3,4
< "Michael_Holzheu"
---
> "Michael_Holzheu
> "

So the Perl Regular-Expression seems not to match the New-Line, whereas Python includes it.

A Work-Around for this Compatibility-Problem is to use the Python Strip-Function that removes the trailing White-Space before we apply the Regular-Expression:

✔ ~/All-Dings/Test 23:56
$ diff -Nau regex-test.py regex-test-strip.py 
--- regex-test.py	2023-04-28 23:55:20.000000000 +0200
+++ regex-test-strip.py	2023-04-28 23:56:01.000000000 +0200
@@ -2,7 +2,7 @@
 
 Name_Regex = re.compile(r'^#\s+(.*)$')
 with open("0.md", 'r') as File:
-	First_Line = File.readline()
+	First_Line = File.readline().strip()
 print(f'"{First_Line}"')
 Name = Name_Regex.sub(r'\1', First_Line)
 print(f'"{Name}"')

Finally I have to add a Strip-Function also to my Perl-Version:

✔ ~/All-Dings/111/0 [Master ↓·9|✚ 1…6] 00:17
$ git diff
diff --git a/300010011.pl b/300010011.pl
index f5aa20c..c7bae5f 100644
--- a/300010011.pl
+++ b/300010011.pl
@@ -34,6 +34,14 @@ sub Print_Number_File($)
        printf("%d \"%s\"\n", $Number, $Name);
 }
 
+## Remove White-Space from the Start and End of a String
+sub Strip($)
+{
+       my $String = $_[0];
+       $String =~ s/^\s+|\s+$//g;
+       return $String;
+}
+
 ## Read Data of a Number-File
 sub Read_Number_File($)
 {
@@ -44,6 +52,7 @@ sub Read_Number_File($)
        my $First_Line = <$File>;
        close $File;
 
+       $First_Line = Strip($First_Line);
        $First_Line =~ /$Heading_Regex/;
        $Name = $1;

… and then my World is hole again:

✔ ~/All-Dings/111/0 [Master ↓·9|✚ 1…6] 00:17 $ perl 300010011.pl > out.perl
✔ ~/All-Dings/111/0 [Master ↓·9|✚ 1…6] 00:20 $ python3 300010010.py > out.python 
✔ ~/All-Dings/111/0 [Master ↓·9|✚ 1…6] 00:20 $ diff out.perl out.python
✔ ~/All-Dings/111/0 [Master ↓·9|✚ 1…6] 

Day-34: Css and License

Blog-Chain-Time 2023.04.27-15:10 with Thomas

Topics: Programming, Thomas

I arrived at the Apartment of Thomas and start with our first Css-Training.

Blog-Chain-Time 2023.04.27-20:47 in Tübingen

Topics: Dings-Project, Dings-License

I add the Dings-License to the Dings-Project.

Blog-Chain-Time 2023.04.28-00:41 in Tübingen

Topics: Dings-Css-File

After some Hours research on Css-Basics, I finish the Dings-Css-File and the Html-Pages now looks much more professional.

Day-33: Starting Dings-Library

Blog-Chain-Time 2023.04.26-12:34 in Tübingen

Topics: Chat-GPT, Graph-Structure

Today I would like to print the Graph-Structure of all my current Things, but because I am lazy, I ask Chat-GPT for Help:

Write a program that prints a graph graphically
Sure, here's an example Python program that reads in a graph represented as an adjacency list and prints out its graphically using the networkx and matplotlib libraries:

import networkx as nx
import matplotlib.pyplot as plt

# Define a function to read in a graph from a file
def read_graph(filename):
    # Create an empty dictionary to hold the graph
    graph = {}


[...]

Then I install the two required Libraries, …

✘-127 ~/All-Dings/Graph 12:29
$ python3 -m pip install networkx matplotlib
Collecting networkx
  Downloading networkx-3.1-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 12.5 MB/s eta 0:00:00
Installing collected packages: networkx
Successfully installed networkx-3.1

[notice] A new release of pip is available: 23.0.1 -> 23.1.2
[notice] To update, run: python3.11 -m pip install --upgrade pip

[...]

… create an Input File, …

✔ ~/All-Dings/Graph 12:33
$ cat graph.txt
1.0 1.1 1.2
1.1 1.1.0 1.1.2
1.1.2 1.1.2.1

… and then run the Program:

✔ ~/All-Dings/Graph 12:41
$ python3 graph.py
1.0 -> 1.1 1.2
1.1 -> 1.1.0 1.1.2
1.1.2 -> 1.1.2.1

Blog-Chain-Time 2023.04.27-00:56 in Tübingen

Topics: Dings-Lib, Perl, Python

I started to programm my Dings-Library and first wrote a Program to read and print all Dings. Here the Code in modern Python

# Dings-Lib-Python

"""
The Dings-Lib-Python is a [Dings-Lib](/0/300010000.html) in [Python](/0/9010003.html).
"""

## Imports

import re
import os

## Directory containing the Markdown files
Dings_Directory = os.getcwd()

## Regular-Expressions

### Get Number from Number-File
Number_Regex = re.compile(r'^(\d+).md$')

### Get Heading String from first Line
Heading_Regex = re.compile(r'^#+\s*(.*)\n$')

## Number-File-List
Number_File_List = []

## Read all Number-Files into a [Linked-List](/0/250000019.html)
def Read_Number_File_List():
        ### Loop over all Files in the Directory
        for File_Name in os.listdir(Dings_Directory):
                if not File_Name.endswith('.md'):
                        continue
                with open(os.path.join(Dings_Directory, File_Name), 'r') as File:
                        First_Line = File.readline()
                Name = Heading_Regex.sub(r'\1', First_Line)
                Number = Number_Regex.sub(r'\1', File_Name)

                ### Define new [Dictionary](/0/250000018.html) for Number-File
                Number_File = {}
                Number_File['Number'] = Number
                Number_File['Name'] = Name
                ### Append Number-File-Dictionary to Number-File-List
                Number_File_List.append(Number_File)

## Print all Number-Files
def Print_Number_File_List():
        for Number_File_Dictionary in Number_File_List:
                print(Number_File_Dictionary)

## Test Number File
def Number_File_List_Test():
        Read_Number_File_List()
        Print_Number_File_List()

Number_File_List_Test()

… and here (almost) the same Thing in good-old Perl:

# Dings-Lib-Perl

=for comment
The Dings-Lib-Perl is a [Dings-Lib](/0/300010000.html) in [Perl](/0/9010001.html).
=cut

## Imports

use 5.010;
use strict;
use warnings;
use Cwd;

## Directory containing the Markdown files
my $Dings_Directory = getcwd;

## Regular-Expressions

### Get Number from Number-File
my $Number_Regex = qr/^(\d+).md$/;

### Get Heading String from first Line
my $Heading_Regex = qr/^#\s+(.*)\n$/;

## Number-File-List
my %Number_File_List = ();

## Read all Number-Files into a [Linked-List](/0/250000019.html)
sub Read_Number_File_List()
{
        my ($File, $First_Line, $Name, $Number, $Number_File);
        my @File_List;

        ### Loop over all Files in the Directory
        opendir(DH, $Dings_Directory);
        @File_List = readdir(DH);
        closedir(DH);

        foreach my $File_Name (@File_List) {
                if ($File_Name !~ /^.*\.md$/) {
                        next;
                }
                open my $File, '<', $File_Name;
                my $First_Line = <$File>;
                close $File;

                $First_Line =~ /$Heading_Regex/;
                $Name = $1;

                $File_Name =~ /$Number_Regex/;
                $Number = $1;

                ### Define new [Dictionary](/0/250000018.html) for Number-File
                $Number_File = {};
                $Number_File->{'Number'} = $Number;
                $Number_File->{'Name'} = $Name;
                ### Append Number-File-Dictionary to Number-File-List
                $Number_File_List{$Number} = $Number_File;
        }
}

## Print all Number-Files
sub Print_Number_File_List()
{
        my $Number_File;

        foreach my $Number_File (values %Number_File_List) {
                printf("%d: %s\n", $Number_File->{'Number'}, $Number_File->{'Name'});
        }
}

## Test Number File
sub Number_File_List_Test()
{
        Read_Number_File_List();
        Print_Number_File_List();
}

Number_File_List_Test();

Day-32: Information-Mapping

Blog-Chain-Time 2023.04.25-14:15 in Tübingen

Topics: Dings, Information-Mapping

Since several Days I think about a good Mechanism, how to share Information between Documents. IMHO, in Principle there are three different Ways to do that:

Reference Information

We could create a new Document that uses a Direct-Reference on the above Information, …

# Document about Including Information

Michael_Holzheu wrote that there are [three](/0/23.html#3201) Ways of sharing Information.

… or we could use an Indirect-Reference:

# Document about Including Information

Michael_Holzheu wrote that there are three Ways of sharing Information [[1000]](#1000).

## References

[<a id="1000"/>1000] [About-Dings-Share-Information](/0/23.html#3201)

Include Information

We could build a Mechanism that allows to include Sections 1:1 into other Documents, e.g. with some Include-Statement we could import this Blog-Entry in our new Document. At least for Images this already works for Markdown, where the !-Character is used for the Include-Statement:

# Document about Including Information

Michael_Holzheu wrote the following:

![About-Including-Information](/0/23.html#3201)

Copy Information

Finally we can of course manually copy the Information:

# Document about Including Information

Michael_Holzheu wrote that there are [three](/0/23.html#3201) Ways of sharing Information:

- Reference Information
- Include Information
- Copy Information

Blog-Chain-Time 2023.04.25-14:15 in Tübingen

Topics: Information-Sharing, Internet, Xanadu, Virtual-Mapping

So, after thinking a little bit about Information-Sharing Theory, let’s have a Look on the History of Internet:

The British Man Tim_Berners-Lee invented HTML that provides Hyper-Links for Referencing Information in the World-Wide-Web.

A Link can be specified as follows:

<a href="https://holzheu.de/">Web-Site from Michael_Holzheu</a>

Like with Markdown, there seems to be no native Mechanism [3211] in HTML to include other HTML-Pages, but interestingly including Pictures is possible:

<img src="0.jpg" alt="Michael_Holzheu"/>

The US Man Ted_Nelson suggested an Alterntive to the Ideas of Tim_Berners-Lee and implemented the Xanadu-System, which is able to include Information in other Documents using so-called Transclusion, where the Data is copied only at Rendering-Time.

The Concept of Transclusion is a very wide-spread Thing that is called Mapping in Virtualization, e.g. the following three Examples immediately come into my Mind:

Here a small Diagram that illustrates the Concept of Virtual-Mapping at the Example of two different Virtual-Documents that are constructed out of three “real” Objects:

+---------------------------------------------------------+
|                                                         |
|       Virtual-1          Real           Virtual-2       |
|                                                         |
| +-------------------+             +-------------------+ |
| |     Object-3      |  Object-1   |     Object-1      | |
| |                   |             |                   | |
| |     Object-2      |  Object-2   |     Object-2      | |
| |                   |             |                   | |
| |     Object-1      |  Object-3   |     Object-3      | |
| +-------------------+             +-------------------+ |
|                                                         |
+---------------------------------------------------------+

Advantages of Virtual-Mappings:

Disadvantages of Virtual-Mappings:

Day-31: Chat-GPT

Blog-Chain-Time 2023.04.24-15:40 in Tübingen

Topics: Chat-GPT, Perl

I heard that Chat-GPT can also write Program-Code, so let’s try:

Michael: Write perl code for quicksort
Chat-GPT: Sure, here's an implementation of quicksort in Perl:
sub quicksort {
    my @arr = @_;
    if (@arr <= 1) {
        return @arr;
    }
    my $pivot = $arr[int(@arr/2)];
    my @left = grep { $_ < $pivot } @arr;
    my @middle = grep { $_ == $pivot } @arr;
    my @right = grep { $_ > $pivot } @arr;
    return (quicksort(@left), @middle, quicksort(@right));
}

The Code looks good and even an Example-Program is provided, …

✔ ~/All-Dings 15:43
$ tail -4 Quick-Sort.pl
my @my_list = (4, 2, 7, 1, 3, 5, 6);
my @sorted_list = quicksort(@my_list);
print join(", ", @sorted_list), "\n";

… that seems to work:

✔ ~/All-Dings 15:44
$ perl Quick-Sort.pl
1, 2, 3, 4, 5, 6, 7

Day-30: Starting Studies

Blog-Chain-Time 2023.04.23-18:04 in Tübingen

Topics: Brezel-Study, Study

After adding lots of new Concepts again, I started my first Study for this Project.

Day-29: Decision-Problems (again)

Blog-Chain-Time 2023.04.23-02:29 in Tübingen

Topics: Abbreviations, Decisions

Finally I also revert my last Abbreviation-Idea.

Blog-Chain-Time 2023.04.22-20:03 in Tübingen

Topics: Underscore, Hyphen, Decisions

After I already had a bad Feeling with my Yesterday’s Work, I now decided to revert the first Idea of using the Underscore as Word_Separator_Character.

I my new Idea is to use the Underscore for Names like Roxana_Stanciu and the Hyphen for all combinded Things like

First I manually edit the Dings-File and then use the following Script to change all Names:

cat 0.txt | awk '{print $2}' | grep - | while read -r Dings; do if [ "$Dings" != "" ]; then Old_Dings=$(echo $Dings | sed -E 's/-/_/g'); echo "$Old_Dings -> $Dings"; sed -i '' 's/$Old_Dings/$Dings/g' *.md; fi; done

But to remember the History, I would like to keep my two Blog-Files unchanged:

✔ ~/All-Dings/111/0 [Master|✚ 3] 20:11
$ git checkout 23.md 
Updated 0 paths from the index
✔ ~/All-Dings/111/0 [Master|✚ 3] 20:11
$ git checkout 21.md 
Updated 0 paths from the index

Day-28: Decision-Problems

Blog-Chain-Time 2023.04.21-18:00 in Tübingen

Topics: Underscore, Hyphen, Decisions

After I worked a lot on the Concepts Relation and Function, I came back to Informatics again. Then I realized that my current Naming_Convention to use Hyphens as Word_Separator_Character is suboptimal for (Programming_Languages)[9010000.md]. Therefore I decided with a heavy Heart to exchange all the --Characters with their _-Counter_Parts.

Blog-Chain-Time 2023.04.21-18:00 in Tübingen

Topics: Abbreviation, Decisions

Then I introduce for each Discipline an Abbreviation, for Example Math_System instead of Mathematics_System, but TBH I am not really sure if that Decision is a good Idea.

Blog-Chain-Time 2023.04.21-21:50 in Tübingen

Topics: Abbreviation, Decisions

Maybe even my penultimate Decision was wrong:

✔ ~/All-Dings/111/0 [Master ↓·2|…1] 21:53
$ cat 1971099001.md
# michael-holzheu@Git_Hub

michael-holzheu@Git_Hub is a [User_Profile](/0/9000140.html) of [Michael_Holzhe](/0/0.html).

Blog-Chain-Time 2023.04.21-22:49 in Tübingen

Topics: Entscheidungs-Problem

After I already added a lot of Information from Wikpedia to some Personalities

✔ ~/All-Dings/111/0 [:9c9ff24|…1] 22:51
$ cat 70000007.md
# Alonso_Church

Alonso_Church is a [Math_Personality](/0/13000015.html), [Logics_Personality](/0/15000002.html) and [Philo_Personality](/0/645002.html), who is born in the [United_States](/0/141000004.html).

… I decided to remove it again:

✔ ~/All-Dings/111/0 [Master|…1] 22:53
$ git show 50ff27551d9785377183817d5dd7a1a7956e3038 70000007.md

The Reasoning is that IMHO, there is a Entscheidungs_Problem, if a Human really is a Personality or not, so better …

commit 50ff27551d9785377183817d5dd7a1a7956e3038
Author: Michael Holzheu <michael@holzheu.de>
Date:   Fri Apr 21 22:46:36 2023 +0200

    Slowly ...

diff --git a/70000007.md b/70000007.md
index 176d046..5a77e89 100644
--- a/70000007.md
+++ b/70000007.md
@@ -1,3 +1,3 @@
 # Alonso_Church
 
-Alonso_Church is a [Math_Personality](/0/13000015.html), [Logics_Personality](/0/15000002.html) and [Philo_Personality](/0/645002.html), who is born in the [United_States](/0/141000004.html).
\ No newline at end of file
+Alonso_Church is a [Human](/0/40000001.html).
\ No newline at end of file

Day-27: Privacy and Ownership-Right

Blog-Chain-Time 2023.04.21-00:56 in Tübingen

Topics: Juristics

Today I thought a lot about how ensure my Ownership-Right.

Day-26: Encoding and Correctness

Blog-Chain-Time 2023.04.19-16:42 in Tübingen

Topics: All-Dings

I decided to rename the Project from All-Dings to just Dings, so now a new Dings-Day can begin.

Blog-Chain-Time 2023.04.19-23:23 in Tübingen

Topics: All-Dings, Performance

The last Days I noticed that the Generation of the All-Dings-File always took longer and besides there are also Bugs in my Bash-Script:

✔ ~/All-Dings/111 [Master|✚ 2…1633] 23:03
$ time bash 17.bash
Generating All-Dings ...

LibBash: No corresponding File for Name "DU-Script" found

         #0              16.bash mwName2File()        107 <== Bug was detected here
         #1              17.bash Ls_Names_Md()        15
         #2              17.bash Generate_Md()        25
         #3              17.bash Generate_All_Dings() 57
         #4              17.bash main()               73


real	16m5.709s
user	3m9.956s
sys	10m27.014s

So let’s use a better Algorithm that gives us better Performance:

✔ ~/All-Dings/111 [Master|✚ 3…1634] 23:37
$ git diff 17.bash
diff --git a/17.bash b/17.bash
index 58fe777..51ac1be 100644
--- a/17.bash
+++ b/17.bash
@@ -57,6 +57,16 @@ function Generate_All_Dings()
        Generate_Md > 17.markdown       
 }
 
+function Generate_All_Dings_Fast_And_Good()
+{
+       local All_Dings_File="17.markdown"
+
+       echo "# All Dings" > $All_Dings_File
+       echo >>  $All_Dings_File
+       echo "" | cat 0.txt | (while read -r Line; do echo $Line | sed -E 's#([0-9]+)\.(md|jpg|mp3)[ ]+(.*)#[\3](\1.\2)#g'; done) > $All_Dings_File
+}
+
+
 function Render
 {
        local Tag=$1
@@ -67,7 +77,7 @@ function Render
        fi
        Update_Sub_Modules $Tag
        make -f 300001000.make Create_Hard_Links
-       Generate_All_Dings
+       Generate_All_Dings_Fast_And_Good
 }
 
 Render $1

So now we do the same Task with better Quality and lower Costs:

✔ ~/All-Dings/111 [Master|✚ 2…1631] 00:40
$ time bash 17.bash 
real	0m1.484s
user	0m0.330s
sys	0m1.031s

So who would complain about that?

Blog-Chain-Time 2023.04.20-01:35 in Tübingen

Topics: Quality

Who will complain our last Work? Well, probably the Consumer, who can expect at least some Correctness:

✔ ~/All-Dings/111 [Master|✚ 2…1665] 01:34 $ git diff 17.bash 
diff --git a/17.bash b/17.bash
index 0e1b8d4..868131f 100644
--- a/17.bash
+++ b/17.bash
@@ -57,13 +57,25 @@ function Generate_Dings()
        Generate_Md > 17.md
 }
 
-function Generate_Dings_Fast_And_Good()
+function Generate_Dings_Fast_And_Correct()
 {
        local Dings_File="17.md"
+       local Link
 
-       echo "# Dings-File" > $Dings_File
-       echo >> $Dings_File
-       cat 0.txt | (while read -r Line; do echo $Line | sed -E 's#([0-9]+)\.(md|jpg|mp3)[ ]+(.*)#[\3](\1.\2)#g'; done) >> $Dings_File
+       echo > $Dings_File
+       cat 0.txt | while read -r Line
+       do
+               if [ "$Line" == "" ]; then
+                       continue
+               elif [ "${Line:0:1}" == " " ]; then
+                       continue
+               elif [ "${Line:0:1}" == "#" ]; then
+                       echo $Line >> $Dings_File
+               else
+                       Link=$(echo $Line | sed -E 's#([0-9]+)\.(md|jpg|mp3|py|bash|html|make|pl)[ ]+(.*)#[\3](\1.\2)#g')
+                       echo "- $Link" >> $Dings_File
+               fi
+       done
 }
 
 
@@ -77,7 +89,7 @@ function Render
        fi
        Update_Sub_Modules $Tag
        make -f 300001000.make Create_Hard_Links
-       Generate_Dings_Fast_And_Good
+       Generate_Dings_Fast_And_Correct
 }
 
 Render $1

Blog-Chain-Time 2023.04.20-02:26 in Tübingen

Topics: Quality

Well, the Consumer Pandoc complained about our last Work, so one more Time:

✔ ~/All-Dings/111 [Master ↑·1|✚ 2…1671] 02:25
$ git diff 17.bash 
diff --git a/17.bash b/17.bash
index 336d361..cceeea0 100644
--- a/17.bash
+++ b/17.bash
@@ -71,7 +71,9 @@ function Generate_Dings_Fast_And_Correct()
                elif [ "${Line:0:1}" == " " ]; then
                        continue
                elif [ "${Line:0:1}" == "#" ]; then
+                       echo >> $Dings_File
                        echo $Line >> $Dings_File
+                       echo >> $Dings_File
                else
                        Link=$(echo $Line | sed -E 's#([0-9]+)\.(md|jpg|mp3|py|bash|html|make|pl)[ ]+(.*)#[\3](\1.\2)#g')
                        echo "- $Link" >> $Dings_File

Day-25: Medicine Part-1

Blog-Chain-Time 2023.04.18-21:37:09 in Tübingen

Topics: Doc-Holzheu

I create a new Identity for my Work in the Medical-System.

Blog-Chain-Time 2023.04.18-23:0O in Tübingen

Topics: Rules, Doktor-Holzheu

On a Smoking-Round I decided to change the Name of my new Identity to Doktor-Holzheu, which is according to my old Rule.

But then I extended the Scope from Medical-System to Academics-System, which would change the Meaning of the Number-File.

Fortunately I have also an old Rule that allows to do some Mistakes - At least during one All-Dings-Day.

Blog-Chain-Time 2023.04.19-01:47 in Tübingen

Topics: Warning

Because Today I mainly worked on the Field of Medicine, where small Errors can have really bad Effects, as last Work-Item I add a short Warning to all rendered Html-Pages:

✔ ~/All-Dings/111/0 [Master ↓·29|✚ 1] 01:46
$ git diff
diff --git a/300000004.make b/300000004.make
index 6dbd954..c55b6a2 100644
--- a/300000004.make
+++ b/300000004.make
@@ -7,6 +7,7 @@ Html-File-List = $(subst .md,.html,$(Md-File-List)) index.html
 define Markdown_to_Html
        pandoc --standalone --template 300000002.htm $(1) -o $(2)
        sed -i '' -E 's/(href="[0-9]+)\.md/\1\.html/g' $(2)
+       sed -i '' -E 's#<body>#<body><pre class="console"><code>Warning: Although I give my very Best, Mistakes are still possible.</code></pre>#g' $(2)
 endef
 
 all: Html-Files

Day-24: Organizing Things Part-2

Blog-Chain-Time 2023.04.17-12:40 in Tübingen

Topics: All-Dings

I create a new Repository .github that is used by Git-Hub as Landing-Page for the whole Project. The Readme-File is located under profile/README.md.

Blog-Chain-Time 2023.04.17-15:00 in Tübingen

Topics: All-Dings

I have choosen the wrong Name for the Tübingen-Repository so now I have to delete the old Sub-Module …

✔ ~/All-Dings/111 [Master|✔]  14:58
$ git rm 200001
rm '200001'
✔ ~/All-Dings/111 [Master|●2] 
14:59 $ rm -rf .git/modules/200001
✘-128 ~/All-Dings/111 [Master|●2] 
15:00 $ git commit -m "Delete 200001/Tübingen"
[Master a72973b] Delete 200001/Tübingen
 2 files changed, 4 deletions(-)
 delete mode 160000 200001

… and re-add the Repository with the new Name:

✔ ~/All-Dings/111 [Master|✔]  15:02
$ git submodule add git@github.com:All-Dings/2000001.git
Cloning into '/Users/michael-holzheu/All-Dings/111/2000001'...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 9 (delta 0), reused 6 (delta 0), pack-reused 0
Receiving objects: 100% (9/9), done.
✔ ~/All-Dings/111 [Master|●2] 
15:03 $ git status
On branch Master
Your branch is up to date with 'origin/Master'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   .gitmodules
	new file:   2000001

✔ ~/All-Dings/111 [Master|●2] 
15:03 $ git add -u
✔ ~/All-Dings/111 [Master|●2] 
15:03 $ git commit -m "Add Repository 2000001/Tübingen"
[Master f945b8e] Add Repository 2000001/Tübingen
 2 files changed, 4 insertions(+)
 create mode 160000 2000001

Blog-Chain-Time 2023.04.17-15:23 in Tübingen

Topics: All-Dings

I improved my Work-Flow for creating the Html-Pages and now the following Command-Sequence will generate a new All-Dings-Web-Page:

$ git branch -D Rendering
$ git checkout -b Rendering
$ make
$ git add *.*
$ git commit -m "Add Html-Files"
$ git push -f origin Rendering

The resulting Web-Page can be currently found under the following Link: https://all-dings.github.io/111/index.html

Blog-Chain-Time 2023.04.17-16:43 in Tübingen

Topics: All-Dings

I document the new Render-Day-X-Work-Flow, so that Everybody will now be able to render the All-Dings-Project for a given Day-X.

Day-23: Organizing Things Part-1

Blog-Chain-Time 2023.04.16-15:41 in Tübingen

Topics: All-Dings

I now concretized the Handling of the All-Dings-Repositories:

So for our 0-Repository it now looks like the Following:

✔ ~/All-Dings/111/0 [Master ↓·4|✚ 2…1] 15:49
$ ls -l 0.*
-rw-r--r--  1 michael-holzheu  staff    427 16 Apr 14:30 0.md            <--- Repository-File
-rw-r--r--  1 michael-holzheu  staff  18839 16 Apr 15:06 0.txt           <--- Naming-File
✔ ~/All-Dings/111/0 [Master ↓·4|✚ 2…1] 15:49
$ ls -l README.md 
lrwxr-xr-x  1 michael-holzheu  staff  4 16 Apr 14:51 README.md -> 0.md   <--- Git-Hub-Readme-File

Blog-Chain-Time 2023.04.16-18:40 in Tübingen

Topics: All-Dings

After I organized the Naming-File in the 0-Repository I think about where to store the Things that are required by all other Repositories.

The Best I can think of now is to move all to the Rendering-Repository:

## 111 About-Rendering-Repository

1000001.md     Blog-Chain-Time

300000008.md   All-Dings-Abbreviation-Character
300000007.md   All-Dings-System
300000006.md   All-Dings-Landing-Page
300000004.make All-Dings-HTML-Make-File
300000003.md   All-Dings-HTML-Make-File
300000002.html All-Dings-HTML-Template-File
300000002.md   All-Dings-HTML-Template
300000001.md   All-Dings
300000000.md   Blog-Chain

5.md           All-Dings-Rules
23.md          About-All-Dings

300001000.make Rendering-Makefile  
300000007.md   All-Dings-Rendering-Repository

17.md          All-Things
111.md         About-Rendering-Repository

But now the next Problem arises: If I do this, I would change the Meaning of the Rendering-Repository and consequently I should rename it to All-Dings.

Somehow I don’t like this, because my Idea up to now was that the Numbers are made for Eternaty and Changing the Meaning of a Number-File would conceptually be the same as Changing its Number.

So until I am more clear on this Question I leave the All-Dings-Things in the 0-Repository and hope that good Ideas arrive soon.

Blog-Chain-Time 2023.04.16-21:25 with a Buddy

Topics: All-Dings, Gender-Separation

While showing my Buddy the current Naming-File, we stumbled across the Word Waiter, which triggered a short Discussion about Gender-Separation in the All-Dings Project. My current Approach for this this Problem is to use as neutral as possible Terms for all my Things.

Day-22: The second User

Blog-Chain-Time 2023.04.15-11:01 in Tübingen

Topics: Git

While looking for a Solution to manage multiple Git-Repos I found the Gita-Project [2102] that is written in Python.

Blog-Chain-Time 2023.04.15-20:09 in the Train to Tübingen

Topics: All-Dings, User-Profile

Added Roxana Stanciu as the second User of the All-Dings-System.

Blog-Chain-Time 2023.04.15-22:10 in the Train to Tübingen

Topics: Programming

I added a Helper-Function to update all Git-Sub-Modules in the Rendering-Repository:

function Update_Sub_Modules()
{
        local Tag=$1
        local Old_Tag;

        for Git_Sub_Module in $(git submodule | awk '{print $2}')
        do
                >&2 echo "Updating: $Git_Sub_Module"

                Old_Tag=$(git tag -l | grep $Tag)
                cd $Git_Sub_Module
                git pull origin Master
                git checkout Master
                git pull --rebase

                if [ "$Old_Tag" != "" ]; then
                        git tag -d $Tag
                fi
                git push origin :refs/tags/$Tag
                git tag $Tag
                git push --tags;
                cd ..
        done
}

Footnotes

[2250] Gita: https://github.com/nosarthur/gita

Day-21: Deep Concepts

Blog-Chain-Time 2023.04.14-00:30 in Tübingen

Topics: Concept

Originally I wanted to look into Gimp-Scripts, but then I made another Deep-Dive into the World of Concepts.

Blog-Chain-Time 2023.04.15-01:21 in Tübingen

Topics: Programming

As last Work-Item for Today I write a short Bash-Script to automate the daily Update of the Git-Sub-Modules in the Rendering-Repository:

✔ ~/All-Dings/111 [Master|✚ 2…1]  01:29
$ Tag=Day-21; for Git_Sub_Module in $(git submodule | awk '{print $2}'); do cd $Git_Sub_Module; git pull --rebase; git tag -d $Tag; git push Origin :refs/tags/$Tag; git tag $Tag; git push --tags; cd ..; done
Already up to date.

Day-20: Programs and Functions

Blog-Chain-Time 2023.04.13-00:30 in Tübingen

Topics: Programming

After I finished Day-19 and had three last Cigarettes, I realized that I deleted my Perl-Scripts by Accident:

✔ ~/All-Dings  00:28
$ find . | grep dings

That means a lot of Work is lost and I have to think about, how to save unfinished Work in my Project …

Blog-Chain-Time 2023.04.13-12:30 in Tübingen

Topics: Programming

After the Tennis-Training I decided to use this Day for Programming. To speparate Things, I create for this a new Programming-Repository with the Number 250000000.

I would like to re-write the lost Perl-Programm, and use the Opportunity to compare the two Programming-Languages Perl and Python.

For local Work on my Mac-Book-Pro I first install the Python-3-Package:

✘-1 ~/All-Dings/1000001000 [Master ↓·1|✚ 1]  12:34
$ brew install python

Then I create two new Number-Files in the Programming-Repository:

To separate Things even more, I create a new Blog-File for this Project:

The first Thing when learning a Programming-Language is the Hello-World-Program, which should print the Message Hello World! to the Screen.

But before we do that, we have to learn two other Concepts, namely Program-Comments and Program-Functions.

At least the first one is quite simple, …

18:06
$ cat 250000004.md
# Program-Comment

A Program-Comment is used be a [Programm-Writer](/0/202000006.html) to explain his [Program](/0/250000005.html).

… but when I wanted to describe, what a Program-Function exectly is, I went from a Hundred to a Thousand:

# Program-Function
A Program-Function uses a [List](/0/60008.html) of [Program-Statements](/0/250000007.html) to transform [Program-Parameters](/0/250000009.html) into [Program-Output](/0/250000014.html).

# Program
A Program is the [Implementation](/0/600057.html) of an [Algorithm](/0/250000006.html).

# Algorithm
An Algorithm is a [Description](/0/600056.html) for as [Solution](/0/600024.html) of a given [Problem](/0/600029.html).

# Program-Statement
A Program-Statement is the smallest non devisable [Element](/0/700006.html) of a [Programming-Language](/0/9010000.html)

# Program-Variable
A Program-Variable has a [Name](/0/60048.html) and contains [Data](/0/60001.html).

# Program-Parameter
A Program-Parameter is used to pass [Data](/0/60001.html) from the [Program-Caller](/0/250000010.html) to the [Program-Callee](/0/250000011.html) by creating a new [Name-Binding](/0/60050.html) that gives the [Program-Caller](/0/250000010.html) some kind of [Access](/0/60049.html) to the Data.

# Program-Caller
The Program-Caller gives [Program-Control](/0/250000012.html) to a [Program-Callee](/0/250000011.html).

# Program-Callee
A Program-Callee receives [Program-Control](/0/250000012.html) from a [Program-Caller](/0/250000010.html).

# Program-Control
Program-Control defines which Part of a [Program](/0/250000005.html) executes [Program-Statements](/0/250000007.html) at a given Time.

# Program-Executer
A Program-Executer processes the [Program-Statements](/0/250000007.html) of a [Program](/0/250000005.html) according to the [Specification](/0/600060.html) of the [Programming-Language](/0/9010000.html).

# Program-Output
Program-Output is [Data](/0/60001.html) that is created by a [Program](/0/250000005.html).

# Program-Input
Program-Input is [Data](/0/60001.html) that is transfered to a [Program](/0/250000005.html)

So a Program-Function uses a List of Program-Statements to transform Program-Parameters into Program-Output.

Hmm, sounds more like the Definition of a Program, so let’s check, what I have written for that Thing:

✔ ~/All-Dings/250000000 [main|✔] 
18:16
$ cat 250000005.md
# Program

A Program is the [Implementation](/0/600057.html) of an [Algorithm](/0/250000006.html).

Well that is of course also true for a Function …

Blog-Chain-Time 2023.04.13-12:09:48 in Tübingen

On my Smoking-Round I came to a Conclusion for the Program-vs-Function-Question: Every Function is a Program, but at a different Nesting-Level. It is somehow like with a Russian-Matrjoschka where one Thing contains the next one.

But our Situation is a bit more complex that with the Russian Lady, who always has a 1:1 Relation between the different Container-Ladies.

So maybe a better Analogy would be a the Human-Body, that contains many Organs, that contain many Cells and so on.

So let’s create some Ascii-Art [0] and draw first the Tree-Diagram that shows a small Part of our Computer-Matrjoschka:

                    ┌──────────────┐
                    │   Program    │
                    └──────┬───────┘
                           │
        ┌──────────────────┼──────────────────┐
        │                  │                  │
        ▼                  ▼                  ▼
┌───────────────┐  ┌───────────────┐   ┌───────────────┐
│  Function-A   │  │  Function-B   │   │   Function-C  │
└───────────────┘  └───────────────┘   └───────────────┘

And finally look at the same Thing using a Set-Diagram:

┌──────────────────────────────────────────────────────┐
│ Process                                              │
│ ┌───────────────┐ ┌───────────────┐ ┌──────────────┐ │
│ │  Function-A   │ │  Function-B   │ │  Function-C  │ │
│ └───────────────┘ └───────────────┘ └──────────────┘ │
│                                                      │
└──────────────────────────────────────────────────────┘

Footnotes:

[0] Acii-Flow: https://asciiflow.com/#/

Day-19: Consistency

Topics: Programming

Blog-Chain-Time 2023.04.12-17:23 in Tübingen, Yesterday I was thinking on the Problem, how to reference Information in my Documents.

References have two Elements, namely the Anchor that marks the Location of an Information and a Link from another Document that adressess that Anchor.

In Markdown there is the Concept of local Links that are automatically created [0] for each Heading. Unfotunately it looks like that there is no common Standard, how the Anchors are created.

Let’s use the following Heading as Example:

#### Blog-Chain-Time 2023.04.12-14:46 in Tübingen

I found a Web-Page that automaticall creates the following Link for this Heading:

[Blog-Chain-Time 2023.04.12-15:28 in Tübingen](#blog-chain-time-20230412-15-28-in-t-bingen)

So it creates out of the Heading-String Blog-Chain-Time 2023.04.12-15:28 in Tübingen the Anchor blog-chain-time-20230412-15-28-in-t-bingen.

Unfortuately the Git-Hub Markdown assumes a different Anochor for the Heading, namely blog-chain-time-20230412-1446-in-tübingen, and therefore the generated Link does not work.

I this Project for Addressing of Number-Files we already use its Number, so my new Idea is to also that Concept for Addressing of Information within Documents. I still want to use the automatic Anchor-Generation of Markdown, therefore I decide to use a Heading with Level 6 (###### NUMBER) as explicite Anchors.

But when I saw the rendered Result it looked very messy. So finally I used the invisible <a> Html-Tag as Anchor:

<a name="10002"></a>
#### Blog-Chain-Time 2023.04.12-15:14 in Tübingen

Then I added to each Blog-Entry a Topic using a Level-6-Heading:

<a name="10002"></a>
#### Blog-Chain-Time 2023.04.12-15:14 in Tübingen
###### Topics: Clothing, Riddle

After done that, I render all Pages to Html and realize the next Problem:

## 2023.04.12

#### Blog-Chain-Time 2023.04.12-14:46 in Tübingen ###### Topics: Clothing, Geography, Justice

Perhaps the Pandoc-Tool does not like Level-6-Headings? Let’s create a Test-File, …

✔ ~/All-Dings/111 [Rendering L|✚ 1…1096] 19:28
$ cat test.md
# Level 1
## Level 2
### Level 3
#### Level 4
#### Level 5
##### Level 6
###### Level 7

… convert it with Pandoc into Html, …

✔ ~/All-Dings/111 [Rendering L|✚ 1…1096] 19:28
$ pandoc --standalone --template 300000002.htm test.md -o test.html

… and check the Output:

✔ ~/All-Dings/111 [Rendering L|✚ 1…1096] 19:30
$ cat test.html 
<!doctype html>
<html lang="en">
  <head>
    <style>
	pre {
		background-color: #F8F9FA;
		border-style: solid;
		border-color: #A1AAB1;
		border-radius: 4px;
		padding: 5px;
	}
    </style>
    <meta charset="utf-8">
    <meta name="date" content=''>
    <title></title>
  </head>
  <body>
<h1 id="level-1">Level 1</h1>
<h2 id="level-2">Level 2</h2>
<h3 id="level-3">Level 3</h3>
<h4 id="level-4">Level 4</h4>
<h4 id="level-5">Level 5</h4>
<h5 id="level-6">Level 6</h5>
<h6 id="level-7">Level 7</h6>
  </body>
</html>

Obviously the Problem is the Html-Tag in front of the Markdown-Heading:

✔ ~/All-Dings/111 [Rendering L|✚ 1…1096] 19:34
$ cat new-test.md 
<a name="10002"></a>
#### Blog-Chain-Time 2023.04.12-14:46 in Tübingen
###### Topics: Clothing, Geography, Justice

As a Quick-Fix I found that putting the Html-Tag within the Heading worked:

✔ ~/All-Dings/111 [Rendering L|✚ 1…1096] 19:37
$ cat latest-test.md 
#### Blog-Chain-Time 2023.04.12-14:46 in Tübingen <a name="10002"></a> 
###### Topics: Clothing, Geography, Justice

Like so often in Informatics you try around until it works, but back to the Concepts:

Currently we have three different Types of Information-Containers:

Repositories contain Number-Files, Number-Files contain Documents, Documents contain e.g. Blog-Entries [1]. We have the following Addressing for every Piece of Information that we can use for References from other Information:

The first two Numbers currently are unique in the Scope of this Project, but the Html-Tag-Number is only unequivocal within the Document.

What makes the Things even more complicated is the Fact that Information Containers can change over Time. So when we e.g. reference a Blog-Entry from another Blog-Entry, after some Days the Content of the first one could have canged, which then makes the Reference from the second one somehow invalid.

There are several Solutions to that Problem:

  1. Use a Time-Stamp in the Reference
  2. Use a Hash-Value for the Information in the Reference
  3. Don’t use References and instead copy the Information
  4. Try to keep the whole Project consistent at one Point in Time

My current Approach to solve the Problem of Consistency is Solution 4. Therefore I try make one Day as consistent as possible. With Git it is still possible to checkout and render old Days. So if you are interested in the Truth of the Past you still can find it.

And if some Information changes or moves, I try my best to update all the References in the Project so that the current Day is halfway consistent again.

Blog-Chain-Time 2023.04.12-22:48, I now updated this Document with Html-Tags and Links.

To save Time and Space I use now a Self-Closing-Tag as Anchor:

## Day-19: Consistenty <a id="1900"/>

Seems to work, but I did not understand everything …

Footnotes

[0] https://ecotrust-canada.github.io/markdown-toc
[1] BTW, what I have just written on Information-Containers is also not 100% correct, because Number-Files could also be Repositories again, which makes the Bit-Mess even bigger.

Day-18: Connect Repositories 1

Topics: Programming

Blog-Chain-Time 2023.04.11-12:27 in Tübingen, As already Yesterday I gave up the Concept of a single Repository that contains all Number-Files.

I now create a new Repository for my Problem with the Medical-Psychological-Assessments and use the Number 1000001000 for the Landing-Page. So now I have four Repositories:

### 1000001000

1000001000     About-Medical-Psychological-Assessment

### 888

1000000000.jpg Nicole-and-Michael-in-Metzingen
888.md         Metzingen-with-Nicole

### 111

300001000.make Rendering-Makefile  
300000007.md   All-Dings-Rendering-Repository
17.md          All-Things

### 0

300000008.md   All-Dings-Abbreviation-Character

Since I want to use the Landing-Page also for the Git-Hub Readme-File, I create a Unix-Hard-Link:

✔ ~/All-Dings/1000001000 [main|✚ 1] 13:06
$ rm README.md
✔ ~/All-Dings/1000001000 [main|✚ 1] 13:06
$ ln 1000001000.md README.md
✔ ~/All-Dings/1000001000 [main|✚ 1] 13:06
$ git diff
diff --git a/README.md b/README.md
index 13bd927..865d4b1 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,3 @@
-# About Medical-Psychological-Assessment
+# About-Medical-Psychological-Assessment
+
+Document that describes the Medical-Psychological-Assessment Process.

Then I create also for the other Repositories the Landing-Pages and move the Sorted-Things Number-File from the 0-Repository to the 111-Repository:

### 1000001000

1000001001     Medical-Psychological-Assessment
1000001000     About-Medical-Psychological-Assessment

### 888

1000000000.jpg Nicole-and-Michael-in-Metzingen
888.md         Metzingen-with-Nicole

### 111

300001000.make Rendering-Makefile  
300000007.md   All-Dings-Rendering-Repository

17.md          All-Things
111.md         About-Rendering-Repository

### 0

Number-Files Moves

I now have moved several Number-Files between Repositories, which adds Complexity and makes it harder to keep the Overview on all my Things.

For Example, to get the full History of a Number-File, we have to check all Repositories:

✘-1 ~/All-Dings/0 [Master ↓·3|…1] 15:27
$ for Repository in $(ls ..); do (cd ../$Repository; git log --pretty="format:%ci %h %s" -- 300000007.md;) ; done  
2023-04-10 20:53:40 +0200 1650178 Move 300000007.md from 0-Repository to 111-Repository
2023-04-08 19:38:28 +0200 71a7fdf Add All-Dings-Rendering-Repository
2023-04-10 23:22:08 +0200 6b79a5e Add Repository Links
2023-04-10 20:50:40 +0200 b61bf6e Move 300000007.md from 0-Repository to 111-Repository

The Number-File 300000007.md first lived in the 0-Repository

✘-1 ~/All-Dings/0 [Master ↓·3|…1] 15:33
$ git log --pretty="format:%ci %h %s" -- 300000007.md
2023-04-10 20:53:40 +0200 1650178 Move 300000007.md from 0-Repository to 111-Repository
2023-04-08 19:38:28 +0200 71a7fdf Add All-Dings-Rendering-Repository

… and then was moved into the 111-Repository:

✔ ~/All-Dings/111 [Master ↓·3|…1] 15:26
$ git log --pretty="format:%ci %h %s" -- 300000007.md
2023-04-10 23:22:08 +0200 6b79a5e Add Repository Links
2023-04-10 20:50:40 +0200 b61bf6e Move 300000007.md from 0-Repository to 111-Repository

Now let’s look for a Bash-Script to find out in which Repository-Number we currently are:

✔ ~/All-Dings/111 [Master ↓·3|…1] 15:44
$ git remote -v | grep -E ".*[0-9]+\.git" | head -1 | sed -E 's#.*Dings/([0-9]+)\.git.*#\1#g'
111

Blog-Chain-Time 2023.04.11-04:57

After I have decided to solve this Problem with a Perl-Script I have developed a Prototype, that almost works:

✔ ~/All-Dings/111 [Master|…8] 04:58
$ perl Dings.pl Log 300000007.md 
0          300000007.md 2023.04.08-19:38:28 71a7fdf6078684bba76ad77ac366960ba1615474 Add All-Dings-Rendering-Repository
111        300000007.md 2023.04.10-20:50:40 b61bf6e3f7217ab02cf665b4cb0dd5fd363b6e90 Move 300000007.md from 0-Repository to 111-Repository
0          300000007.md 2023.04.10-20:53:40 1650178390e872a550b8e2b099abd8464cb5c312 Move 300000007.md from 0-Repository to 111-Repository
111        300000007.md 2023.04.10-23:22:08 6b79a5e3b6f10c4db882c2738729f124e4c4755d Add Repository Links

Day-17: Rendering 3

Topics: Programming

Blog-Chain-Time 2023.04.10-15:56 in Tübingen, Let’s work Today again on the Rendering Idea.

Currently the HTML-Pages look really Old-Shool and for getting a bit more Style into the Show, the so called Cascading-Style-Sheets, or shortly CSS have been invented.

For adding a Light-Grey Background with rounded Borders to our Code-Blocks, I first test different Options using the W3-Schools Web-Site [[0]]((1610) and then finally add the following CSS-Code to the All-Dings-HTML-Template-File:

✔ ~/All-Dings/0 [Master ↓·3|✚ 1…491] 16:23
$ git diff 300000002.htm
diff --git a/300000002.htm b/300000002.htm
index ac99026..bfdb41f 100644
--- a/300000002.htm
+++ b/300000002.htm
@@ -1,6 +1,16 @@
 <!doctype html>
 <html lang="en">
   <head>
+    <style>
+       <!-- CSS for Code-Blocks -->
+       pre {
+               background-color: #F8F9FA;
+               border-style: solid;
+               border-color: #A1AAB1;
+               border-radius: 4px;
+               padding: 5px;
+       }
+    </style>
     <meta charset="utf-8">
     <meta name="date" content='$date-meta$'>
     <title>$title$</title>

Integrate 888-Repository

Up to now my Accroach to integrate the different Git-Repositories was to use Git-Submodules, but now I am pursuing another Idea. Therefore I delete the 0-Repository-Submodule in the 888-Repository:

✔ ~/All-Dings/888 [Master|✔] 18:20
$ git rm 0/ && git commit -m "Remove 0-Repository-Submodule" && git push
rm '0'
[Master 63ee1c5] Remove 0-Repository-Submodule
 2 files changed, 4 deletions(-)
 delete mode 160000 0
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 10 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 295 bytes | 295.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:All-Dings/888.git
   348b73d..63ee1c5  Master -> Master

My new Concept is to maintain different Repositories that all contain globally unique Numbers for their Files. In a daily Rendering-Process I then want to combinde the Content of all Repositories using the Rendering-Repository.

Combine in Rendering-Repository

For the Rendering-Repository I would like to add now all known All-Dings-Repositories using Git-Submodules again.

First I create a empty new Branch using the Git-Checkout-Command with the --orphan Option:

✔ ~/All-Dings/111 [Rendering|✔] 19:49
$ git checkout --orphan Master
Switched to a new branch 'Master'

As expected the Branch has no Commits:

✔ ~/All-Dings/111 [Master L|●995] 19:50
$ git log
fatal: your current branch 'Master' does not have any commits yet

First let’s get rid of the old Files from the Rendering-Branch using the Git-Reset-Command and the Git-Clean-Command:

✔ ~/All-Dings/111 [Master L|…1] 20:00
$ git reset && git clean -fx

Then we add the 0-Repository as first Sub-Module, …

✔ ~/All-Dings/111 [Master L|…1] 20:01
$ git submodule add git@github.com:All-Dings/0.git
Cloning into '/Users/michael-holzheu/All-Dings/111/0'...
remote: Enumerating objects: 4101, done.
remote: Counting objects: 100% (1032/1032), done.
remote: Compressing objects: 100% (447/447), done.
remote: Total 4101 (delta 554), reused 933 (delta 493), pack-reused 3069
Receiving objects: 100% (4101/4101), 7.06 MiB | 2.47 MiB/s, done.
Resolving deltas: 100% (2166/2166), done.

… and check, what Git has created for us:

20:03
$ git diff
✔ ~/All-Dings/111 [Master L|●2] 
20:03
$ git diff --cached
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..138b8ea
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "0"]
+       path = 0
+       url = git@github.com:All-Dings/0.git
diff --git a/0 b/0
new file mode 160000
index 0000000..1e51d23
--- /dev/null
+++ b/0
@@ -0,0 +1 @@
+Subproject commit 1e51d23f01dc47608bb381eb308dfe957e9628ed

Then we commit the new Sub-Module:

✔ ~/All-Dings/111 [Master L|●2] 20:09
$ git commit -m "Add 0-Repository"
[Master (root-commit) cbbfb44] Add 0-Repository
 2 files changed, 4 insertions(+)
 create mode 100644 .gitmodules
 create mode 160000 0

The same Thing is done with Nicole’s 888-Repository. Then I replace the REAMDE.md from the 888-Repository with 888.md from the 0-Repository:

✔ ~/All-Dings/888 [Master|✔] 
20:29 $ mkdir .github
✔ ~/All-Dings/888 [Master ↓·1|✔] 
20:29 $ cp ../0/888.md .
✔ ~/All-Dings/888 [Master ↓·1|…1] 
20:31 $ git rm README.md 
rm 'README.md'
✔ ~/All-Dings/888 [Master ↓·1|●1…1] 
20:32 $ cd .github/
✔ ~/All-Dings/888/.github [Master ↓·1|●1…1] 
20:32 $ ln -s ../888.md README.md
✔ ~/All-Dings/888/.github [Master ↓·1|●1…2]
✔ ~/All-Dings/888/.github [Master ↓·1|●1…2] 
20:33 $ cd ..
✔ ~/All-Dings/888 [Master ↓·1|●1…2] 
20:33 $ git add 888.md
✔ ~/All-Dings/888 [Master ↓·1|●2…1] 
20:33 $ git commit -m "Move 888.md from 0-Repository to 888-Repository"
[Master 85eca6a] Move 888.md from 0-Repository to 888-Repository
 2 files changed, 3 insertions(+), 3 deletions(-)
 create mode 100644 888.md
 delete mode 100644 README.md
20:35 $ git pull --rebase
Successfully rebased and updated refs/heads/Master.
✔ ~/All-Dings/888 [Master ↑·1|…1] 
20:35 $ git push
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 10 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 386 bytes | 386.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:All-Dings/888.git
   8019ddb..5db1b23  Master -> Master

And then I remove the 888.md File from the 0-Repository:

✔ ~/All-Dings/0 [Master|✔] 
20:09 $ git rm 888.md 
rm '888.md'
✔ ~/All-Dings/0 [Master|●1] 
20:36 $ git commit -m "Move 888.md from 0-Repository to 888-Repository"
[Master 1268dd4] Move 888.md from 0-Repository to 888-Repository
 1 file changed, 3 deletions(-)
 delete mode 100644 888.md
✘-1 ~/All-Dings/0 [Master ↓·1↑·1|✔] 
20:37 $ git pull --rebase
Successfully rebased and updated refs/heads/Master.
✔ ~/All-Dings/0 [Master ↑·1|✔] 
20:38 $ git push
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 10 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 255 bytes | 255.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To github.com:All-Dings/0.git
   0af3d85..a626a15  Master -> Master

BTW, with this I give up the Concept that all Numbers are available in the 0-Repository. Instead now each Number-File can move between the All-Dings-Repositories.

The same Thing is then done for the Number-File 300000007.md with the Name All-Dings-Rendering-Repository:

✘-PIPE ~/All-Dings/0 [Master|✔] 
20:53 $ git show 117aac93778350b00879fb164c938aa1d0ddb5f6
commit 117aac93778350b00879fb164c938aa1d0ddb5f6
Author: Michael Holzheu <michael@holzheu.de>
Date:   Mon Apr 10 20:53:22 2023 +0200

    Move 300000007.md from 0-Repository to 111-Repository

diff --git a/300000006.md b/300000006.md
index fb112a0..d2ca5fd 100644
--- a/300000006.md
+++ b/300000006.md
@@ -23,10 +23,14 @@ FYI: This Project is under heavy Construction!
 
 888.md         Metzingen-with-Nicole
 
+### 111
+
+300000007.md   All-Dings-Rendering-Repository
+
 ### 0
 
 300000008.md   All-Dings-Abbreviation-Character
-300000007.md   All-Dings-Rendering-Repository
+
 300000006.md   All-Dings-Landing-Page
 300000004.make All-Dings-HTML-Makefile-File
 300000003.md   All-Dings-HTML-Makefile

Now I update the Git-Submodules in the Rendering-Repository:

✔ ~/All-Dings/111 [Master L|✔] 20:51
$ cd 0 && git pull && cd .. && cd 888 && git pull && cd ..
✘-1 ~/All-Dings/111 [Master L|✔] 20:56
$ git add -u && git commit -m "Update Git-Submodules" && git push Origin Master

Now I would like to combine the Files of the 0-Repository with the 888-Repository using Unix-Hard-Links and therefore I create another Make-File:

✔ ~/All-Dings/111 [Master L|…511] 21:43
$ cat 300001000.make
# Rendering-Makefile
#

## Git-Sub-Module Number-Files

Number_File_List += $(wildcard 0/*.*)
Number_File_List += $(wildcard 888/*.*)

## Git-Sub-Module Number-Files without leading Directory

Number_File_List_Local = $(notdir $(Number_File_List))

## All-Rule

all: $(Number_File_List_Local)

## Create-Hard-Link-Rule

%: */%
	ln  $< $@

## Clean-Rule

clean:
	rm -f $(Number_File_List_Local)

.PHONY: all clean

After all the Number-Files from the 0-Repository and the 888-Repository now are all in the same Directory, I create the HTML-Files by calling the already known All-Things-Make-File:

✔ ~/All-Dings/111 [Master L|✚ 1] 21:59
$ git diff
diff --git a/300001000.make b/300001000.make
index 504ffa4..0f720a9 100644
--- a/300001000.make
+++ b/300001000.make
@@ -13,6 +13,7 @@ Number_File_List_Local = $(notdir $(Number_File_List))
 ## All-Rule
 
 all: $(Number_File_List_Local)
+       make -f 300000004.make
 
 ## Create-Hard-Link-Rule
 
@@ -22,6 +23,7 @@ all: $(Number_File_List_Local)
 ## Clean-Rule
 
 clean:
+       make -f 300000004.make clean
        rm -f $(Number_File_List_Local)
 
 .PHONY: all clean

Now let’s add the first Photo to the 888-Repository:

✔ ~/All-Dings/888 [Master|…2] 22:18
$ git add 1000000000.jpg 
✔ ~/All-Dings/888 [Master|●1…1] 22:18
$ git commit -m "Add Nicole-and-Michael-in-Metzingen"
[Master 7c30a79] Add Nicole-and-Michael-in-Metzingen
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 1000000000.jpg

Then I add it to the Readme-File, but it is not displayed on Git-Hub. The Reason is again the Soft-Link .github/README.md. Therefore I repentantly copy back the Readme-Files for all Repositories:

✔ ~/All-Dings/0 [Master|…1] 22:41
$ cp .github/README.md .
✔ ~/All-Dings/0 [Master ↓·3|…2] 22:42
$ git rm .github/README.md 
rm '.github/README.md'
✔ ~/All-Dings/0 [Master ↓·3|●1…2] 22:42
$ git add README.md

But now I have to remove in the Make-File the REAMDE.md from Number_File_List_Local:

✔ ~/All-Dings/111 [Master L|✚ 3] 22:55
$ git diff 300001000.make 
diff --git a/300001000.make b/300001000.make
index 0f720a9..de37151 100644
--- a/300001000.make
+++ b/300001000.make
@@ -8,7 +8,8 @@ Number_File_List += $(wildcard 888/*.*)
 
 ## Git-Sub-Module Number-Files without leading Directory
 
-Number_File_List_Local = $(notdir $(Number_File_List))
+Number_File_List_Local := $(notdir $(Number_File_List))
+Number_File_List_Local := $(filter-out README.md,$(Number_File_List_Local))
 
 ## All-Rule

Render merged Repositories

Now let’s build a new Rendering-Branch:

✔ ~/All-Dings/111 [Master|✔] 22:59
$ git branch -d Rendering
warning: deleting branch 'Rendering' that has been merged to
         'refs/remotes/Origin/Rendering', but not yet merged to HEAD.
Deleted branch Rendering (was 9bf6076).
23:00 $ git checkout -b Rendering
Switched to a new branch 'Rendering'
✔ ~/All-Dings/111 [Rendering L|✔] 
23:02 $ make -f 300001000.make
✔ ~/All-Dings/111 [Rendering L|…997] 
23:04 $ git add *
✔ ~/All-Dings/111 [Rendering L|●997] 
23:04 $ git commit -m "Add rendered Files"
✔ ~/All-Dings/111 [Rendering L|✔] 
23:05 $ git push -f Origin Rendering
Uploading LFS objects: 100% (1/1), 604 KB | 0 B/s, done.                                                                                                                                                              
Enumerating objects: 978, done.
Counting objects: 100% (978/978), done.
Delta compression using up to 10 threads
Compressing objects: 100% (639/639), done.
Writing objects: 100% (977/977), 4.00 MiB | 3.52 MiB/s, done.
Total 977 (delta 428), reused 462 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (428/428), done.
To github.com:All-Dings/111.git
 + 9bf6076...87209eb Rendering -> Rendering (forced update)

Now we have pushed the merged Rendering of the 0-Repository and the 888-Repository, looks good!

Footnotes

[0] https://www.w3schools.com/html/default.asp

Day-16: Rendering 2

Topics: Programming

Blog-Chain-Time 2023.04.09-09:13 in the S-Bahn to Stuttgart, I look into the Phishing-Warning from Yesterday.

Interestingly the Symptom of the Problem depends on the Web-Browser: With the Chrome-Web-Browser the Phishing-Error-Page is loaded and the Safari-Web-Browser shows my Sorry-Page.

My Hpyothesis is that the new Soft-Link to the Readme-File triggers this Problem.

First let’s check the Git-History with the Git-Log-Command using the --oneline Command-Option that creates compact Output using shortened 8-Character-Git-Hashes:

✔ ~/All-Dings/0 [Master ↓·20|…1] 09:54
$ git log --oneline .github/README.md 
6df58b0 Move README.md -> .gitconfig/README.md
02c9f3e Remove Soft-Link again
1e740d0 Add Soft-Link 888.md -> README.m

To undo the changes I first try the Git-Revert-Command, …

✔ ~/All-Dings/0 [Master|…1] 10:01
$ git revert 6df58b0 
Auto-merging 300000006.md
CONFLICT (content): Merge conflict in 300000006.md
error: could not revert 6df58b0... Move README.md -> .gitconfig/README.md
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git revert --continue".
hint: You can instead skip this commit with "git revert --skip".
hint: To abort and get back to the state before "git revert",
hint: run "git revert --abort".

… that fails, because the Commit touches a File that has been changed in the Meantime, so let’s abort this Approach:

✘-1 ~/All-Dings/0 [Master|REVERTING|●2✖ 1…1] 10:03
$ git revert --abort

In the Meantime I changed my Plan and now I want to generate the Readme-File at Rendering-Time using our Makefile from Yesterday.

Readme-File at Rendering Time

Add Sub-Routine

First I move the Markdown-To-Html Conversion Code into a seperate Sub-Routine Markdown_to_Html:

✔ ~/All-Dings/0 [Master ↓·1|✚ 1…437] 10:42
$ git diff 
diff --git a/300000004.make b/300000004.make
index 8314f41..032bbdb 100644
--- a/300000004.make
+++ b/300000004.make
@@ -4,14 +4,18 @@
 Md-File-List = $(wildcard *.md)
 Html-File-List = $(subst .md,.html,$(Md-File-List))
 
+define Markdown_to_Html
+       pandoc --standalone --template 300000002.htm $(1) -o $(2)
+       sed -i '' -E 's/(href="[0-9]+)\.md/\1\.html/g' $(2)
+endef
+
 all: Html-Files
        echo "All-Things-Makefile-File"
 
 Html-Files: $(Html-File-List)
 
 %.html: %.md
-       pandoc --standalone --template 300000002.htm $< -o $@
-       sed -i '' -E 's/(href="[0-9]+)\.md/\1\.html/g' $@
+       $(call Markdown_to_Html, $<, $@)
 
 clean:
        rm -f $(Html-File-List

Create Web-Server-Directory-Index-Rule

Then I create a Makefile-Rule to create the Web-Server-Directory-Index-File, Today I am brave and try first Mixed-Case Index.html:

11:35 $ git diff
diff --git a/300000004.make b/300000004.make
index 981c039..70e5366 100644
--- a/300000004.make
+++ b/300000004.make
@@ -2,7 +2,7 @@
 #
 
 Md-File-List = $(wildcard *.md)
-Html-File-List = $(subst .md,.html,$(Md-File-List))
+Html-File-List = $(subst .md,.html,$(Md-File-List)) Index.html
 
 define Markdown_to_Html
        pandoc --standalone --template 300000002.htm $(1) -o $(2)
@@ -14,10 +14,15 @@ all: Html-Files
 
 Html-Files: $(Html-File-List)
 
+## Web-Server-Directory-Index-Rule
+
+Index.html: .github/Readme.md
+       $(call Markdown_to_Html, $<, $@)
+
 %.html: %.md
        $(call Markdown_to_Html, $<, $@)
 
 clean:
-       rm -f $(Html-File-List)
+       rm -f $(Html-File-List) Index.html
 
 .PHONY: all clean

Test Web-Server-Directory-Index-Rule

Now I switch to the Rendering-Repository and switch to the Branch for the 0-Repository using the Git-Checkout-Command:

✔ ~/All-Dings/111 [Rendering|…1] 11:37
$ git checkout All-Dings.0-Master
Switched to branch 'All-Dings.0-Master'
Your branch is up to date with 'All-Dings.0/Master'.

Because I don’t like the hard to remember Git-Branch-Name All-Dings.0-Master, I change it with the Git-Branch-command to 0-Master:

✔ ~/All-Dings/111 [All-Dings.0-Master|…1] 11:37
$ git branch -m 0-Master
✔ ~/All-Dings/111 [0-Master|…1]

With the same Reasoning I also rename the Git-Remote All-Dings.0 to 0 with the Git-Remot-Command:

11:55 $ git remote rename All-Dings.0 0
Renaming remote references: 100% (1/1), done

Then I get the latest Update from the 0-Repository with the Git-Fetch-Command, …

✔ ~/All-Dings/111 [0-Master ↓·43|…1] 11:55
$ git fetch 0
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 6 (delta 4), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (6/6), 1.62 KiB | 166.00 KiB/s, done.
From github.com:All-Dings/0
   82d3cf1..f4f5c3f  Master     -> 0/Master

… and use the Git-Pull-Command to get the new Files:

✔ ~/All-Dings/111 [0-Master ↓·45|…1] 12:01
$ git pull 0 Master
From github.com:All-Dings/0
 * branch            Master     -> FETCH_HEAD
Updating 2f2a4bc..f4f5c3f
Fast-forward
 100200000.md   |   4 ++++
 100200001.md   |   3 +++
 140000015.md   |   3 +++
 21.md          |   7 +++++++
 23.md          | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 300000004.make |  19 ++++++++++++++-----
 300000006.md   |  18 ++++++++++++++++++
 40000006.md    |   3 +++
 40000007.md    |   3 +++
 600046.md      |   3 +++
 600047.md      |   3 +++
 600048.md      |   3 +++
 650012.md      |   3 +++
 9000128.md     |   3 +++
 9000129.md     |   3 +++
 9000130.md     |   3 +++
 9000131.md     |   3 +++
 9000132.md     |   3 +++
 9000133.md     |   3 +++
 19 files changed, 225 insertions(+), 5 deletions(-)
 create mode 100644 100200000.md
 create mode 100644 100200001.md
 create mode 100644 140000015.md
 create mode 100644 40000006.md
 create mode 100644 40000007.md
 create mode 100644 600046.md
 create mode 100644 600047.md
 create mode 100644 600048.md
 create mode 100644 650012.md
 create mode 100644 9000128.md
 create mode 100644 9000129.md
 create mode 100644 9000130.md
 create mode 100644 9000131.md
 create mode 100644 9000132.md
 create mode 100644 9000133.md

Then I switch to the Rendering-Git-Branch using the Git-Checkout-Command:

 ✘-1 ~/All-Dings/111 [0-Master|…1] 12:02
 $ git checkout Rendering
Switched to branch 'Rendering'
Your branch is based on 'Origin/main', but the upstream is gone.
  (use "git branch --unset-upstream" to fixup)

Now it’s time to pull the latest Updaes from the 0-Repository into the Rendering-Git-Branch unsing the Git-Rebase-Command:

✘-128 ~/All-Dings/111 [Rendering|…1] 12:07
$ git rebase 0/Master
Successfully rebased and updated refs/heads/Rendering.

Now we have the Makefile-Changes in our Rendering-Git-Branch:

✔ ~/All-Dings/111 [Rendering|…1] 12:08
$ cat *.make
# All-Things-Makefile-File
#

Md-File-List = $(wildcard *.md)
Html-File-List = $(subst .md,.html,$(Md-File-List)) Index.html

define Markdown_to_Html
	pandoc --standalone --template 300000002.htm $(1) -o $(2)
	sed -i '' -E 's/(href="[0-9]+)\.md/\1\.html/g' $(2)
endef

all: Html-Files
	echo "All-Things-Makefile-File"

Html-Files: $(Html-File-List)

## Web-Server-Directory-Index-Rule

Index.html: .github/Readme.md
	$(call Markdown_to_Html, $<, $@)

%.html: %.md
	$(call Markdown_to_Html, $<, $@)

clean:
	rm -f $(Html-File-List) Index.html

.PHONY: all clean

So let’s create the Html-Files using the Make-Command, …

✔ ~/All-Dings/111 [Rendering|…1] 12:11
$ make -f 300000004.make

… add them to the Git-Index and then push them:

✔ ~/All-Dings/111 [Rendering|●16…1] 15:37
$ git commit -m "Render Files" && git push -f Origin Rendering
[Rendering b193f39] Render Files
 16 files changed, 684 insertions(+)
 create mode 100644 100200000.html
 create mode 100644 100200001.html
 create mode 100644 140000015.html
 create mode 100644 40000006.html
 create mode 100644 40000007.html
 create mode 100644 600046.html
 create mode 100644 600047.html
 create mode 100644 600048.html
 create mode 100644 650012.html
 create mode 100644 9000128.html
 create mode 100644 9000129.html
 create mode 100644 9000130.html
 create mode 100644 9000131.html
 create mode 100644 9000132.html
 create mode 100644 9000133.html
 create mode 100644 Index.html
Enumerating objects: 19, done.
Counting objects: 100% (19/19), done.
Delta compression using up to 10 threads
Compressing objects: 100% (18/18), done.
Writing objects: 100% (18/18), 5.67 KiB | 5.67 MiB/s, done.
Total 18 (delta 14), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (14/14), completed with 1 local object.
To github.com:All-Dings/111.git
   4b7b9c0..b193f39  Rendering -> Rendering

As expected the Mix-Case Index.html is ignored by the Webserver, so we have to use Lower-Case index.html:

✔ ~/All-Dings/111 [Rendering|…1] 15:47
$ git mv Index.html index.html && git commit -m "Use Lower-Case" && git push -f Origin Rendering
[Rendering 50049d5] Use Lower-Case
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename Index.html => index.html (100%)
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 10 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 247 bytes | 247.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To github.com:All-Dings/111.git
   b193f39..50049d5  Rendering -> Rendering

Now the Phishig-Warning is removed useing the Git-Pages-Url [0] for the 111-Repository we see with any Web-Browser the Readme-File.

Footnotes

[0] https://all-dings.github.io/111

Day-15: Rendering 1

Topics: Programming

Blog-Chain-Time 2023.04.08-14:59 in Tübingen, I have the Intuition or Feeling that the Idea with Git-Submodules and Git-Hub-Pages was not a good one.

The new Idea is to use the Pandoc-Tool to render each Day the the Content of the All-Dings-Repositories.

According to a nice How-To [1] I first create for an All-Dings-Html-Template.

Then I create the All-Dings-Html-Makefile that should control the Rendering-Process.

The Make-Command is a widely used Tool for Automation in the Informatics.

All-Things-Makefile-File

Now I write the first Makefile-Rules to create Html-Files out of all the Markdown-Files:

✔ ~/All-Dings/0 [Master ↓·10|✚ 2…387] 16:13
$ cat 300000004.make 
# # All-Things-Makefile-File
#

Md-File-List = $(wildcard *.md)
Html-File-List = $(subst .md,.html,$(Md-File-List))

all: Html-Files
	echo "All-Things-Makefile-File"

Html-Files: $(Html-File-List)

%.html: %.md
	pandoc --standalone --template 300000002.html $< -o $@

.PHONY: all

Then I trigger the first Build-Process:

✔ ~/All-Dings/0 [Master ↓·12|✚ 1…2] 16:17
$ make -f 300000004.make
pandoc --standalone --template 300000002.html 0.md -o 0.html
[WARNING] This document format requires a nonempty <title> element.
  Defaulting to '0' as the title.
  To specify a title, use 'title' in metadata or --metadata title="...".
pandoc --standalone --template 300000002.html 1.md -o 1.html
[WARNING] This document format requires a nonempty <title> element.
  Defaulting to '1' as the title.
  To specify a title, use 'title' in metadata or --metadata title="...".
  
[...]

[WARNING] This document format requires a nonempty <title> element.
  Defaulting to 'README' as the title.
  To specify a title, use 'title' in metadata or --metadata title="...".
echo "All-Things-Makefile-File"
All-Things-Makefile-File

This creates a lot of new Html-Files:

✔ ~/All-Dings/0 [Master ↓·15|✚ 1…388] 16:19
$ ls
0.html		120000001.html	1604.jpg	2000002.html	300002.md	48.md		600015.md	60008.md	70000001.html	8.jpg		9000018.html	9000052.md	9000084.md
0.md		120000001.md	17.bash		2000002.md	300003.html	5.html		600016.html	60009.html	70000001.md	8.md		9000018.md	9000053.html	9000085.html
1.html		12000001.html	17.html		20001.html	300003.md	5.md		600016.md	60009.md	70000002.html	800000.html	9000019.html	9000053.md	9000085.md
1.md		12000001.md	17.markdown	20001.md	30010001.html	50000.html	600017.html	60010.html	70000002.md	800000.md	9000019.md	9000054.html	9000086.html
100.html	13.html		17.md		20003.jpg	30010001.md	50000.md	600017.md	60010.md	70000003.html	80000000.html	9000020.html	9000054.md	9000086.md
100.md		13.md		170000000.html	200100000.html	30010002.html	50000000.html	600018.html	60011.html	70000003.md	80000000.md	9000020.md	9000055.html	9000087.html
10000.html	13.vimrc	170000000.md	200100000.md	30010002.md	50000000.md	600018.md	60011.md	70000004.html	80000001.html	9000022.html	9000055.md	9000087.md
10000.jpg	13000000.html	170100000.html	200100001.html	30010003.html	50000001.html	60002.html	60012.html	70000004.md	80000001.md	9000022.md	9000056.html	9000088.html
10000.md	13000000.md	170100000.md	200100001.md	30010003.md	50000001.md	60002.md	60012.md	7000001.html	80000002.html	9000023.html	9000056.md	9000088.md
10000000.html	130000000.html	170100001.html	200300000.html	30010004.html	50000055.jpg	600020.html	60013.html	7000001.md	80000002.md	9000023.md	9000057.html	9000089.html
10000000.md	130000000.md	170100001.md	200300000.md	30010004.md	50000056.jpg	600020.md	60013.md	7000002.html	80000003.html	9000025.html	9000057.md	9000089.md
100000000.html	130000001.html	18.dockerfile	200300001.html	30010005.html	50000057.jpg	600021.html	60014.html	7000002.md	80000003.md	9000025.md	9000058.html	9000090.html
100000000.md	130000001.md	18.html		200300001.md	30010005.md	50001.html	600021.md	60014.md	7000003.html	800001.html	9000026.html	9000058.md	9000090.md
100000001.html	130000002.html	18.md		200300002.html	30010006.html	50001.md	600022.html	60015.html	7000003.md	800001.md	9000026.md	9000059.html	9000091.html
100000001.md	130000002.md	180000000.html	200300002.md	30010006.md	50003.html	600022.md	60015.md	700001.html	80001.html	9000027.html	9000059.md	9000091.md
10000001.html	130000003.html	180000000.md	201000000.html	30010007.html	50003.md	600023.html	60016.html	700001.md	80001.md	9000027.md	9000060.html	9000092.html
10000001.md	130000003.md	180000002.html	201000000.md	30010007.md	50004.html	600023.md	60016.md	700002.html	8000999.html	9000028.html	9000060.md	9000092.md
10000002.html	13000001.html	180000002.md	201000001.html	31.html		50004.md	600024.html	60017.html	700002.md	8000999.md	9000028.md	9000061.html	9000093.html
10000002.md	13000001.md	180001000.html	201000001.md	31.md		50007.html	600024.md	60017.md	700003.html	8009999.html	9000029.html	9000061.md	9000093.md
10000003.html	13000002.html	180001000.md	2015.html	32.html		50007.md	600025.html	60018.html	700003.md	8009999.md	9000029.md	9000062.html	9000094.html
10000003.md	13000002.md	19.html		2015.md		32.md		50009.html	600025.md	60018.md	700006.html	8010000.html	9000030.html	9000062.md	9000094.md
10000005.html	13000003.html	19.md		202000000.html	3232.jpg	50009.md	600026.html	60019.html	700006.md	8010000.md	9000030.md	9000063.html	9000095.html
10000005.md	13000003.md	190000000.html	202000000.md	33.bash		55.jpg		600026.md	60019.md	700007.html	8010002.html	9000031.html	9000063.md	9000095.md
10000006.html	13000004.html	190000000.md	202000001.html	33.html		57.html		600027.html	60020.html	700007.md	8010002.md	9000031.md	9000064.html	9000096.html
10000006.md	13000004.md	190000001.html	202000001.md	33.md		57.md		600027.md	60020.md	700009.html	8010003.html	9000032.html	9000064.md	9000096.md
10000007.html	13000005.html	190000001.md	202000002.html	3333.html	577.jpg		600028.html	60021.html	700009.md	8010003.md	9000032.md	9000065.html	9000097.html
10000007.md	13000005.md	190000002.html	202000002.md	3333.md		58.html		600028.md	60021.md	700010.html	8020000.html	9000034.html	9000065.md	9000097.md
10000008.html	13010000.html	190000002.md	203000000.html	34.html		58.md		600029.html	60022.html	700010.md	8020000.md	9000034.md	9000066.html	9000098.html
10000008.md	13010000.md	190000003.html	203000000.md	34.md		6.html		600029.md	60022.md	700011.html	888.html	9000035.html	9000066.md	9000098.md
1000001.html	13010001.html	190000003.md	203000001.html	37.bash		6.markdown	60003.html	60032.html	700011.md	888.md		9000035.md	9000067.html	9000099.html
1000001.md	13010001.md	190000005.html	203000001.md	4.html		6.md		60003.md	60032.md	700012.html	9.html		9000036.html	9000067.md	9000099.md
1000002.html	14.bashrc	190000005.md	21.html		4.md		60000.html	600031.html	60033.html	700012.md	9.md		9000036.md	9000068.html	90001000.html
1000002.md	14.html		1977.html	21.md		40.html		60000.md	600031.md	60033.md	700013.html	9000000.html	9000037.html	9000068.md	90001000.md
100001.html	14.md		1977.md		2100000.html	40.md		60000000.html	600032.html	60034.html	700013.md	9000000.md	9000037.md	9000069.html	90001001.html
100001.md	140000000.html	2.html		2100000.md	40000.html	60000000.md	600032.md	60034.md	700014.html	90000000.html	9000038.bash	9000069.md	90001001.md
100002.html	140000000.md	2.md		23.html		40000.md	60000001.html	600033.html	60035.html	700014.md	90000000.md	9000039.html	9000071.html	9010001.html
100002.md	140000001.html	20.html		23.md		40000000.html	60000001.md	600033.md	60035.md	700015.html	9000001.html	9000039.md	9000071.md	9010001.md
10001.jpg	140000001.md	20.md		24.bash		40000000.md	600002.html	600034.html	60036.html	700015.md	9000001.md	9000040.html	9000072.html	9010002.html
10010000.html	140000002.html	20000.html	2525.html	40000001.html	600002.md	600034.md	60036.md	700016.html	9000003.html	9000040.md	9000072.md	9010002.md
10010000.md	140000002.md	20000.md	2525.md		40000001.md	600003.html	600035.html	60037.html	700016.md	9000003.md	9000041.html	9000073.html	904.html
100100000.html	140000003.html	20000000.html	27.html		40000002.html	600003.md	600035.md	60037.md	700017.html	9000004.html	9000041.md	9000073.md	904.md
100100000.md	140000003.md	20000000.md	27.md		40000002.md	600004.html	600036.html	60038.html	700017.md	9000004.md	9000042.html	9000074.html	9100000.html
100100001.html	140000010.html	200000000.html	3.html		40000003.html	600004.md	600036.md	60038.md	700018.html	9000005.html	9000042.md	9000074.md	9100000.md
100100001.md	140000010.md	200000000.md	3.md		40000003.md	600005.html	600037.html	60039.html	700018.md	9000005.md	9000043.html	9000075.html	9100001.html
100100002.html	140000011.html	200000001.html	30.html		40000004.html	600005.md	600037.md	60039.md	700019.html	9000006.html	9000043.md	9000075.md	9100001.md
100100002.md	140000011.md	200000001.md	30.md		40000004.md	600006.html	600038.html	60040.html	700019.md	9000006.md	9000044.html	9000076.html	9100002.html
101.html	140000012.html	200000002.html	300000000.html	40000013.html	600006.md	600038.md	60040.md	700020.html	9000007.html	9000044.md	9000076.md	9100002.md
101.md		140000012.md	200000002.md	300000000.md	40000013.md	600007.html	600039.html	60041.html	700020.md	9000007.md	9000045.html	9000077.html	9200000.html
11.html		15.gitconfig	20000001.html	300000001.html	40003101.html	600007.md	600039.md	60041.md	700021.html	9000010.html	9000045.md	9000077.md	9200000.md
11.md		15.html		20000001.md	300000001.md	40003101.md	600008.html	60004.html	650000.html	700021.md	9000010.md	9000046.html	9000078.html	9300000.html
11000000.html	15.md		20000002.html	300000002.html	40100000.html	600008.md	60004.md	650000.md	700022.html	9000012.html	9000046.md	9000078.md	9300000.md
11000000.md	150000000.html	20000002.md	300000002.md	40100000.md	60001.html	600040.html	666.html	700022.md	9000012.md	9000047.html	9000079.html	9300001.html
1100001.html	150000000.md	20000003.html	300000003.html	40100001.html	60001.md	600040.md	666.md		70005.html	9000013.html	9000047.md	9000079.md	9300001.md
1100001.md	150000001.html	20000003.md	300000003.md	40100001.md	600010.html	600041.html	6666.html	70005.md	9000013.md	9000048.html	9000080.html	99.html
11091971.html	150000001.md	20000004.html	300000004.make	404.html	600010.md	600041.md	6666.md		737.jpg		9000014.html	9000048.md	9000080.md	99.md
11091971.md	16.bash		20000004.md	30000001.html	404.md		600011.html	60005.html	677.html	75.html		9000014.md	9000049.html	9000081.html	README.html
12.html		16.html		20000005.html	30000001.md	41.html		600011.md	60005.md	677.md		75.md		9000015.html	9000049.md	9000081.md	README.md
12.md		16.md		20000005.md	30000002.html	41.md		600012.html	60006.html	69.mp3		77.html		9000015.md	9000050.html	9000082.html
12000000.html	160000000.html	20000006.html	30000002.md	42.jpg		600012.md	60006.md	7.html		77.md		9000016.html	9000050.md	9000082.md
12000000.md	160000000.md	20000006.md	300001.html	47.html		600014.html	60007.html	7.md		773.html	9000016.md	9000051.html	9000083.html
120000000.html	160000001.html	2000001.html	300001.md	47.md		600014.md	60007.md	70000000.html	773.md		9000017.html	9000051.md	9000083.md
120000000.md	160000001.md	2000001.md	300002.html	48.html		600015.html	60008.html	70000000.md	8.html		9000017.md	9000052.html	9000084.html

In order to be able to distinguish e.g. All-Dings-Html-Makefile from the generated Output-Files, I decide to use the alternative File-Suffix .htm instead of .html for the Input-File.

The Output-Files look almost good, …

✔ ~/All-Dings/0 [Master ↓·5|…395] 16:44
$ cat 0.html 
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="date" content=''>
    <title></title>
  </head>
  <body>
<h1 id="michael-holzheu">Michael Holzheu</h1>
<p><img src="8.jpg" alt="Michael Holzheu" style="width:256px; height: 256px;"/></p>
<p>I am called <a href="4.md">Holyheu</a> in the Clash of Clans World,
but my real Name is Michael Holzheu.</p>
<p>My <a href="700018.md">Movies</a> can be seen on the You-Tube-Channel
<a href="190000002.md">Holyheu</a>.</p>
<h2 id="links">Links</h2>
<ul>
<li>Homepage: <a href="https://holzheu.de">https://holzheu.de</a></li>
</ul>
<h2 id="events">Events</h2>
<ul>
<li><code>2022.04.04-OO:OO</code> I release the Clash of Cland Blog “<a
href="2.md">Erster Geburtstag</a>”.</li>
<li><code>2021.04.04-OO:OO</code> I create the Clash of Clans avatar “<a
href="4.md">Holyheu</a>”.</li>
<li><code>1971.XX.XX-XX:XX</code> I am born.</li>
</ul>
  </body>
</html>

… but the References are not working because they still point to the Markdown-Files:

I am called <a href="4.md">Holyheu</a>

Because I do not find a Pandoc-Tool Option for automatic Conversion, I want to write a Regular-Expression for the Unix-Sed-Tool to replace the File-Suffix .md with .html.

But first make a more simple Experiment, where I use a Unix-Pipe to redirect the Output of the Cat-Command to the Input of the Sed-Tool and then replace the String I am with the new String We are:

✘-1 ~/All-Dings/0 [Master|…395] 16:55
$ cat 0.html | sed -E 's/I am/We are/g'
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="date" content=''>
    <title></title>
  </head>
  <body>
<h1 id="michael-holzheu">Michael Holzheu</h1>
<p><img src="8.jpg" alt="Michael Holzheu" style="width:256px; height: 256px;"/></p>
<p>We are called <a href="4.md">Holyheu</a> in the Clash of Clans World,
but my real Name is Michael Holzheu.</p>
<p>My <a href="700018.md">Movies</a> can be seen on the You-Tube-Channel
<a href="190000002.md">Holyheu</a>.</p>
<h2 id="links">Links</h2>
<ul>
<li>Homepage: <a href="https://holzheu.de">https://holzheu.de</a></li>
</ul>
<h2 id="events">Events</h2>
<ul>
<li><code>2022.04.04-OO:OO</code> I release the Clash of Cland Blog “<a
href="2.md">Erster Geburtstag</a>”.</li>
<li><code>2021.04.04-OO:OO</code> I create the Clash of Clans avatar “<a
href="4.md">Holyheu</a>”.</li>
<li><code>1971.XX.XX-XX:XX</code> We are born.</li>
</ul>
  </body>
</html>

Replacing the File-Suffix is only a little bit more complicated:

✔ ~/All-Dings/0 [Master|…395] 16:58
$ cat 0.html | sed -E 's/(href="[0-9]+)\.md/\1\.html/g'
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="date" content=''>
    <title></title>
  </head>
  <body>
<h1 id="michael-holzheu">Michael Holzheu</h1>
<p><img src="8.jpg" alt="Michael Holzheu" style="width:256px; height: 256px;"/></p>
<p>I am called <a href="4.html">Holyheu</a> in the Clash of Clans World,
but my real Name is Michael Holzheu.</p>
<p>My <a href="700018.html">Movies</a> can be seen on the You-Tube-Channel
<a href="190000002.html">Holyheu</a>.</p>
<h2 id="links">Links</h2>
<ul>
<li>Homepage: <a href="https://holzheu.de">https://holzheu.de</a></li>
</ul>
<h2 id="events">Events</h2>
<ul>
<li><code>2022.04.04-OO:OO</code> I release the Clash of Cland Blog “<a
href="2.html">Erster Geburtstag</a>”.</li>
<li><code>2021.04.04-OO:OO</code> I create the Clash of Clans avatar “<a
href="4.html">Holyheu</a>”.</li>
<li><code>1971.XX.XX-XX:XX</code> I am born.</li>
</ul>
  </body>
</html>

After some Experiments I come up with the following Solution:

17:17 $ cat 300000004.make
# # All-Things-Makefile-File
#

Md-File-List = $(wildcard *.md)
Html-File-List = $(subst .md,.html,$(Md-File-List))

all: Html-Files
	echo "All-Things-Makefile-File"

Html-Files: $(Html-File-List)

%.html: %.md
	pandoc --standalone --template 300000002.htm $< -o $@
	sed -i '' -E 's/(href="[0-9]+)\.md/\1\.html/g' $@

clean:
	rm -f $(Html-File-List)

.PHONY: all clean

Blog-Chain-Time 2023.04.08-18:11 in Tübingen, My Plan is to create a new Rendering-Repository that contains the latest Content and the Idea is to use Git-Pull-Force to update it.

But first I want to replace the REAMDE-File with a new All-Dings-Landing-Page, which can be done with by creating a Unix-Soft-Link in the Git-Hub-Config-Directory:

So I first we create the .github Directory9000019.md with the Unix-Mkdir-Command, …

19:21 $ mkdir .github
✔ ~/All-Dings/0 [Master|…2]

… then use the Unix-Mv-Command with the -f Short-Command-Option to force the Move of the old Readme-File, …

✔ ~/All-Dings/0 [Master|…2] 
19:21 $ mv -f README.md 300000006.md

… afterwards we remove the old Readme-File with the Git-Rm-Command, …

✔ ~/All-Dings/0 [Master|✚ 2…2] 
19:22 $ git rm README.md
rm 'README.md'

… then change into the .github directory with the Unix-Cd-Command, …

✔ ~/All-Dings/0 [Master|●1✚ 1…2] 
19:22 $ cd .github/

… and create a Unix-Soft-Link using the Unix-Ln-Command with the Short-Command-Option -s, …

✘-1 ~/All-Dings/0/.github [Master|●1✚ 1…2] 
19:23 $ ln -s ../300000006.md README.md

… use the Git-Add-Command to add the Changes to the Git-Index, …

✔ ~/All-Dings/0/.github [Master|●1✚ 1…3] 
19:24 $ git add ../300000006.md README.md

… then fire up the Git-Commit-Command with the Long-Command-Option --message to create a new Git-Commit with a meaningful Git-Commit-Message

✘-HUP ~/All-Dings/0/.github [Master|●3…2] 
19:24 $ git commit --message "Move README.md -> .gitconfig/README.md"
[Master 6df58b0] Move README.md -> .gitconfig/README.md
 3 files changed, 456 insertions(+), 458 deletions(-)
 create mode 120000 .github/README.md
 delete mode 100644 README.md

… and finally publish the Changes with the Git-Push-Command:

✔ ~/All-Dings/0/.github [Master ↑·1|…2] 
19:27 $ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 10 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 378 bytes | 378.00 KiB/s, done.
Total 4 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To github.com:All-Dings/0.git
   31da384..6df58b0  Master -> Master

Create All-Dings-Rendering-Repository

Now we create our All-Dings-Rendering-Repository which get a meaningful Number regarding Unix-Output:

✔ ~/All-Dings 
19:40 $ git clone git@github.com:All-Dings/111.git
Cloning into '111'...
warning: You appear to have cloned an empty repository.

First let’s rename the Git-Remote according to our current Naming-Conventions:

✘-HUP ~/All-Dings/111 [main L|✔] 19:43
$ git remote rename origin Origin
✔ ~/All-Dings/111 [main L|✔]

Then initialize the new Repository with the Git-Init-Command

✘-128 ~/All-Dings/111 [main L|✔] 19:51
$ git init
Reinitialized existing Git repository in /Users/michael-holzheu/All-Dings/111/.git/

… and create a new Git-Branch Rendering:

✔ ~/All-Dings/111 [main L|✔] 19:58
$ git branch -M Rendering

Now we add a new Git-Remote for our 0-Repository

✔ ~/All-Dings/111 [Rendering L|✔] 19:59
$ git remote add All-Dings.0 git@github.com:All-Dings/0.git

… and check our Git-Remotes with the Git-Remote-Command using the --verbose Long-Command-Option:

20:02 $ git remote --verbose
All-Dings.0	git@github.com:All-Dings/0.git (fetch)
All-Dings.0	git@github.com:All-Dings/0.git (push)
Origin	git@github.com:All-Dings/111.git (fetch)
Origin	git@github.com:All-Dings/111.git (push)

First we have to download the Contenst of the All-Dings.0 Git-Remote into our local Repository using the Git-Fetch-Command:

✘-128 ~/All-Dings/111 [Rendering L|✔] 20:07
$ git fetch All-Dings.0
remote: Enumerating objects: 3443, done.
remote: Counting objects: 100% (378/378), done.
remote: Compressing objects: 100% (187/187), done.
remote: Total 3443 (delta 198), reused 304 (delta 159), pack-reused 3065
Receiving objects: 100% (3443/3443), 6.74 MiB | 1.13 MiB/s, done.
Resolving deltas: 100% (1808/1808), done.
From github.com:All-Dings/0
 * [new branch]      Master     -> All-Dings.0/Master
 * [new tag]         Day-0      -> Day-0
 * [new tag]         Day-1      -> Day-1
 * [new tag]         Day-10     -> Day-10
 * [new tag]         Day-11     -> Day-11
 * [new tag]         Day-14     -> Day-14
 * [new tag]         Day-2      -> Day-2
 * [new tag]         Day-3      -> Day-3
 * [new tag]         Day-4      -> Day-4
 * [new tag]         Day-5      -> Day-5
 * [new tag]         Day-6      -> Day-6
 * [new tag]         Day-7      -> Day-7
 * [new tag]         Day-8      -> Day-8
 * [new tag]         Day-9      -> Day-9

Finally we download all the Content from the All-Dings.0/Master using the Git-Pull-Command:

20:12 $ git pull All-Dings.0 Master
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (6/6), done.
Unpacking objects: 100% (6/6), 1.01 KiB | 259.00 KiB/s, done.
remote: Total 6 (delta 3), reused 0 (delta 0), pack-reused 0
From github.com:All-Dings/0
 * branch            Master     -> FETCH_HEAD
   ed4e668..1f69fec  Master     -> All-Dings.0/Master
Downloading 8.jpg (604 KB)
Error downloading object: 8.jpg (3e2ed17): Smudge error: Error downloading 8.jpg (3e2ed1738c2bc76d70e344d93acddfe45ed6edbf1b462ac92b657f7dea7949a3): batch request: missing protocol: ""

Errors logged to '/Users/michael-holzheu/All-Dings/111/.git/lfs/logs/20230408T201340.796504.log'.
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: 8.jpg: smudge filter lfs failed

Looks like we have a Problem with my Photo that I originally have commited using Git-Lvs. So as a Workaround disable LFS for the Time beeing …

✔ ~/All-Dings/111 [Rendering|✔] 20:54
$ git lfs install --skip-smudge
Updated Git hooks.
Git LFS initialized.

… and then try it again:

✔ ~/All-Dings/111 [Rendering L|✔] 20:54
$ git pull All-Dings.0 Master
From github.com:All-Dings/0
 * branch            Master     -> FETCH_HEAD

Looks like we have almost everything:

✔ ~/All-Dings/0 [Master ↓·11|…2] 20:56
$ ls
0.md		13.md		17.md		200100001.md	30010003.md	50000055.jpg	600020.md	60012.md	7000001.md	800001.md	9000028.md	9000063.md	9000098.md
1.md		13.vimrc	170000000.md	200300000.md	30010004.md	50000056.jpg	600021.md	60013.md	7000002.md	80001.md	9000029.md	9000064.md	9000099.md
100.md		13000000.md	170100000.md	200300001.md	30010005.md	50000057.jpg	600022.md	60014.md	7000003.md	8000999.md	9000030.md	9000065.md	9000100.md
10000.jpg	130000000.md	170100001.md	200300002.md	30010006.md	50001.md	600023.md	60015.md	700001.md	8009999.md	9000031.md	9000066.md	90001000.md
10000.md	130000001.md	18.dockerfile	201000000.md	30010007.md	50003.md	600024.md	60016.md	700002.md	8010000.md	9000032.md	9000067.md	90001001.md
10000000.md	130000002.md	18.md		201000001.md	31.md		50004.md	600025.md	60017.md	700003.md	8010002.md	9000034.md	9000068.md	9000101.md
100000000.md	130000003.md	180000000.md	2015.md		32.md		50007.md	600026.md	60018.md	700006.md	8010003.md	9000035.md	9000069.md	9000102.md
100000001.md	13000001.md	180000002.md	202000000.md	3232.jpg	50009.md	600027.md	60019.md	700007.md	8020000.md	9000036.md	9000071.md	9000103.md
10000001.md	13000002.md	180001000.md	202000001.md	33.bash		55.jpg		600028.md	60020.md	700009.md	888.md		9000037.md	9000072.md	9000104.md
10000002.md	13000003.md	19.md		202000002.md	33.md		57.md		600029.md	60021.md	700010.md	9.md		9000038.bash	9000073.md	9000105.md
10000003.md	13000004.md	190000000.md	203000000.md	3333.md		577.jpg		60003.md	60022.md	700011.md	9000000.md	9000039.md	9000074.md	9000106.md
10000005.md	13000005.md	190000001.md	203000001.md	34.md		58.md		600031.md	60032.md	700012.md	90000000.md	9000040.md	9000075.md	9000107.md
10000006.md	13010000.md	190000002.md	21.md		37.bash		6.markdown	600032.md	60033.md	700013.md	9000001.md	9000041.md	9000076.md	9000108.md
10000007.md	13010001.md	190000003.md	2100000.md	4.md		6.md		600033.md	60034.md	700014.md	9000003.md	9000042.md	9000077.md	9000109.md
10000008.md	14.bashrc	190000005.md	23.md		40.md		60000.md	600034.md	60035.md	700015.md	9000004.md	9000043.md	9000078.md	9000110.md
1000001.md	14.md		1977.md		24.bash		40000.md	60000000.md	600035.md	60036.md	700016.md	9000005.md	9000044.md	9000079.md	9000111.md
1000002.md	140000000.md	2.md		2525.md		40000000.md	60000001.md	600036.md	60037.md	700017.md	9000006.md	9000045.md	9000080.md	9000112.md
100001.md	140000001.md	20.md		27.md		40000001.md	600002.md	600037.md	60038.md	700018.md	9000007.md	9000046.md	9000081.md	9000113.md
100002.md	140000002.md	20000.md	3.md		40000002.md	600003.md	600038.md	60039.md	700019.md	9000010.md	9000047.md	9000082.md	9000114.md
10001.jpg	140000003.md	20000000.md	30.md		40000003.md	600004.md	600039.md	60040.md	700020.md	9000012.md	9000048.md	9000083.md	9000115.md
10010000.md	140000010.md	200000000.md	300000000.md	40000004.md	600005.md	60004.md	60041.md	700021.md	9000013.md	9000049.md	9000084.md	9000116.md
100100000.md	140000011.md	200000001.md	300000001.md	40000013.md	600006.md	600040.md	60042.md	700022.md	9000014.md	9000050.md	9000085.md	9000117.md
100100001.md	140000012.md	200000002.md	300000002.htm	40003101.md	600007.md	600041.md	60043.md	70005.md	9000015.md	9000051.md	9000086.md	9010001.md
100100002.md	15.gitconfig	20000001.md	300000002.md	40100000.md	600008.md	600042.md	650000.md	737.jpg		9000016.md	9000052.md	9000087.md	9010002.md
101.md		15.md		20000002.md	300000003.md	40100001.md	60001.md	600043.md	666.md		75.md		9000017.md	9000053.md	9000088.md	904.md
11.md		150000000.md	20000003.md	300000004.make	404.md		600010.md	600044.md	6666.md		77.md		9000018.md	9000054.md	9000089.md	9100000.md
11000000.md	150000001.md	20000004.md	300000006.md	41.md		600011.md	600045.md	677.md		773.md		9000019.md	9000055.md	9000090.md	9100001.md
1100001.md	16.bash		20000005.md	30000001.md	42.jpg		600012.md	60005.md	69.mp3		8.jpg		9000020.md	9000056.md	9000091.md	9100002.md
11091971.md	16.md		20000006.md	30000002.md	47.md		600014.md	60006.md	7.md		8.md		9000022.md	9000057.md	9000092.md	9200000.md
12.md		160000000.md	2000001.md	300001.md	48.md		600015.md	60007.md	70000000.md	800000.md	9000023.md	9000058.md	9000093.md	9300000.md
12000000.md	160000001.md	2000002.md	300002.md	5.md		600016.md	60008.md	70000001.md	80000000.md	9000024.md	9000059.md	9000094.md	9300001.md
120000000.md	1604.jpg	20001.md	300003.md	50000.md	600017.md	60009.md	70000002.md	80000001.md	9000025.md	9000060.md	9000095.md	99.md
120000001.md	17.bash		20003.jpg	30010001.md	50000000.md	600018.md	60010.md	70000003.md	80000002.md	9000026.md	9000061.md	9000096.md	Makefile
12000001.md	17.markdown	200100000.md	30010002.md	50000001.md	60002.md	60011.md	70000004.md	80000003.md	9000027.md	9000062.md	9000097.md

Now let’s push all to the Git-Remote-Branch Rendering:

✘-1 ~/All-Dings/111 [Rendering|✔] 21:04
$ git push -f Origin Rendering
Git LFS upload failed:   0% (0/1), 0 B | 0 B/s                                                                                                                                                                        
  (missing) 8.jpg (3e2ed1738c2bc76d70e344d93acddfe45ed6edbf1b462ac92b657f7dea7949a3)
hint: Your push was rejected due to missing or corrupt local objects.
hint: You can disable this check with: `git config lfs.allowincompletepush true`
error: failed to push some refs to 'github.com:All-Dings/111.git'

Well LFS Problem again, but at least it tells me, how to “fix” this Issue:

✘-1 ~/All-Dings/111 [Rendering|✔] 
21:05 $ git config lfs.allowincompletepush true

So one more Time:

21:05 $ git push -f Origin Rendering
Git LFS upload missing objects:1), 0 B | 0 B/s                                                                                                                                                                        
  (missing) 8.jpg (3e2ed1738c2bc76d70e344d93acddfe45ed6edbf1b462ac92b657f7dea7949a3)
Uploading LFS objects:   0% (0/1), 0 B | 0 B/s, done.
Enumerating objects: 3449, done.
Counting objects: 100% (3449/3449), done.
Delta compression using up to 10 threads
Compressing objects: 100% (1320/1320), done.
Writing objects: 100% (3449/3449), 6.74 MiB | 3.79 MiB/s, done.
Total 3449 (delta 1811), reused 3449 (delta 1811), pack-reused 0
remote: Resolving deltas: 100% (1811/1811), done.
remote: error: GH008: Your push referenced at least 1 unknown Git LFS object:
remote:     3e2ed1738c2bc76d70e344d93acddfe45ed6edbf1b462ac92b657f7dea7949a3
remote: Try to push them with 'git lfs push --all'.
To github.com:All-Dings/111.git
 ! [remote rejected] Rendering -> Rendering (pre-receive hook declined)
error: failed to push some refs to 'github.com:All-Dings/111.git'

What about Removing our Problem-Child:

✔ ~/All-Dings/111 [Rendering|✚ 1] 
21:11 $ git rm 8.jpg && git commit -m "Remove Problem-Child"
rm '8.jpg'
[Rendering 9a2bb53] Remove Problem-Child
 1 file changed, 3 deletions(-)
 delete mode 100644 8.jpg

One more Time:

✔ ~/All-Dings/111 [Rendering|✔] 
21:11 $ git push -f Origin Rendering
Git LFS upload missing objects:1), 0 B | 0 B/s                                                                                                                                                                        
  (missing) 8.jpg (3e2ed1738c2bc76d70e344d93acddfe45ed6edbf1b462ac92b657f7dea7949a3)
Uploading LFS objects:   0% (0/1), 0 B | 0 B/s, done.
Enumerating objects: 3451, done.
Counting objects: 100% (3451/3451), done.
Delta compression using up to 10 threads
Compressing objects: 100% (1322/1322), done.
Writing objects: 100% (3451/3451), 6.74 MiB | 4.32 MiB/s, done.
Total 3451 (delta 1812), reused 3449 (delta 1811), pack-reused 0
remote: Resolving deltas: 100% (1812/1812), done.
remote: error: GH008: Your push referenced at least 1 unknown Git LFS object:
remote:     3e2ed1738c2bc76d70e344d93acddfe45ed6edbf1b462ac92b657f7dea7949a3
remote: Try to push them with 'git lfs push --all'.
To github.com:All-Dings/111.git
 ! [remote rejected] Rendering -> Rendering (pre-receive hook declined)
error: failed to push some refs to 'github.com:All-Dings/111.git'

Searching in the Internet I find a “Solution” [2] for the Problem. Although it will rewrite the Git-History, I’ll give it a Chance:

✘-2 ~/All-Dings/111 [Rendering|✔] 21:16
$ git lfs migrate export --everything --include 8.jpg
[3e2ed1738c2bc76d70e344d93acddfe45ed6edbf1b462ac92b657f7dea7949a3] Object does not exist on the server: [404] Object does not exist on the server

Blog-Chain-Time 2023.04.08-21:15 in Tübingen, I really want to finish this Today, so I try the next “Solution” [3]:

✘-2 ~/All-Dings/111 [Rendering|✔] 21:16
$ git lfs push Origin --all

At least this worked without an Error, so one more Time:

✔ ~/All-Dings/111 [Rendering|✔] 21:23
$ git push -f Origin Rendering
Git LFS upload missing objects:1), 0 B | 0 B/s                                                                                                                                                                        
  (missing) 8.jpg (3e2ed1738c2bc76d70e344d93acddfe45ed6edbf1b462ac92b657f7dea7949a3)
Uploading LFS objects:   0% (0/1), 0 B | 0 B/s, done.
Enumerating objects: 3449, done.
Counting objects: 100% (3449/3449), done.
Delta compression using up to 10 threads
Compressing objects: 100% (1320/1320), done.
Writing objects: 100% (3449/3449), 6.74 MiB | 4.13 MiB/s, done.
Total 3449 (delta 1811), reused 3449 (delta 1811), pack-reused 0
remote: Resolving deltas: 100% (1811/1811), done.
remote: error: GH008: Your push referenced at least 1 unknown Git LFS object:
remote:     3e2ed1738c2bc76d70e344d93acddfe45ed6edbf1b462ac92b657f7dea7949a3
remote: Try to push them with 'git lfs push --all'.
To github.com:All-Dings/111.git
 ! [remote rejected] Rendering -> Rendering (pre-receive hook declined)
error: failed to push some refs to 'github.com:All-Dings/111.git'

This somehow reminds me to a Holiday with Nicole in Romania [0], buts let’s stay professional and look in the 0-Repository for the bad LFS-Commit:

✔ ~/All-Dings/0 [Master ↓·3|…3] 21:46
$ git log 8.jpg 
commit df322ecea6b01efb9dc4e02e0aaf3d8771fe5875 (tag: Day-0)
Author: Michael Holzheu <michael@holzheu.de>
Date:   Sat Mar 25 03:51:04 2023 +0100

    Add initial content
    
    Signed-off-by: Michael Holzheu <michael@holzheu.de>

With the Git-Diff-Command I see this Commit does not only contain the 8.jpg File:

21:50 $ git diff --stat df322ecea6b01efb9dc4e02e0aaf3d8771fe5875 | head -5
 .github/README.md |    1 +
 .gitignore        |   16 +
 0.md              |   16 +-
 1.md              |    8 +-
 100.md            |    3 +

But interestingly it does not show our Problem-Child:

✔ ~/All-Dings/0 [Master ↓·3|…3] 21:51
$ git diff --stat df322ecea6b01efb9dc4e02e0aaf3d8771fe5875 | grep 8.jpg

LFS Fix-Idea

Now I get the Idea to build my Render-Branch by using the Git-Cherry-Pick-Command for the “good” Commits and manually apply the “bad” LFS-Commit.

So I first get the Git-History of the 0-Repository using the Git-Log-Command:

✔ ~/All-Dings/0 [Master ↓·6|…4] 
22:02 $ git log --pretty=format:"%H" > history.txt

Using the Unix-Head-Command on the File, we can see the Git-Hashes for every Commit:

22:03 $ head -n 3 history.txt 
bd97114cefeb0752fd3a08caa34dc301bf9fe1c2
cdf60668c83df30a64fcd915b0378754f8d61b49
1f69fecb240f5e0215cc09384da905f9b8d51504

The first Hash bd97114cefeb0752fd3a08caa34dc301bf9fe1c2 belongs to our last Commit:

✔ ~/All-Dings/0 [Master ↓·8|…4] 22:06
$ git show bd97114cefeb0752fd3a08caa34dc301bf9fe1c2
commit bd97114cefeb0752fd3a08caa34dc301bf9fe1c2 (HEAD -> Master)
Author: Michael Holzheu <michael@holzheu.de>
Date:   Sat Apr 8 21:10:08 2023 +0200

    Add Problem-Child

diff --git a/300000006.md b/300000006.md
index a0ca699..4c7e84c 100644
--- a/300000006.md
+++ b/300000006.md
@@ -125,6 +125,7 @@ FYI: This Project is under heavy Construction!
 40100001.md    Urinary-Bladder    
 40100000.md    Organ
 
+40000005.md    Problem-Child
 40000004.md    Man
 40000003.md    Dog
 40000002.md    Gemini

Using the Unix-Tail-Command we see that the Bad-Commit was in fact my very first Commit:

 ✔ ~/All-Dings/0 [Master|…7] 22:30
 $ tail -n 3 history.txt 
ea9b913566434e6aeee9ec92025d4825e88e5c1c
1d33021d4682851f8cad7d665da4d958ca24b0ca
df322ecea6b01efb9dc4e02e0aaf3d8771fe5875

So now let’s got back in History to this very first Commit by first using the Git-Checkout-Command:

✔ ~/All-Dings/0 [Master|…7] 22:30
$ git checkout df322ecea6b01efb9dc4e02e0aaf3d8771fe5875
Note: switching to 'df322ecea6b01efb9dc4e02e0aaf3d8771fe5875'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at df322ec Add initial content

Now we are back in History …

22:47 $ git log
commit df322ecea6b01efb9dc4e02e0aaf3d8771fe5875 (HEAD, tag: Day-0)
Author: Michael Holzheu <michael@holzheu.de>
Date:   Sat Mar 25 03:51:04 2023 +0100

    Add initial content
    
    Signed-off-by: Michael Holzheu <michael@holzheu.de>

… and see the Files from Day-0:

✔ ~/All-Dings/0 [Day-0|…1] 22:39
$ ls
0.md		11.md		2.md		4.md		6.markdown	7.md		8.md		README.md
1.md		12.md		3.md		5.md		6.md		8.jpg		9.md

Now we manually copy all the Files over to the 111-Repository using the Unix-Cp-Command

22:39 $ cp * .gitattributes ../111/
✔ ~/All-Dings/0 [Day-0|…1]

… and then try to recreate the Commit with the Git-Add- and Git-Commit-Command:

✔ ~/All-Dings/111 [Rendering L|✔] 
22:55 $ git add * .gitattributes && git commit -s -m "Add initial content"
[Rendering (root-commit) 97ca3dc] Add initial content
 16 files changed, 306 insertions(+)
 create mode 100644 .gitattributes
 create mode 100644 0.md
 create mode 100644 1.md
 create mode 100644 11.md
 create mode 100644 12.md
 create mode 100644 2.md
 create mode 100644 3.md
 create mode 100644 4.md
 create mode 100644 5.md
 create mode 100644 6.markdown
 create mode 100644 6.md
 create mode 100644 7.md
 create mode 100644 8.jpg
 create mode 100644 8.md
 create mode 100644 9.md
 create mode 100644 README.md

Although I did exactly the same Steps as 14 Days ago, the two Commits differ in Time and in the Git-Hash:

 ✔ ~/All-Dings 22:57
 $ diff -Nau Bad-Commit.orig Bad-Commit.new 
--- Bad-Commit.orig	2023-04-08 22:52:45.000000000 +0200
+++ Bad-Commit.new	2023-04-08 22:57:38.000000000 +0200
@@ -1,6 +1,6 @@
-commit df322ecea6b01efb9dc4e02e0aaf3d8771fe5875
+commit 97ca3dc141252836b7295ebf5c26c3f34dcffb8d
 Author: Michael Holzheu <michael@holzheu.de>
-Date:   Sat Mar 25 03:51:04 2023 +0100
+Date:   Sat Apr 8 22:57:05 2023 +0200
 
     Add initial content
     

Now I get the current History …

✔ ~/All-Dings/0 [Master|…2] 23:00
$ git log --pretty=format:"%H" > ../history.txt

… reverse the Order using the Unix-Nl-Command, the Unix-Sort-Command(9000126.md) and the Unix-Cut-Command(9000127.md):

✔ ~/All-Dings/111 [Rendering|…1] 23:08
$ nl ../history.txt | sort -nr | cut -f 2- > ../history-reverse.txt

… and apply it using the Git-Cherry-Pick-Command:

23:10 $ cat ../history-reverse.txt | (while read -r Line; do if [ "$Line" != "df322ecea6b01efb9dc4e02e0aaf3d8771fe5875" ]; then git cherry-pick $Line; fi; done)
[Rendering 9c62d08] New 13: Clash of Clans vimrc File
 Date: Sat Mar 25 15:08:04 2023 +0100
 2 files changed, 28 insertions(+)
 create mode 100644 13.md
 create mode 100644 13.vimrc
[Rendering 827fbdd] New 14: Clash of Clans bashrc File
 Date: Sat Mar 25 15:22:14 2023 +0100
 
 [...]
 
 [Rendering 1f47a7a] Add Unix-Cp-Command
 Date: Sat Apr 8 22:43:07 2023 +0200
 1 file changed, 1 insertion(+)

Looks like all Stuff is applied, now let’s push it to the Git-Remote-Branch:

✔ ~/All-Dings/111 [Rendering|…1] 23:15
$ git push Origin Rendering
Uploading LFS objects: 100% (1/1), 604 KB | 0 B/s, done.                                                                                                                                                              
Enumerating objects: 3499, done.
Counting objects: 100% (3499/3499), done.
Delta compression using up to 10 threads
Compressing objects: 100% (1347/1347), done.
Writing objects: 100% (3499/3499), 6.44 MiB | 4.29 MiB/s, done.
Total 3499 (delta 1835), reused 2350 (delta 1828), pack-reused 0
remote: Resolving deltas: 100% (1835/1835), done.
To github.com:All-Dings/111.git
 * [new branch]      Rendering -> Rendering

Then let’s build the Html-Pages …

23:19 $ make -f 300000004.make

… and push them to our Git-Remote-Branch:

✔ ~/All-Dings/111 [Rendering|…1] 23:22
$ git add *.html && git commit -m "Add Html-Page" && git push -f Origin Rendering

Then we use our Web-Browser and enable Git-Hub-Pages under Settings->Pages …

Source: Deploy from a branch
Branch: Rendering

… then click on Save and afterwards trigger the Built of the Git-Hub-Pages with an empty Commit:

23:28 $ git commit -m 'rebuild pages' --allow-empty && git push -f Origin Rendering
[Rendering 0221a9d] rebuild pages
Enumerating objects: 2, done.
Counting objects: 100% (2/2), done.
Delta compression using up to 10 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 279 bytes | 279.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), done.
To github.com:All-Dings/111.git
   a9e4512..0221a9d  Rendering -> Rendering

Then go Chrome to the Git-Hub-Pages Link [4] of the 111-Repository and get this funny Picture:

Footnotes

[0] https://youtu.be/f1Sq5KD8Rv8?t=108
[1] https://www.arthurkoziel.com/convert-md-to-html-pandoc
[2] https://github.com/git-lfs/git-lfs/issues/4190 [3] https://stackoverflow.com/questions/52612880/lfs-upload-missing-object-but-the-file-is-there/64675176
[4] https://all-dings.github.io/111

Day-14: Git-Hub-Pages

Topics: Programming

Blog-Chain-Time 2023.04.07-19:31 on my Way to Nicole, I continue working on the Sub-Module 404 Problem from Yesterday.

My new Idea is to use Git-Hub-Pages.

It is possible to automatically generate Html-Pages out of the Markdown Files.

After I have enabled this on the 0-Repository and the 888-Repository it looks promising:

Blog-Chain-Time 2023.04.07-20:31 in the U-Bahn to Nicole, Looks like it takes some Time until the Git-Hub-IO Pages are updated.

Blog-Chain-Time 2023.04.08-00:36 on my Way to Dettenhausen, I found out that external Links to Git-Hub-IO Pages should point to HTML- and not to Markdown-Pages.

Blog-Chain-Time 2023.04.08-00:42 on my Way to Dettenhausen, Try to add / to make the File-Path for Images absolute.

Day-13: Dangerous Sub-Modules

Topics: Programming

Blog-Chain-Time 2023.04.06-14:09 in Tübingen, I continue working on the Concept of Git-Sub-Modules.

First I change the Name of my Fork-Repository on Git-Hub from COC-Metzingen-with-Nicole to 888.

Blog-Chain-Time 2023.04.06-18:12 in Tübingen, After some Experiments I decided to rename the Clash-of-Clans Upstream-Repository into “0” and move it into a new Git-Hub-Organization called All-Dings.

Then I deleted the old 888-Repository, replaced it by a new one and changed the Language from German to English.

Since all these Operations have been a little bit dangerous, I now also disabled Git-Force-Push on Git-Hub for both Repositories to protect myself from doing silly Things.

Setup Git-Sub-Module

Now I setup a Git-Sub-Module in the 888-Repository for the moved 0-Repository:

18:10 $ git submodule add git@github.com:All-Dings/0.git
Cloning into '/Users/michael-holzheu/All-Dings/888/0'...
remote: Enumerating objects: 2538, done.
remote: Counting objects: 100% (934/934), done.
remote: Compressing objects: 100% (395/395), done.
remote: Total 2538 (delta 512), reused 847 (delta 459), pack-reused 1604
Receiving objects: 100% (2538/2538), 6.43 MiB | 6.66 MiB/s, done.
Resolving deltas: 100% (1304/1304), done

This creates a new Sub-Directory in the 888-Repository that we can see with the Unix-Ls-Command:

18:31 $ ls -l
total 8
drwxr-xr-x  351 michael-holzheu  staff  11232  6 Apr 18:31 0
-rw-r--r--    1 michael-holzheu  staff     27  6 Apr 18:08 README.md

With the Git-Status-Command we see that besides of the 0-Directory also a hidden File Named .gitmodules has been created:

18:35 $ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	new file:   .gitmodules
	new file:   0

The Unix-Cat-Command shows us the Content of this File:

✔ ~/All-Dings/888 [main|●2] 18:37
$ cat .gitmodules 
[submodule "0"]
	path = 0
	url = git@github.com:All-Dings/0.git

According to the very good How-To [0] for Git-Sub-Modules, I now check what Git tells us about our new Sub-Module with the Git-Diff-Command:

✔ ~/All-Dings/888 [main|●2] 18:52
$ git diff --cached  0
diff --git a/0 b/0
new file mode 160000
index 0000000..29783d2
--- /dev/null
+++ b/0
@@ -0,0 +1 @@
+Subproject commit 29783d2cf991a95276404811054dcd640d77a733

We see that the Git-Commit 29783d2cf991a95276404811054dcd640d77a733 has been taken for the Sub-Module and with the --submodule Git-Command-Option we get all important Information about our new Sub-Module in one Summary:

18:52 $ git diff --cached --submodule
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..138b8ea
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "0"]
+       path = 0
+       url = git@github.com:All-Dings/0.git
Submodule 0 0000000...29783d2 (new submodule

Commit Git-Sub-Module

Now it is time to commit the Sub-Module to our 888-Repository with the Git-Commit-Command using the --all and --message Options:

✔ ~/All-Dings/888 [main|●2] 19:13
$ git commit --all --message "Add 0-Repository"
[main cca43ac] Add 0-Repository
 2 files changed, 4 insertions(+)
 create mode 100644 .gitmodules
 create mode 160000 0

This created a new Commit that added the 0-Repository as a Git-Submodule:

19:14 $ git show
commit cca43acc71067016525f423184b2f89c5d1a178b (HEAD -> main)
Author: Michael Holzheu <michael@holzheu.de>
Date:   Thu Apr 6 19:14:26 2023 +0200

    Add 0-Repository

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..138b8ea
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "0"]
+       path = 0
+       url = git@github.com:All-Dings/0.git
diff --git a/0 b/0
new file mode 160000
index 0000000..29783d2
--- /dev/null
+++ b/0
@@ -0,0 +1 @@
+Subproject commit 29783d2cf991a95276404811054dcd640d77a733

Finally I push the Commit to the remote 888-Repository on Git-Hub:

✘-128 ~/All-Dings/888 [Master|✔] 19:22
$ git push origin Master
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 10 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 375 bytes | 375.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:All-Dings/888.git
   f5b7a07..cca43ac  Master -> Master

Check Result

On Git-Hub this looks then like the Following:

First Sub-Module

To test what we have just created, we delete first our local Copy of the 888-Repository

✔ ~/All-Dings 19:35
$ rm -rf 888/

… and then use the Git-Clone-Command to get a fresh Copy from Git-Hub:

✔ ~/All-Dings 19:35
$ git clone git@github.com:All-Dings/888.git
Cloning into '888'...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 9 (delta 0), reused 6 (delta 0), pack-reused 0
Receiving objects: 100% (9/9), done.

With the Du-Unix-Command we see that the Size of the 888-Repository with 128 Kilo-Byte is quite modest:

✔ ~/All-Dings/888 [Master|✔] 
19:39 $ du -sh .
124K	.

This is because the Content of the 0-Repository Sub-Module is not yet on our Disk-Drive:

✔ ~/All-Dings/888 [Master|✔] 
19:39 $ ls 0/
✔ ~/All-Dings/888 [Master|✔]

For getting the Content of 0-Repository we use the Git-Sub-Module-Init-Command, …

✔ ~/All-Dings/888 [Master|✔] 
19:41 $ git submodule init
Submodule '0' (git@github.com:All-Dings/0.git) registered for path '0'

… followed by the Git-Sub-Module-Update-Command:

✔ ~/All-Dings/888 [Master|✔] 
19:45 $ git submodule update
Cloning into '/Users/michael-holzheu/All-Dings/888/0'...
Submodule path '0': checked out '29783d2cf991a95276404811054dcd640d77a733

Now our Project consumes much more Space …

✔ ~/All-Dings/888 [Master|✔] 
19:48 $ du -sh .
 13M	.

… and we can use the Unix-Find-Command to see our beloved Things form the 0-Repository again:

✔ ~/All-Dings/888 [Master|✔] 
19:54 $ find 0 | sort -V | head -7
0
0/.git
0/.gitattributes
0/.gitignore
0/0.md
0/1.md
0/2.md

Add Reference

Now it is time to add the first Reference Michael from our 888-Repository to the 0-Repository Sub-Module …

✔ ~/All-Dings/888 [Master|✔] 20:11
$ printf "\nOn Monday, April-2023-03 Nicole and [Michael](0/0.md) visited the town of Metzingen to shop for some nice new Clothes." >> README.md

… and then commit and push the Result:

✔ ~/All-Dings/888 [Master ↓·1|✚ 1] 
20:14 $ git commit -m "Add first Reference to 0-Repository" && git push
[Master 348b73d] Add first Reference to 0-Repository
 1 file changed, 2 insertions(+)

Counting objects: 100% (5/5), done.
Delta compression using up to 10 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 391 bytes | 391.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To github.com:All-Dings/888.git

Test

Finally I click on the Git-Hub Web-Site on the new Reference 0/0.md with the Name Michael, and real Computer-Networking-Experts of course already know what will happen:

404 Http-Error

But according to the German Saying: Immer langsam mit den jungen Pferden!

Fix Tracking-Repository

I have asked a Friend to regularly pull from my Clash-of-Clans Repository and Today he sends me an E-Mail that after my Move to All-Dings he gets the Error Repository not found.

Then he sends me the compressed Archive-File of his latest local Snaphot:

✔ ~/All-Dings 02:01
$ ls -lh Clash-of-Clans.tgz
-rw-r--r--@ 1 michael-holzheu  staff   9,9M  7 Apr 01:26 Clash-of-Clans.tgz

I use the Unix-Tar-Command to uncompress and unpack the Archive:

✘-1 ~/All-Dings 02:07
$ tar xf Clash-of-Clans.tgz && cd Clash-of-Clans

Then I look for the last Commit that obviously is over two Days old:

commit 74bc0c400e5a9848d7f01d11a3af7ae279d898dc
Author: Michael Holzheu <michael@holzheu.de>
Date:   Tue Apr 4 18:24:50 2023 +0200

    Add Strategy

It is clear that my Friend’s last Git-Pull-Command failed, because his Git-Remote points to the old URL:

✘-HUP ~/All-Dings/Clash-of-Clans [Master|✔] 02:08
$ git remote -v
origin	https://github.com/michael-holzheu/Clash-of-Clans.git (fetch)
origin	https://github.com/michael-holzheu/Clash-of-Clans.git (push)

To fix that Problem we can use the Git-Remote-Command to set the new URL:

✘-HUP ~/All-Dings/Clash-of-Clans [Master|✔] 02:16
$ git remote set-url origin git@github.com:All-Dings/0.git
✔ ~/All-Dings/Clash-of-Clans [Master|✔]

Now the Git-Pull-Command works again …

✔ ~/All-Dings/Clash-of-Clans [Master|✔] 02:22
$ git pull
Updating 74bc0c4..4b1f28d
Fast-forward
 0.md            |   2 +
 1000001.md      |   2 +
 
 [...]
 
  9200000.md      |   3 +
 README.md       | 102 +++++++++++++++++++++-
 96 files changed, 1396 insertions(+), 35 deletions(-)
 
 [...]
 
 create mode 100644 9100002.md
 create mode 100644 9200000.md

… and we see our latest Commit from some Minutes ago:

✔ ~/All-Dings/Clash-of-Clans [Master|✔] 02:24
$ git show
commit 4b1f28d66103d66b0ac884678322a0ad298aaaca (HEAD -> Master, origin/Master, origin/HEAD)
Author: Michael Holzheu <michael@holzheu.de>
Date:   Fri Apr 7 02:18:33 2023 +0200

    Add Git-Remote-Command

diff --git a/README.md b/README.md
index 585279a..f7dc14b 100644
--- a/README.md
+++ b/README.md
@@ -159,6 +159,7 @@ FYI: This Project is under heavy Construction!
 9010001.md     Perl
 9010000.md     Computer-Language
 
+9000095.md     Git-Remote-Command
 9000094.md     Git-Pull-Command
 9000093.md     Archive-File
 9000092.md     Unix-Tar-Command

Footnotes

[0] Git Tools - Submodule: https://git-scm.com/book/de/v2/Git-Tools-Submodule

Day-12: Two Universesy

Topics: Programming

Blog-Chain-Time 2023.04.05-15:42 in Tübingen, Today I would like to work again on a Concept for storing Media-Files efficiently in the Project:

My current Idea is to use Git-Sub-Modules for this Purpose.

Create Git-Fork

For makeing some Tests I first create a Git-Fork of the original Ropository. First I create a Copy of the Repository:

~/Clash-of-Clans$ cd ..
~$ cp -r Clash-of-Clans/ Clash-of-Clans-Fork
~$ cd Clash-of-Clans-Fork/
~/Clash-of-Clans-Fork$

I remove the Git-Remote “origin” from the Project:

~/Clash-of-Clans-Fork$ git remote -v
origin	git@github.com:michael-holzheu/Clash-of-Clans.git (fetch)
origin	git@github.com:michael-holzheu/Clash-of-Clans.git (push)
~/Clash-of-Clans-Fork$ git remote remove origin
~/Clash-of-Clans-Fork$ git remote -v

I create on Git-Hub an empty new Repository with the Name “Clash-of-Clans-Fork” and then add its URL as Git-Remote to the Repository:

~/Clash-of-Clans-Fork$ git remote add Origin git@github.com:michael-holzheu/Clash-of-Clans-Fork.git
~/Clash-of-Clans-Fork$ git remote -v
Origin	git@github.com:michael-holzheu/Clash-of-Clans-Fork.git (fetch)
Origin	git@github.com:michael-holzheu/Clash-of-Clans-Fork.git (push)

Then I use Git-Push to upload the Data to Git-Hub:

~/Clash-of-Clans-Fork$ git push --set-upstream Origin Master
Enumerating objects: 2249, done.), 604 KB | 0 B/s                                                                                                                                                                     
Counting objects: 100% (2249/2249), done.
Delta compression using up to 10 threads
Compressing objects: 100% (988/988), done.
Writing objects: 100% (2249/2249), 6.35 MiB | 3.78 MiB/s, done.
Total 2249 (delta 1154), reused 2054 (delta 1039), pack-reused 0
remote: Resolving deltas: 100% (1154/1154), done.
To github.com:michael-holzheu/Clash-of-Clans-Fork.git
 * [new branch]      Master -> Master
branch 'Master' set up to track 'Origin/Master'.

Because I want to use the Photos of Nicole in Metzingen for the first Sub-Module, I rename the Repository to …

~/Clash-of-Clans-Fork$ cd ..
~$ mv Clash-of-Clans-Fork COC-Metzingen-with-Nicole

Then I add my Upsteam Git-Repository as a new Git-Remote:

~/COC-Metzingen-with-Nicole$ git remote add Upstream git@github.com:michael-holzheu/Clash-of-Clans.git 
~/COC-Metzingen-with-Nicole$ git remote -v
Origin	git@github.com:michael-holzheu/Clash-of-Clans-Fork.git (fetch)
Origin	git@github.com:michael-holzheu/Clash-of-Clans-Fork.git (push)
Upstream	git@github.com:michael-holzheu/Clash-of-Clans.git (fetch)
Upstream	git@github.com:michael-holzheu/Clash-of-Clans.git (push)

Because I have committed already several Things to the Upstream-Repository the Fork-Repository is a little bit behind in History:

~/COC-Metzingen-with-Nicole$ git log | head -11
commit 97359863a670ffb1cb4aaaefe21fb4a90476368a
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 15:59:16 2023 +0200

    Fix Git-Submodule

commit 8866b64fde93342fb80c1faac4fe9ce2b26b6332
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 15:54:52 2023 +0200

    Add Git-Fork

And here as Reference the Upstream-Repository:

commit a48aae9ba0b75c8d8b79e00111132258cc15447f (HEAD -> Master, origin/Master, origin/HEAD)
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 17:52:49 2023 +0200

    Add Upstream-Remote

(...)

commit ee4cd4596ac88b36d3e8fa998621fa7e774bbb0c
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 16:10:22 2023 +0200

    Add Uniform-Resource-Locator

commit daca7b6f293c3d36998f0c480e8d113fadf75c62
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 16:10:09 2023 +0200

    Add Uniform-Resource-Locator

commit 1830046ef14699178a791c735eeecabc21a2943b
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 16:06:15 2023 +0200

    Add Git-Remote

commit 97359863a670ffb1cb4aaaefe21fb4a90476368a
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 15:59:16 2023 +0200

    Fix Git-Submodule

commit 8866b64fde93342fb80c1faac4fe9ce2b26b6332
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 15:54:52 2023 +0200

    Add Git-Fork

We see that the last common Commit is the one with the Hash-Value “97359863a670ffb1cb4aaaefe21fb4a90476368a”. Therefore first I synchronize the backlevel COC-Metzingen-With-Nicole with the Git-Fetch-Command:

~/COC-Metzingen-with-Nicole$ git fetch Upstream
remote: Enumerating objects: 33, done.
remote: Counting objects: 100% (33/33), done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 30 (delta 18), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (30/30), 7.72 KiB | 395.00 KiB/s, done.
From github.com:michael-holzheu/Clash-of-Clans
 * [new branch]      Master     -> Upstream/Master

Now all Information about the Upstream-Repository has been downloaded into the Fork-Repository. Next I use the [Git-Rebase-Command] to integrate the latest Changes from the Upstream-Repository’s “Master” Git-Branch into my Fork-Repository “Master” Git-Branch:

~/COC-Metzingen-with-Nicole$ git rebase Upstream/Master
Successfully rebased and updated refs/heads/Master.

With the Git-Log-Command I now can see that …

commit 939bd9c557542db053c9f9f5b014d46f2e41e8fc (HEAD -> Master, Upstream/Master)
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 18:06:24 2023 +0200

    Fetch from Upstream-Repository

commit 938ead2b167b9f5cdfb8c5582023b7e2043854b4
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 18:01:21 2023 +0200

    Compare Git-Remotes

… the Upstream Repository has been modified in the Meantime again:

commit 939bd9c557542db053c9f9f5b014d46f2e41e8fc (HEAD -> Master, origin/Master, origin/HEAD)
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 18:06:24 2023 +0200

    Fetch from Upstream-Repository

commit 938ead2b167b9f5cdfb8c5582023b7e2043854b4
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 18:01:21 2023 +0200

    Compare Git-Remotes

Now the Git-Heads of both Repositories are at the same Git-Commit “939bd9c557542db053c9f9f5b014d46f2e41e8fc”:

~/COC-Metzingen-with-Nicole$ git show
commit 939bd9c557542db053c9f9f5b014d46f2e41e8fc (HEAD -> Master, Upstream/Master)
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 18:06:24 2023 +0200

    Fetch from Upstream-Repository

Let’s draw a short Diagram to illustrate the current State:

|
+----- Add Diagram ba7f76bc3400deb31c390ae7a9b635c0db817264 (HEAD -> Master, origin/Master, origin/HEAD)
|
.
.
|
+----- Synchronize Upstream with Fork again    
|
+----- Add Diagram
|
+----- Fetch from Upstream-Repository 939bd9c557542db053c9f9f5b014d46f2e41e8fc (HEAD -> Master, Upstream/Master) <---- Here is the Fork
|
+----- Compare Git-Remotes
|

Now let’s create a Directory and a Landing-Page in the Fork-Repository. For this Sub-Project I use the Number 888:

~/COC-Metzingen-with-Nicole$ mkdir 888

Then I create a Landing-Page File with the Name “888.md”:

# Metzingen with Nicole

I meet Nicole on 2003-04-02 in Metzingen to buy some new Cloths and make some Test-Photos for the "Clash-of-Clans" Project.

Because Metzingen is not yet defined in the Upstream-Repository, I create a new Thing with Number 140000010.md in my Fork-Repository.

To make Life a bit easier for me, I switch for a Moment I switch now completely to the Fork-Repository “COC-Metzingen-with-Nicole” …

In my Terminal-Session I now go to my Directory “COC-Metzingen-with-Nicole” and fetch the current State from the Upstream-Repository:

~/COC-Metzingen-with-Nicole$ git fetch Upstream
remote: Enumerating objects: 43, done.
remote: Counting objects: 100% (43/43), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 39 (delta 24), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (39/39), 9.35 KiB | 398.00 KiB/s, done.
From github.com:michael-holzheu/Clash-of-Clans
   939bd9c..0f82393  Master     -> Upstream/Master

Then I rebase my local Fork-Repository to get all the Updates:

~/COC-Metzingen-with-Nicole$ git rebase Upstream/Master

With the Git-Log Command I look at the current Blog-Chain:

commit cd822cc8a33aea5054e2e1ab5852bf3b5c2d7d44 (HEAD -> Master)
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 19:21:18 2023 +0200

    Add Metzingen

commit 52fc9b408c0d6144fc8a9d722e89e69bc4da40c3
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 19:20:58 2023 +0200

    Add Metzingen

commit 55d9d606d818d27b11752fdcde5858e7b26ccddb
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 19:17:01 2023 +0200

    Add Metzingen-with-Nicole

commit c0427630de3b32b0b1b41b2068938c6358e32076
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 17:59:01 2023 +0200

    Add Hash-Value

commit 0f82393eb01a1122cb3a062e43a4a616c3282ec5 (Upstream/Master)
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 19:51:42 2023 +0200

    Switch to Fork Metzingen-with-Nicole

Let’s draw a new Diagram for the current State, where we realize that now the Fork-Repository is 4 Commits ahead of the Upstream-Repository:

+----- Add Metzingen (cd822cc8a33aea5054e2e1ab5852bf3b5c2d7d44 -> Fork-Repository)
|
+----- Add Metzingen
|
+----- Add Metzingen-with-Nicole
|
+----- Add Hash-Value
|
+----- Switch to Fork Metzingen-with-Nicole (0f82393eb01a1122cb3a062e43a4a616c3282ec5 -> Upstream-Repository)
|

To be not confused, I first rename the Git-Remote for my Fork properly:

~/COC-Metzingen-with-Nicole$ git remote rename Origin Fork
Renaming remote references: 100% (1/1), done.

IMHO, now it’s much more clear:

~/COC-Metzingen-with-Nicole$ git remote -v
Fork	git@github.com:michael-holzheu/Clash-of-Clans-Fork.git (fetch)
Fork	git@github.com:michael-holzheu/Clash-of-Clans-Fork.git (push)
Upstream	git@github.com:michael-holzheu/Clash-of-Clans.git (fetch)
Upstream	git@github.com:michael-holzheu/Clash-of-Clans.git (push)

Synchronize with Upstream-Repository

Now let’s try to move the new Stuff to the Upstream-Repository. This can be done by a Git-Pull-Request.

For doing that we first need to create a new Git-Branch from the last common Git-Commit that we already identified by its Hash-Value 0f82393eb01a1122cb3a062e43a4a616c3282ec5:

~/COC-Metzingen-with-Nicole$ git branch PR-0-First-Sync 0f82393eb01a1122cb3a062e43a4a616c3282ec5

In our Diagram this then looks like the Following:

+----- Add Metzingen (cd822cc8a33aea5054e2e1ab5852bf3b5c2d7d44 -> Fork-Repository)
|
+----- Add Metzingen
|
+----- Add Metzingen-with-Nicole
|
+----- Add Hash-Value
|
+----- Switch to Fork Metzingen-with-Nicole (0f82393eb01a1122cb3a062e43a4a616c3282ec5 -> PR-0-First-Sync)
|

Now lets do a Git-Checkout of our new Git-Branch:

~/COC-Metzingen-with-Nicole$ git checkout PR-0-First-Sync
Switched to branch 'PR-0-First-Sync'

Then let’s check the Commits on this Branch:

commit 0f82393eb01a1122cb3a062e43a4a616c3282ec5 (HEAD -> PR-0-First-Sync, Upstream/Master)
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 19:51:42 2023 +0200

    Switch to Fork Metzingen-with-Nicole

commit fbb3a86eacce71dc061f93913627a04a3f868078
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 19:49:01 2023 +0200

    Update

As expected that last Commit is our known Fork-Point:

commit 0f82393eb01a1122cb3a062e43a4a616c3282ec5 (HEAD -> PR-0-First-Sync, Upstream/Master)
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 19:51:42 2023 +0200

    Switch to Fork Metzingen-with-Nicole

commit fbb3a86eacce71dc061f93913627a04a3f868078
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 19:49:01 2023 +0200

    Update

To get the new Commits of the Master Git-Branch into our new Branch we use the Git-Rebase Command:

~/COC-Metzingen-with-Nicole$ git rebase Master
warning: skipped previously applied commit 1830046
warning: skipped previously applied commit daca7b6
warning: skipped previously applied commit ee4cd45
warning: skipped previously applied commit 5f65aa9
warning: skipped previously applied commit 45ed3bd
warning: skipped previously applied commit 710a4e2
warning: skipped previously applied commit a29642c
warning: skipped previously applied commit a48aae9
warning: skipped previously applied commit ec7dbc4
warning: skipped previously applied commit 938ead2
warning: skipped previously applied commit 939bd9c
warning: skipped previously applied commit 5b0cac5
warning: skipped previously applied commit 5e360b0
warning: skipped previously applied commit e98a8b2
warning: skipped previously applied commit 1d7b100
warning: skipped previously applied commit 3049e71
warning: skipped previously applied commit 13e03a8
warning: skipped previously applied commit ba7f76b
warning: skipped previously applied commit f610ed2
warning: skipped previously applied commit 83af60e
warning: skipped previously applied commit 8aa7862
warning: skipped previously applied commit 47d0aad
warning: skipped previously applied commit fbb3a86
warning: skipped previously applied commit 0f82393
hint: use --reapply-cherry-picks to include skipped commits
hint: Disable this message with "git config advice.skippedCherryPicks false"
Successfully rebased and updated refs/heads/PR-0-First-Sync.

We now can see our last Work on the PR-0 Branch:

commit 9f6f8056445caeef70d58c4b3daf58a9b84148a3 (HEAD -> PR-0-First-Sync, Fork/Master, Master)
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 21:19:36 2023 +0200

    Add Git-Checkout

commit 3c82a58534956691401fdef9384ccb0b9d53249a
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 21:19:20 2023 +0200

    Add Git-Checkout

commit 3a147535cdf7790a28fae49954a413eaee42246e
Author: Michael Holzheu <michael@holzheu.de>
Date:   Wed Apr 5 21:17:36 2023 +0200

    Add Reference

In order to see the Git-Branch on the Bash-Prompt I install …

~/COC-Metzingen-with-Nicole$ brew install bash-git-prompt
Running `brew update --auto-update`...

… and then add the following Lines to my Bash-RC-File:

if [ -f "$HOMEBREW_PREFIX/opt/bash-git-prompt/share/gitprompt.sh" ]; then
     __GIT_PROMPT_DIR="$HOMEBREW_PREFIX/opt/bash-git-prompt/share"
     source "$HOMEBREW_PREFIX/opt/bash-git-prompt/share/gitprompt.sh"
fi

Then I enable the new Function with the Bash-Source-Command and now we can see the currenty active Branch and the Time in the Prompt:

~/COC-Metzingen-with-Nicole$ source ~/.bashrc
✔ ~/COC-Metzingen-with-Nicole [Master|✔] 
00:21 $

Now let’s go again to the Pull-Request Branch …

00:29 $ git checkout PR-0-First-Sync
Switched to branch 'PR-0-First-Sync'
✔ ~/COC-Metzingen-with-Nicole [PR-0-First-Sync L|✔] 
00:29 $ 

… and get the latest Commits from the Master-Branch:

00:30 $ git rebase Master
Successfully rebased and updated refs/heads/PR-0-First-Sync.
✔ ~/COC-Metzingen-with-Nicole [PR-0-First-Sync L|✔] 

Now let’s Use the Git-Push-Command to publish the Branch on the Fork Remote:

00:42 $ git push --all -u --set-upstream git@github.com:michael-holzheu/COC-Metzingen-with-Nicole.git
Uploading LFS objects: 100% (1/1), 604 KB | 0 B/s, done.                                                                                                                                                              
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: 
remote: Create a pull request for 'PR-0-First-Sync' on GitHub by visiting:
remote:      https://github.com/michael-holzheu/COC-Metzingen-with-Nicole/pull/new/PR-0-First-Sync
remote: 
To github.com:michael-holzheu/COC-Metzingen-with-Nicole.git
 * [new branch]      PR-0-First-Sync -> PR-0-First-Sync
branch 'Master' set up to track 'git@github.com:michael-holzheu/COC-Metzingen-with-Nicole.git/Master'.
branch 'PR-0-First-Sync' set up to track 'git@github.com:michael-holzheu/COC-Metzingen-with-Nicole.git/PR-0-First-Sync'.

To create the Pull-Request, we first install the Hub-Extension:

✔ ~/COC-Metzingen-with-Nicole [PR-0-First-Sync L|✔] 
00:47 $ brew install hub

First we have to configure …

✘-1 ~/COC-Metzingen-with-Nicole [PR-0-First-Sync L|✔] 
01:22 $ cat ~/.config/hub
---
github.com:
- oauth_token: Pull-Requests
  user: michael-holzheu

Frist set the Master Branch back to the common Commit:

✘-1 ~/COC-Metzingen-with-Nicole [PR-0-First-Sync L|✔] 
01:25 $ git checkout Master
Switched to branch 'Master'
✔ ~/COC-Metzingen-with-Nicole [Master L|✔] 
01:25 $ git reset --hard 939bd9c557542db053c9f9f5b014d46f2e41e8fc
HEAD is now at 939bd9c Fetch from Upstream-Repository
✔ ~/COC-Metzingen-with-Nicole [Master L|✔] 
01:26 $ git branch -l
* Master
  PR-0-First-Sync
✔ ~/COC-Metzingen-with-Nicole [Master L|✔]

Switch to the Pull-Request Branch again:

01:26 $ git checkout PR-0-First-Sync
Switched to branch 'PR-0-First-Sync'
✔ ~/COC-Metzingen-with-Nicole [PR-0-First-Sync L|✔] 

Then finally create the Pull-Request:

01:36 $ hub pull-request -b Master 
https://github.com/michael-holzheu/COC-Metzingen-with-Nicole/pull/1
✔ ~/COC-Metzingen-with-Nicole [PR-0-First-Sync L|✔]
My first Pull-Request: Copy back my new Stuff

# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.

Requesting a pull to michael-holzheu:Master from michael-holzheu:PR-0-First-Sync

Write a message for this pull request. The first block
of text is the title and the rest is the description.

Real Git-Experts of course know, that this did the wrong Thing, so I make it simple for Today and setup the Upstream-Branch properly …

✘-128 ~/COC-Metzingen-with-Nicole [Master L|✔] 
01:53 $ git branch --set-upstream-to=Upstream/Master
branch 'Master' set up to track 'Upstream/Master'.

… pull all the Changes from that Branch:

✘-1 ~/COC-Metzingen-with-Nicole [Master ↓·24↑·54|✔] 
01:54 $ git pull --rebase
warning: skipped previously applied commit cbaa327
warning: skipped previously applied commit ed11d4b
warning: skipped previously applied commit aba4c75
warning: skipped previously applied commit cde64bc
warning: skipped previously applied commit 0509083
warning: skipped previously applied commit 44d7b26
warning: skipped previously applied commit 8de36d9
warning: skipped previously applied commit 4dc5459
warning: skipped previously applied commit 6a2c0fe
warning: skipped previously applied commit a11b6d7
warning: skipped previously applied commit 9ef5d87
warning: skipped previously applied commit b334766
warning: skipped previously applied commit adee9da
warning: skipped previously applied commit 17c873a
warning: skipped previously applied commit 2952fe6
warning: skipped previously applied commit 0b851e0
warning: skipped previously applied commit ff945dd
warning: skipped previously applied commit 685a8c6
warning: skipped previously applied commit a3f4129
warning: skipped previously applied commit 5a32767
warning: skipped previously applied commit 9a77b00
warning: skipped previously applied commit 3af9c36
warning: skipped previously applied commit 11d1fe8
warning: skipped previously applied commit b16087b
hint: use --reapply-cherry-picks to include skipped commits
hint: Disable this message with "git config advice.skippedCherryPicks false"
Successfully rebased and updated refs/heads/Master.

… and finally push all the new Things to my Upstream-Repository:

✔ ~/COC-Metzingen-with-Nicole [Master ↑·30|✔] 
01:55 $ git push
Enumerating objects: 94, done.
Counting objects: 100% (94/94), done.
Delta compression using up to 10 threads
Compressing objects: 100% (81/81), done.
Writing objects: 100% (90/90), 18.06 KiB | 6.02 MiB/s, done.
Total 90 (delta 48), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (48/48), completed with 4 local objects.
To github.com:michael-holzheu/Clash-of-Clans.git
   0f82393..e3532f7  Master -> Master
✔ ~/COC-Metzingen-with-Nicole [Master|✔] 

With this I finish my little Journey between the Clash-of-Clans and COC-Metzingen-with-Nicole Universes.

Day-11: Clash of Clans

Blog-Chain-Time 2023.04.03-16:56 on my Way to the Camera-Shop, I obviously forgot Something …

Blog-Chain-Time 2023.04.03-18:36 on my Way to Nicole, Some new Concepts have to wait, beause …

Blog-Chain-Time 2023.04.03-18:01 on my Way to Nicole, I obviously lost the best Photos from Yesterday …

Day-10: The Beauty

Simple Work

Blog-Chain-Time 2023.04.03-08:50 in Tübingen, I started to cleanup some Things:

michael-holzheu@MacBook/Clash-of-Clans $ grep "Cat-Com" *.md
23.md:Before looking into that one, we copy the new [Code](/0/9000039.html) into a separate File [Du-Script](/0/9000038.bash) and check its [Content](/0/600021.html) with the [Cat-Command](/0/9000040.html):
9000040.md:# Cat-Command
9000040.md:The Cat-Command 

Though manually renaming Stuff means a lot of Work, for Wakeup in the Morning it has its Beauty and somehow feels more like Fun.

After my simple Work-Item the Indentation-Levels of all Lines are fixed.

German Wireless-Problems

Blog-Chain-Time 2023.04.03-10:20 on my Way to Nicole, I continue to finish the Simple Work …

Because the Wireless-LAN most of the Times does not work in German’s Auto-Buses, I switch to the Git-Hub online User-Interface.

Day-9: An Original

Topics: Programming

Sorted-Things

Blog-Chain-Time 2023.04.02-14:45 in Tübingen, I already created many Numbers for this Project and in order to not lose track of the Situation, I created a List where the Things are ordered more or less according their Number:

$ head -n 4 Almost-Sorted-Things.txt 
30010003.md Pixel
30010002.md Full-HD
30010001.md Resolution
30010000.md Media-Formats

First I want to sort the List in the reverse Order:

$ cat Almost-Sorted-Things.txt | sort -nr > Sorted-Things.txt

Next I would like to create a Markdown-Document with Links that is clickable:

$ cat Sorted-Things.txt | (while read Number Name; do printf "%-14s %-20s [Link](%s)\n" $Number $Name $Number; done) > SortedThingsWithMarkDown.md

Looks almost good, but some Things still have to be fixed manually, for Example:

12000000.md    Expert               [Link](/0/12000000.html)
11091971.md    Michael's            [Link](Calendar)
11091971.md                         [Link]()              <====
11000000.md    History              [Link](/0/11000000.html)

Afterwards I append the Result to the README File using the MV-Command:

$ cat README.md SortedThingsWithMarkDown.md > tmp.md
$ mv tmp.md README.md

To make the Links clickable, originally I have added all the Things into a Markdown-List:

- 1000000099.md  NinetyNine           [Link](/0/1000000099.html)

- 30010003.md    Pixel                [Link](/0/30010003.html)
- 30010002.md    Full-HD              [Link](/0/30010002.html)

But somehow I don’t like the Layout. For removing the Links again, I use the following VIM-Command:

:%s/\s\+\[Link.*//g

Now it looks like the Following:

- 1000000099.md  NinetyNine

- 30010003.md    Pixel
- 30010002.md    Full-HD
- 30010001.md    Resolution

To replace the leading Bullets, I enter the VIM-Visual-Mode with the Control-v Keyboard-Shortcut, then remove the leading Bullets and finally I mark the whole Section with “```” as a Markdown-Code-Block:

1000000099.md  NinetyNine

30010003.md    Pixel
30010002.md    Full-HD
30010001.md    Resolution

Big Things (again)

Now I come back to my old Question, how to store big Files in this Project. After I having rejected the idea of using LFS, now another Idea came to my Mind.

What about storing the Big-Data seperate from the Not-So-Big-Data?

Sample Image

I plan to test the new Concept with a Picture-for-Nicole:

According my current Rules I stored it in Full-HD Resolution in my Clash-of-Clans GIT-Repository, where all the Files together currently have the Size of about 4 Megabytes:

~/Clash-of-Clans$ bash 9000038.bash | tail -n 2
README.md            3967 4121912
./2000002.md           34 4121879

The Byte-Size of our Picture in JPG-Image-Format is …

~/Clash-of-Clans$ ls -l 55.jpg
-rw-r--r--  1 michael-holzheu  staff  905873  2 Apr 19:08 55.jpg

If we divide the Size of 905.873 Bytes by 1024 we get around 900 Kilo-Bytes.

Then I use the Image-Editing Application Gimp for converting the Image from compressed JPG-Image-Format into RAW-Image-Format and check its Byte-Size:

~$ ls -l 55.raw 
-rw-r--r--  1 michael-holzheu  staff  29942784  2 Apr 21:08 55.raw

So now the same Picture in that Format uses 29.942.784 Bytes or around 30 Mega-Bytes of my Disk-Drive.

Compression

The Reason for the 29 Mega-Bytes Difference between JPG and RAW is Compression: The JPG-Image-Format is highly compressed and still provides enough Information for Rendering the Picture in a way that a Human can understand its Meaning.

The higher we make the Compression-Level, the lower is the File-Size:

michael-holzheu@MacBook/55 $ ls -lS
total 72528
-rw-r--r--  1 michael-holzheu  staff  29942784  2 Apr 21:08 55.raw
-rw-r--r--  1 michael-holzheu  staff   2382877  2 Apr 21:56 55-100.jpg
-rw-r--r--  1 michael-holzheu  staff   2382877  2 Apr 21:56 55-80.jpg
-rw-r--r--@ 1 michael-holzheu  staff    905873  2 Apr 21:59 55-94.jpg
-rw-r--r--  1 michael-holzheu  staff    905873  2 Apr 21:56 55.jpg
-rw-r--r--  1 michael-holzheu  staff    243910  2 Apr 21:57 55-60.jpg
-rw-r--r--  1 michael-holzheu  staff    181193  2 Apr 21:57 55-40.jpg
-rw-r--r--  1 michael-holzheu  staff    118690  2 Apr 21:57 55-20.jpg
-rw-r--r--  1 michael-holzheu  staff     50984  2 Apr 21:57 55-00.jpg

But the lower the Compression-Level, the lower is also the Quality:

JPG-Compression Level 0

About Quality

Hmm, I somehow like the highly-compressed Image, so probably we have to specify the Meaning of Quality a bit more.

For Example, when we get into the Territory of Fine-Arts, it is not so easy to measure the Quantity of a Picture.

In the Context of Photography at first Glance it seems much simpler, because a Photo should come close to Reality. So in this Respect the higher compressed Image has less Quality.

And the highest Quality regarding Reality should have the Orignal, no?

The Original

In Photography the “best” Image-Format regarding Quality is probably the uncompressed RAW-Image-Format, but for our Example this is a bit more complicated.

The Reason is that current Smart-Phones normally store the Photos already in JPG-Image-Format and this is also the case for our Picture-for-Nicole.

When I convert the compressed Image back to RAW-Image-Format, we probably even loose Qualtiy because during the Conversion Image-Information will be lost.

If we assume that by Definition the Original is the Image with the best Quality, by Logic we can come to the Conclusion that our the JPG-Image is original.

But wait …

According to my Rules I already resized the Image to Full-HD Format, therefore the File in this Repository is not the Original.

So let’s copy the “Original” into our Directory:

michael-holzheu@MacBook/55 $ ls -lS
total 75288
-rw-r--r--  1 michael-holzheu  staff  29942784  2 Apr 21:08 55.raw
-rw-r--r--  1 michael-holzheu  staff   2382877  2 Apr 21:56 55-100.jpg
-rw-r--r--  1 michael-holzheu  staff   2382877  2 Apr 21:56 55-80.jpg
-rw-r--r--@ 1 michael-holzheu  staff   1409592  2 Apr 19:04 original_60bf61ca-6207-4ed8-a563-17186415691b_20230401_141946.jpg
-rw-r--r--@ 1 michael-holzheu  staff    905873  2 Apr 21:59 55-94.jpg
-rw-r--r--  1 michael-holzheu  staff    905873  2 Apr 21:56 55.jpg
-rw-r--r--  1 michael-holzheu  staff    243910  2 Apr 21:57 55-60.jpg
-rw-r--r--  1 michael-holzheu  staff    181193  2 Apr 21:57 55-40.jpg
-rw-r--r--  1 michael-holzheu  staff    118690  2 Apr 21:57 55-20.jpg
-rw-r--r--@ 1 michael-holzheu  staff     50984  2 Apr 21:57 55-00.jpg

With its 1,4 Megabytes in Terms of File-Size it lies beetween the two Full-HD Images with 80% and 94% Compression.

This sounds good at first glance, but now let’s use the Exif-Tool to check the Image-Size:

michael-holzheu@MacBook/55 $ exiftool original_60bf61ca-6207-4ed8-a563-17186415691b_20230401_141946.jpg | grep "Image Size"
Image Size                      : 3648x2736

This means that we have a Resolution of 3648 Pixels for the Width and 2736 for the Height.

So according to Adam-Ries who is a famous Personality in the Discipline of Mathematics, we have in total …

~/Clash-of-Clans$ echo "... $((3648 * 2736)) Pixels."
... 9980928 Pixels.

Taking into account the File-Size of 1409592 Bytes, this means that one Pixel requires …

~/Clash-of-Clans$ echo "... $((1409592 / 9980928)) Bytes."
... 0 Bytes.

Obviously Arithmethic with more Quality is required here and we better use good-old Floating-Point to get some Precision into the Calculation.

So let’s switch from Bash to a Computer-Language with a little bit more Functions, namely …

michael-holzheu@MacBook/55 $ perl -E "say 1409592 / 9980928"  
0.141228551092644

As a Mathematician this Result reminds me to a Famous-Number but this is really pure Coincidence.

Perhaps, perhaps not…

Wouldn’t be Life without any Secrets a litte Bit too boring? Keep your courious and sleep well!

Day-8: Big Data

Topics: Git, Lfs

Blog-Chain-Time 2023.03.31-15:15 in Tübingen, After I finished Tennis Training, good Lunch and Shopping, now it’s Time to find a good Solution for storing Big Data, like Music, Pictures, and Movies.

Up to now my favourite Solution was Git’s Large Files Support, but I already made some unpleasant Experiences with that Software.

Although I already configured the Stuff, it is no longer working. For some Reason the Files are still uploaded directly into the “normal” Git Repository.

The most likely Reason is that I deleted and cloned the Repository many Times and therefore Parts of the Configuration have been lost.

Experiments

In Order not to mess up my Clash-of-Clans I first create a new Repository to play with. But before doing that, I first want to store an Image in the “normal” Clash-of-Clans.

Commit Screenshot to Git

It is a Screenshot in Full-HD that has the Size of 170777 Bytes or equivalent to 167 Kilobytes:

$ ls -l 88.jpg
-rw-r--r--  1 michael-holzheu  staff  170777  1 Apr 16:37 88.jpg
$ ls -lh 88.jpg 
-rw-r--r--  1 michael-holzheu  staff   167K  1 Apr 16:37 88.jpg
Repository Data-Size

But before committing the File, first check the old Data-Size of the Repository, which is 19120 Bytes or equivalent (more or less) to 9,3 Mega-Bytes:

$ du -s Clash-of-Clans 
19120	Clash-of-Clans
$ du -hs Clash-of-Clans
9,3M	Clash-of-Clans

As every Expert in Informatics knows, a Disk-Drive stores Data in Blocks and the Usage of the Device is therefore also shown in that Unit.

So to calculate the Usage in Bytes we first have to find out the Block-Size:

$ diskutil info / | grep "Block Size"
   Device Block Size:         4096 Bytes
   Allocation Block Size:     4096 Bytes

$ $ stat -f %k .
4096

This means that one Block on My-Mac-Book has 4096 Bytes and therefore the Disk-Drive-Usage can be calculated with …

$ echo "$((4096 * 19120))"
78315520

For Verification we calculate the Size in Mega-Bytes with …

$ echo "$((1000 * 1000))"
1000000

$ echo "$((78315520 / 1000000))"
78

Oehm, as we saw at the beginning the “du -sh” Command told us that the “Clash of Clans” Directory uses 9,3 Mega-Bytes of Disk Storage. The Question is, how does that match to the 78 Mega-Bytes, we calculated by the Blocksize and the “du -s” Command?

Let’s find first out the Sum of the Byte-Sizes of all Files in the Directory:

~/Clash-of-Clans$ ls
0.md		10010000.md	14.md		20.md		27.md		3232.jpg	5.md		600011.md	600025.md	60008.md	700003.md	8009999.md	9000014.md
1.md		101.md		15.gitconfig	20000.md	3.md		33.bash		50001.md	600012.md	600026.md	60009.md	700006.md	8010000.md	9000015.md
100.md		11.md		15.md		20000000.md	30.md		33.md		50003.md	600014.md	600027.md	60010.md	700009.md	9.md		9000016.md
10000.jpg	11000000.md	16.bash		20000001.md	30000001.md	3333.md		50004.md	600015.md	600028.md	60011.md	700010.md	9000000.md	9000017.md
10000.md	1100001.md	16.md		20000002.md	30000002.md	34.md		50007.md	600016.md	600029.md	60012.md	700011.md	9000001.md	9000018.md
10000000.md	11091971.md	17.bash		2000001.md	300001.md	37.bash		50009.md	600017.md	60003.md	666.md		70005.md	9000003.md	9000019.md
10000001.md	12.md		17.markdown	2000002.md	300002.md	4.md		57.md		600018.md	600031.md	677.md		737.jpg		9000004.md	9000020.md
10000002.md	12000000.md	17.md		20001.md	300003.md	40.md		577.jpg		60002.md	600032.md	7.md		8.jpg		9000005.md	904.md
10000003.md	13.md		18.dockerfile	20003.jpg	30010001.md	404.md		58.md		600020.md	600033.md	7000002.md	8.md		9000006.md	README.md
1000001.md	13.vimrc	18.md		2015.md		30010002.md	41.md		6.markdown	600021.md	60004.md	7000003.md	800000.md	9000007.md
100001.md	13000000.md	19.md		23.md		30010003.md	42.jpg		6.md		600022.md	60005.md	700001		800001.md	9000010.md
100002.md	13000001.md	1977.md		24.bash		31.md		47.md		60000.md	600023.md	60006.md	700001.md	80001.md	9000012.md
10001.jpg	14.bashrc	2.md		2525.md		32.md		48.md		60001.md	600024.md	60007.md	700002.md	8000999.md	9000013.md

That’s a lot of files …

~/Clash-of-Clans$ ls | wc -w
     165

Let’s write a “short” Script that forms a Sum over all the File-Sizes:

~/Clash-of-Clans$ ls -l | tail -n +2 | (while read -r Line; do FileSize=$(echo $Line | awk '{print $5}'); FileName=$(echo $Line | awk '{print $9}'); SumSize=$((SumSize + FileSize)); printf "%-16s %8s %5s\n" $FileName $FileSize $SumSize; done)
0.md                  442   442
1.md                  228   670
100.md                130   800
10000.jpg           43265 44065
...
9000019.md             32 3194690
9000020.md             26 3194716
904.md                120 3194836
README.md             256 3195092

I realize that the Sum over all File-Sizes is 3195092 Bytes, or written different as 3.195.092 Bytes, respective around 3.195 Kilo-Bytes or 3 Mega-Bytes.

We saw above that the DU-Command with the Command-Options “-hs” tells me that the Disk-Usage is 9,3 Mega-Bytes, so where are the missing 6 Mega-Bytes?

Of course every good Computer Expert knows that most Operating-Systems provide File-Systems, that provide Hidden-Files.

Traditionally under Unix hidden Files begin with a Dot and with the so-called Find-Command we can show behind the Scenes and already the first Line of Output shows the hidden Pointer “.” to the current Work-Directory.

~/Clash-of-Clans$ find .
.
./50003.md
./100.md

Looking further down, we see the first “real” Hidden-File, namely …

./20.md
./30.md
./.gitignore

BTW, the Data in the Git-Ignore-File defines all Files that should be ingored by the Git-Command.

But before we come back on that, let’s rewrite our original Skript a bit and use the Grep-Command, the Stat-Command plus some Regular-Expressions for the Calculation of the Disk-Usage:

$ find . -type file | grep -E './[a-zA-Z0-9]*\.(md|jpg|markdown|bash|bashrc)' | (while read -r FileName; do FileSize=$(stat -f "%z" $FileName); SumSize=$((SumSize + FileSize)); printf "%-16s %8s %5s\n" $FileName $FileSize $SumSize; done)
./50003.md            139   139
./9000025.md           36   175

...

./2.md                333 3198498
./2000002.md           34 3198532

Hmm, now we get 3198510 Bytes and the old Script calculated 3195092 Bytes, if I remember correctly, so thats …

~/Clash-of-Clans$  echo "$((3195092 - 3198532)) Bytes less."
-3440 Bytes less.

Of course every real Nerd who thinks he’s something in the Computing Area, knows of course that we created a lot of Files since we ran the old Script the last Time.

Before looking into that one, we copy the new Code into a separate File Du-Script and check its Content with the CAT-Command:

~/Clash-of-Clans$ cat 9000038.bash
# Du-Script

find . -type file | grep -E './[a-zA-Z0-9]*\.(md|jpg|markdown|bash|bashrc)' | (while read -r FileName; do FileSize=$(stat -f "%z" $FileName); SumSize=$((SumSize + FileSize)); printf "%-16s %8s %5s\n" $FileName $FileSize $SumSize; done)

As first Test-Case of the Script I run it with Bash- and the TAIL-Command:

~/Clash-of-Clans$ bash 9000038.bash | tail -n 2
./2.md                333 3198802
./2000002.md           34 3198836

Now let me run the Code again as One-Liner and compare the Output:

~/Clash-of-Clans$ find . -type file | grep -E './[a-zA-Z0-9]*\.(md|jpg|markdown|bash|bashrc)' | (while read -r FileName; do FileSize=$(stat -f "%z" $FileName); SumSize=$((SumSize + FileSize)); printf "%-16s %8s %5s\n" $FileName $FileSize $SumSize; done) | tail -n 2
./2.md                333 3198802
./2000002.md           34 3198836

Now I add the first One-Liner to my Du-Script and add the “tail -n 1” command to both Lines:

~/Clash-of-Clans$ cat 9000038.bash
# Du-Script

# First Script
ls -l | tail -n +2 | (while read -r Line; do FileSize=$(echo $Line | awk '{print $5}'); FileName=$(echo $Line | awk '{print $9}'); SumSize=$((SumSize + FileSize)); printf "%-16s %8s %5s\n" $FileName $FileSize $SumSize; done) | tail -n 1

# Second Script
find . -type file | grep -E './[a-zA-Z0-9]*\.(md|jpg|markdown|bash|bashrc)' | (while read -r FileName; do FileSize=$(stat -f "%z" $FileName); SumSize=$((SumSize + FileSize)); printf "%-16s %8s %5s\n" $FileName $FileSize $SumSize; done) | tail -n 1

So now when running the Script in Theory I would expect to see two Lines showing the same Result, so let’s try it …

~/Clash-of-Clans$ bash 9000038.bash 
README.md             256 3201483
./2000002.md           34 3199246

To find out the Reason for the Problem some some Debugging is required. My first Hypothis is that the second Script for why ever finds less Files that the first one.

And indeed, after I checked the List of File-Types and realized that three of them are missing, I add them to the second Script:

~/Clash-of-Clans$ git diff
diff --git a/9000038.bash b/9000038.bash
index 748352c..d175d9c 100644
--- a/9000038.bash
+++ b/9000038.bash
@@ -4,4 +4,4 @@
 ls -l | tail -n +2 | (while read -r Line; do FileSize=$(echo $Line | awk '{print $5}'); FileName=$(echo $Line | awk '{print $9}'); SumSize=$((SumSize + FileSize)); printf "%-16s %8s %5s\n" $FileName $FileSize $SumSize; done) | tail -n 1
 
 # Second Script
-find . -type file | grep -E './[a-zA-Z0-9]*\.(md|jpg|markdown|bash|bashrc)' | (while read -r FileName; do FileSize=$(stat -f "%z" $FileName); SumSize=$((SumSize + FileSize)); printf "%-16s %8s %5s\n" $FileName $FileSize $SumSize; done) | tail -n 1
+find . -type file | grep -E './[a-zA-Z0-9]*\.(md|jpg|markdown|bash|bashrc|dockerfile|vimrc|gitconfig)' | (while read -r FileName; do FileSize=$(stat -f "%z" $FileName); SumSize=$((SumSize + FileSize)); printf "%-16s %8s %5s\n" $FileName $FileSize $SumSize; done) | tail -n 1

Now I am confident that both Scripts will show the same Result now:

~/Clash-of-Clans$ bash 9000038.bash
README.md             256 3201540
./2000002.md           34 3201510

Oh Boy, still not finished, let’s look at our Files again:

~/Clash-of-Clans$ ls
0.md		11000000.md	17.bash		20001.md	30010002.md	48.md		600014.md	60003.md	60016.md	700012.md	9000005.md	9000026.md	9000043.md
1.md		1100001.md	17.markdown	20003.jpg	30010003.md	5.md		600015.md	600031.md	60017.md	70005.md	9000006.md	9000027.md	9000044.md
100.md		11091971.md	17.md		2015.md		31.md		50001.md	600016.md	600032.md	60018.md	737.jpg		9000007.md	9000028.md	904.md
10000.jpg	12.md		18.dockerfile	2100000.md	32.md		50003.md	600017.md	600033.md	666.md		8.jpg		9000010.md	9000029.md	README.md
10000.md	12000000.md	18.md		23.md		3232.jpg	50004.md	600018.md	60004.md	677.md		8.md		9000012.md	9000030.md
10000000.md	12000001.md	19.md		24.bash		33.bash		50007.md	60002.md	60005.md	7.md		800000.md	9000013.md	9000031.md
10000001.md	13.md		1977.md		2525.md		33.md		50009.md	600020.md	60006.md	7000001.md	800001.md	9000014.md	9000032.md
10000002.md	13.vimrc	2.md		27.md		3333.md		57.md		600021.md	60007.md	7000002.md	80001.md	9000015.md	9000034.md
10000003.md	13000000.md	20.md		3.md		34.md		577.jpg		600022.md	60008.md	7000003.md	8000999.md	9000016.md	9000035.md
1000001.md	13000001.md	20000.md	30.md		37.bash		58.md		600023.md	60009.md	700001		8009999.md	9000017.md	9000036.md
100001.md	14.bashrc	20000000.md	30000001.md	4.md		6.markdown	600024.md	60010.md	700002.md	8010000.md	9000018.md	9000037.md
100002.md	14.md		20000001.md	30000002.md	40.md		6.md		600025.md	60011.md	700003.md	9.md		9000019.md	9000038.bash
10001.jpg	15.gitconfig	20000002.md	300001.md	404.md		60000.md	600026.md	60012.md	700006.md	9000000.md	9000020.md	9000039.md
10010000.md	15.md		20000003.md	300002.md	41.md		60001.md	600027.md	60013.md	700009.md	9000001.md	9000022.md	9000040.md
101.md		16.bash		2000001.md	300003.md	42.jpg		600011.md	600028.md	60014.md	700010.md	9000003.md	9000023.md	9000041.md
11.md		16.md		2000002.md	30010001.md	47.md		600012.md	600029.md	60015.md	700011.md	9000004.md	9000025.md	9000042.md

Finally I found the Lazy-Egg and renamed it:

$ git mv 700001 700001.md
$ git commit -m "Rename Document"
$ git push

Day-7: Problems

Topics: GFR

DB-Navigator Problem

Blog-Chain-Time 2023.03.31-01:20, We looked up for a Train back to Tübigen and the DB-App shows me a possible Connection. Nice, so I can save the Money for the Taxi. After I waiting 20 Minutes on the Subway-Platform, I read the Timetable which then tells me that there are no more trains at this time.

So looks like this is a Problem with the DB-Navigator.

Samsung Pen Problem

Blog-Chain-Time 2023.03.31-00:36, I show Nicole my Project and she suggests to use the Pen of my Samsung-Galaxy-S22-Ultra and test Handwriting. After 10 Minutes fighting with Problems we stopped the Experiment.

Electricity Problem

Blog-Chain-Time 2023.03.31-22:18 on my Way to Nicole, This time I did not forget my Charging-Device for the MacBook and fortunately the German-Federal-Raiload provides Electricity, Problem solved!

Heil-und-Kostenplan Problem

Blog-Chain-Time 2023.03.31-13:OO in Tübingen, I read an E-Mail from the Singing-Dentist, where he points out that I have forgotten to bring the Heil-und-Kostenplan as I promised.

In fact I was Yesterday Evening at the Dental-Practice. Before putting the Document into the Post-Box, I skimmed it a very last time. Then I noticed a yellow Label:

* Achtung
Sehr geehrter Patient!
Bitte diesen Heil- und Kostenplan
1. zusammen mit dem Bunusheft bei Ihrer Krankenkasse einreichen
2. nach Zuschussfestsetzung durch die Kasse den Antrag bitte umgehend an die Praxis zurück

Unfortunately I only read up to Line Number 4, and then concluded that I have taken the wrong Document. So unfortunatley the Way was for Nothing.

Back home I search for the “right” Document which I - by logical Conclusion - cannot find.

I felt rememinded to my recently lost Work. So I developted the Hypothesis that I might have already delivered the Document. But then I checked my Calendar found out the Truth:

For the first Appointment I brought the wrong Document and I promised to deliver the right one for the next (second) Session. If my Memory does not deceive me, I see almost 100% Probablity that something must have gone wrong.

Therefore I now also read the 5th Line and detected the Reason for my Problem.

After that Realization I grabbed the Heil- und Kostenplan, walked agein to the Dentist and put the Document into his Post-Box.

Day-6: More Concepts

Topics: Concepts

Finished Work

Blog-Chain-Time 2023.03.30-23:25 still on my Way to Nicole, I finished the Work for Today, CU Tomorrow!

About Apple Macbook Pro 14’’ M1

Blog-Chain-Time 2023.03.30-23:17 still on my Way to Nicole, Not a good Time for the Project. Today, my MacBook seems to empty his Battery faster than expected …

About Trust (again)

Blog-Chain-Time 2023.03.30-22:47 still on my Way to Nicole, Believe it or not my first Information Container Concepts have disappeared …

Information Containers

Blog-Chain-Time 2023.03.30-22:34 finally on my Way to Nicole, I start to add Concepts about Information Containers.

About Trust

Blog-Chain-Time 2023.03.30-22:19 on my Way to Nicole, Believe it or not, but our Story about “Micha … (again)” is lost somewhere in all this crazy mess.

Add Theory

Blog-Chain-Time 2023.03.30-20:03 in Tübingen(TBD), Before starting the real work, I first want to summarize the Theory into a List.

Add History

Blog-Chain-Time 2023.03.30-13:27 in Tübingen(TBD), I decided to combine my first Days into this Document for describing the History of this Project.

Day-5: First Concepts

Topics: Concepts

Blog-Chain-Time 2023.03.29-17-25, I am on my Way to Nicole [0] and after the Cleanup Work Yesterday, now I would like to use the Time for adding some new Concepts.

Footnotes

[0] Extra Tour with Nicole: https://www.holzheu.de/extra-tour-with-nicole

Day-4: Big “Cleanup”

Blog-Chain-Time 2023.03.28-22:35 in Tübingen, After Micha did the technical Work Yesterday, today our Creative Chief Officer Michi joined our Party to bring a bit more Pepper into the Souce.

But first I really want to beatify our Work a little bit.

So let’s first check what we have written in the Document [0] with the meaningful Number 99, where obviously Somebody forgot to add a Footnote for this famous saying:

But Caution is the Mother of the Porcelain Box, so let's make some Experiments first.

Our current Favourite Markdown Footnotes have the Drawback that the Numbers have to be specified manually, and to put it strait:

This can sometimes really be really be "Pain in the Ass"!

But before we can come back to that, we have first to define some basic [Things]. Oh Man, perhaps I should not have started that, because after ten Minutes I already created a long List of very important new Things.

But before I could commit those, we first had to define other even more urgent Things, namely Michi, the simple Show Mouse and my Bunnie Page.

And there was a small Problem to enable the Broken Link page - not a big deal, I will do that together with Micha sometime later [1] .

But let’s come back to the starting Point with the Footnotes. Obviously I had been a little bit too optimistic. Obviously on GitHub the modern fancy Features of the Markup Languate have not yet arrived. But this has time until Tomorrow.

So only one more Thing …

Stocherkahn on the Neckar

Footnotes

[0] Document \ [1] To-Dos

Day-3: A nasty Egg

Topics: Bugs

Blog-Chain-Time 2023.03.27-??:?? in Tübingen(TBD), Damn, I forgot to commit my 33.md Baby. Normally this is no big Deal, but unfortunately the already committed 27.md has a Reference to it:

root:~ (devel)# head 27.md
# Echo Bug
Everytime when I execute the [mmls](/0/33.html#mmls) command, a new file "echo" is created.

I am screwed when Someone checks out the Code now and sees the broken Link. So let’s checkin the missing File quickly:

root:~ (devel)# git add 33.md
root:~ (devel)# git commit -s -m "Add 33.md to fix the broken Link in 27.md in the previous commit"
[devel 5a30961] Add 33.md to fix the broken Link in 27.md in the previous commit
 1 file changed, 26 insertions(+)
 create mode 100644 33.md

Puh, Nobody saw my Mistake and now we are save again:

root:~ (devel)# git log --oneline | head -3
5a30961 Add 33.md to fix the broken Link in 27.md in the previous commit
c3c6df2 Add more Files to ignore
46aa317 Add Echo Bug

But wait, if some Grumpy gets to the crazy idea to check out “Echo Bug” Commit 46aa317, he can still find out my sloppiness. Oh Man, I really have laid myself a nasty egg:

  \ /
  0|0
  ---

Good Night und Gute N8!

Holyheu