Seeming issues with flows using chron or output change

I’ve been beating my head against the wall for a few days trying to create an kwgt that does something like this website https://literature-clock.jenevoldsen.com/

I have seen this but it doesn’t seem to work anymore: https://www.reddit.com/r/kustom/comments/1foqmjh/literary_clock_for_kwgt

Initially I tried to pull it from the litclock website but there’s no API; then I tried to do it in JSON but as far as I can tell $tc$ can’t do anything with JSON files, neither singular ones nor 1440 individual ones. Next I tried to do it with images and created 1440 light and dark mode versions of the quotes. My thinking was

  1. new widget → image

  2. set image to $gv(bitpath)$

  3. set a blank global value

  4. use flows to replace the image every minute

  5. this has a trigger on output change of "$df(HH)$$df(mm)$" then file picker with the image folder and a filter of $df(HH)$_$df(mm)$.png

But it keeps seeming to stop, work briefly, and start and then stop. I’m at the end of my wits here :frowning:

I also posted on reddit (links below)

The suggestions were to

  1. use chron, which I did try (I used `* * * * *` for every minute) but it does nothing
  2. Someone suggested this

```
Assuming you want a single quote (not one that is different each time it loads)… but you could expand on this to select from a pre-defined array of quotes.
Create a set of global Text variables for each quote - one for the “pre time” part, before the time text, and one for the “post time”. Example:
Variable: q01pre, Value: “The bus arrives at”
Variable: q01post, Value: “for your commute”
Then a text component on your wallpaper has the formula (note the spaces between $, and the lack of them on the q01pre value):
$gv(q01pre)$ $df(h.mm)$ $gv(q01post)$
```

However, the quotes are different every minute so it’s probably impossible to create 2880 variables (1440 for light mode and 1440 for dark mode).

here’s what it looks like right now: https://imgur.com/a/Mnrouje

Thw quotes are orginally from here: literature-clock/quotes/quotes.en-US.csv at main · cdmoro/literature-clock · GitHub

I have this CSV in either a trimmed or a full format (ignore the utf issues from excel)
Trimmed

Time	Label	Quote	Title	Author	Tag
0:00	midnight	While they were drinking at the fountain, church clocks began to strike midnight. Missis said gladly, “Oh, Pongo, it’s tomorrow! Now we shall be with our puppies today!”	The 101 Dalmatians	Dodie Smith	sfw
0:00	midnight	At midnight the entrances were thrown wide, and the rabble, surging in, occupied the quarters assigned to them, from which nothing less than an earthquake or an army with spears could have dislodged them. They dozed the night away on the benches, and breakfasted there; and there the close of the exercises found them, patient and sight-hungry as in the beginning.	Ben-Hur	Lew Wallace	sfw

Full

Time	Label	Quote	Title	Author	Tag
0:00	midnight	But in the end I understood this language. I understood it, I understood it, all wrong perhaps. That is not what matters. It told me to write the report. Does this mean I am freer now than I was? I do not know. I shall learn. Then I went back into the house and wrote, It is midnight. The rain is beating on the windows. It was not midnight. It was not raining.	Molloy	Samuel Beckett	unknown
0:00	J. Came to my bed at midnight, and during our athletics, my door was barged. Farcical horror! Thank God J. had locked it on her way in. The doorknob rattled, insistent knocking began. Fear can clear the mind as well as cloud it, and remembering my 𝘋𝘰𝘯 𝘑𝘶𝘢𝘯, I hid J. in a nest of coverlets and sheets in my sagging bed and left the curtain half open to show I had nothing to hide.	Cloud Atlas	David Mitchell	nsfw	unknown

I also ALSO have this in a pipe delimited version like this

00:00|midnight|But in the end I understood this language. I understood it, I understood it, all wrong perhaps. That is not what matters. It told me to write the report. Does this mean I am freer now than I was? I do not know. I shall learn. Then I went back into the house and wrote, It is midnight. The rain is beating on the windows. It was not midnight. It was not raining.|Molloy|Samuel Beckett|unknown,00:00|J. Came to my bed at midnight, and during our athletics, my door was barged. Farcical horror! Thank God J. had locked it on her way in. The doorknob rattled, insistent knocking began. Fear can clear the mind as well as cloud it, and remembering my 𝘋𝘰𝘯 𝘑𝘶𝘢𝘯, I hid J. in a nest of coverlets and sheets in my sagging bed and left the curtain half open to show I had nothing to hide.|Cloud Atlas|David Mitchell|nsfw|unknown,00:00|It was an animal thing. A wilderness thing. Nothing about her belonged to her previous self in that moment. Above all her voice. This could have been the high shriek of a hawk, the soul-haunting howl of a wolf, the rasping cry of a red fox at midnight. It could have been any of them, but not the scream of a sixteen-year-old schoolgirl.|The Island of Missing Trees|Elif Shafak|unknown|unknown,00:00|twelve|The clock striketh twelve O it strikes, it strikes! Now body, turn to air, Or Lucifer will bear thee quick to hell. O soul, be changed into little water drops, And fall into the ocean, ne'er to be found. My God, my God, look not so fierce on me!|Dr Faustus|Christopher Marlowe|sfw,00:00|midnight|“I thought you asleep,” he said, presently.<br>“Sleep is for old people and little children, and I came out to look at my friends, the stars in the south—those now holding the curtains of midnight over the Nile. But confess yourself surprised!”|Ben-Hur|Lew Wallace|sfw,00:01|a minute after midnight|She was wearing a watch. Not a digital one, in this life. An elegant, slender analogue one, with Roman numerals. It was about a minute after midnight.<br>How is this happening?|The Midnight Library|Matt Haig|unknown,00:02|Two minutes past midnight|Two minutes past midnight. With me in the lead the fourteen other men of Teams Yellow, White and Red moved out of the clearing and separated for points along the wall where they would cross over into the grounds.|Night of the Krait|Shashi 

The CSV has been transformed into 2880 images with a version of a php script (I cant post another link) modified to create dark and light image versions.

I also have them in json format.

    {
      "00:00": [
        {
          "time": "00:00",
          "quote_first": "While they were drinking at the fountain, church clocks began to strike ",
          "quote_time_case": "midnight",
          "quote_last": ". Missis said gladly, “Oh, Pongo, it’s tomorrow! Now we shall be with our puppies today!”",
          "title": "The 101 Dalmatians",
          "author": "Dodie Smith",
          "sfw": "yes"
        }

I also have these in individual minute json format, so like 00_03.json

[
  {
    "time": "00:03",
    "quote_first": "Early this morning, 1 January 2021, ",
    "quote_time_case": "three minutes after midnight",
    "quote_last": ", the last human to be born on earth was killed in a pub brawl in a suburb of Buenos Aires, aged twenty-five years, two months and twelve days.",
    "title": "The Children of Men",
    "author": "P.D. James",
    "sfw": "yes"
  },
  {
    "time": "00:03",
    "quote_first": "It was just ",
    "quote_time_case": "three minutes past midnight",
    "quote_last": " when I last saw Archer Harrison alive. I remember, because I said it was two minutes past and he looked at his watch and said it was three minutes past.",
    "title": "Since Ibsen",
    "author": "George Jean Nathan",
    "sfw": "yes"
  },
  {
    "time": "00:03",
    "quote_first": "Suddenly I felt a great stillness in the air, then a snapping of tension. I glanced at my watch. ",
    "quote_time_case": "Three minutes after midnight.",
    "quote_last": " I was breathing normally and my pen moved freely across the page. Whatever stalked me wasn’t quite as clever as I’d feared, I thought, careful not to pause in my work.",
    "title": "The Historian",
    "author": "Elizabeth Kostova",
    "sfw": "yes"
  }
]

I also ALSO have them in a json fomat that just has one quote per xx_xx.json format

[
  {
    "time": "00:03",
    "quote_first": "Early this morning, 1 January 2021, ",
    "quote_time_case": "three minutes after midnight",
    "quote_last": ", the last human to be born on earth was killed in a pub brawl in a suburb of Buenos Aires, aged twenty-five years, two months and twelve days.",
    "title": "The Children of Men",
    "author": "P.D. James",
    "sfw": "yes"
  }
]

here’s what it looks like right now: https://imgur.com/a/Mnrouje

Thw quotes are orginally from here: literature-clock/quotes/quotes.en-US.csv at main · cdmoro/literature-clock · GitHub

I have this CSV in either a trimmed or a full format (ignore the utf issues from excel)
Trimmed

Time	Label	Quote	Title	Author	Tag
0:00	midnight	While they were drinking at the fountain, church clocks began to strike midnight. Missis said gladly, “Oh, Pongo, it’s tomorrow! Now we shall be with our puppies today!”	The 101 Dalmatians	Dodie Smith	sfw
0:00	midnight	At midnight the entrances were thrown wide, and the rabble, surging in, occupied the quarters assigned to them, from which nothing less than an earthquake or an army with spears could have dislodged them. They dozed the night away on the benches, and breakfasted there; and there the close of the exercises found them, patient and sight-hungry as in the beginning.	Ben-Hur	Lew Wallace	sfw

Full

Time	Label	Quote	Title	Author	Tag
0:00	midnight	But in the end I understood this language. I understood it, I understood it, all wrong perhaps. That is not what matters. It told me to write the report. Does this mean I am freer now than I was? I do not know. I shall learn. Then I went back into the house and wrote, It is midnight. The rain is beating on the windows. It was not midnight. It was not raining.	Molloy	Samuel Beckett	unknown
0:00	J. Came to my bed at midnight, and during our athletics, my door was barged. Farcical horror! Thank God J. had locked it on her way in. The doorknob rattled, insistent knocking began. Fear can clear the mind as well as cloud it, and remembering my 𝘋𝘰𝘯 𝘑𝘶𝘢𝘯, I hid J. in a nest of coverlets and sheets in my sagging bed and left the curtain half open to show I had nothing to hide.	Cloud Atlas	David Mitchell	nsfw	unknown

I also ALSO have this in a pipe delimited version like this

00:00|midnight|But in the end I understood this language. I understood it, I understood it, all wrong perhaps. That is not what matters. It told me to write the report. Does this mean I am freer now than I was? I do not know. I shall learn. Then I went back into the house and wrote, It is midnight. The rain is beating on the windows. It was not midnight. It was not raining.|Molloy|Samuel Beckett|unknown,00:00|J. Came to my bed at midnight, and during our athletics, my door was barged. Farcical horror! Thank God J. had locked it on her way in. The doorknob rattled, insistent knocking began. Fear can clear the mind as well as cloud it, and remembering my 𝘋𝘰𝘯 𝘑𝘶𝘢𝘯, I hid J. in a nest of coverlets and sheets in my sagging bed and left the curtain half open to show I had nothing to hide.|Cloud Atlas|David Mitchell|nsfw|unknown,00:00|It was an animal thing. A wilderness thing. Nothing about her belonged to her previous self in that moment. Above all her voice. This could have been the high shriek of a hawk, the soul-haunting howl of a wolf, the rasping cry of a red fox at midnight. It could have been any of them, but not the scream of a sixteen-year-old schoolgirl.|The Island of Missing Trees|Elif Shafak|unknown|unknown,00:00|twelve|The clock striketh twelve O it strikes, it strikes! Now body, turn to air, Or Lucifer will bear thee quick to hell. O soul, be changed into little water drops, And fall into the ocean, ne'er to be found. My God, my God, look not so fierce on me!|Dr Faustus|Christopher Marlowe|sfw,00:00|midnight|“I thought you asleep,” he said, presently.<br>“Sleep is for old people and little children, and I came out to look at my friends, the stars in the south—those now holding the curtains of midnight over the Nile. But confess yourself surprised!”|Ben-Hur|Lew Wallace|sfw,00:01|a minute after midnight|She was wearing a watch. Not a digital one, in this life. An elegant, slender analogue one, with Roman numerals. It was about a minute after midnight.<br>How is this happening?|The Midnight Library|Matt Haig|unknown,00:02|Two minutes past midnight|Two minutes past midnight. With me in the lead the fourteen other men of Teams Yellow, White and Red moved out of the clearing and separated for points along the wall where they would cross over into the grounds.|Night of the Krait|Shashi 

The CSV has been transformed into 2880 images with a version of a php script (I cant post another link) modified to create dark and light image versions.

Hi there,

You can transform numbers to words in any Kustom apps (KWGT, KLWP, or KLCK).

I hope this would help.

Did you find the most helpful response to your issue?

Please kindly press the :check_box_with_check: Solution button to mark it as the solution.

This would help others with the similar issue.

:smiling_face::+1:

I appreciate the thought but that is not even remotely what I’m trying to do; as in its so far removed from the point as to be actively unhelpful